From 9d6ca99dbc864a26a13168d4cadbce22bbb55d9e Mon Sep 17 00:00:00 2001 From: dsinclair Date: Thu, 16 Jun 2016 10:51:56 -0700 Subject: Cleanup FWL RenderWidget method parameters. This CL removes the default values from pMatrix and dwStatus as they are always set and removes the iRotate parameter as it is never set and never used. Review-Url: https://codereview.chromium.org/2071903002 --- xfa/fxfa/app/xfa_ffbarcode.cpp | 3 +-- xfa/fxfa/app/xfa_ffbarcode.h | 5 ++--- xfa/fxfa/app/xfa_ffcheckbutton.cpp | 3 +-- xfa/fxfa/app/xfa_ffcheckbutton.h | 5 ++--- xfa/fxfa/app/xfa_ffexclgroup.cpp | 3 +-- xfa/fxfa/app/xfa_ffexclgroup.h | 5 ++--- xfa/fxfa/app/xfa_fffield.cpp | 3 +-- xfa/fxfa/app/xfa_fffield.h | 5 ++--- xfa/fxfa/app/xfa_ffimage.cpp | 3 +-- xfa/fxfa/app/xfa_ffimage.h | 5 ++--- xfa/fxfa/app/xfa_ffimageedit.cpp | 3 +-- xfa/fxfa/app/xfa_ffimageedit.h | 5 ++--- xfa/fxfa/app/xfa_ffpath.cpp | 9 +++------ xfa/fxfa/app/xfa_ffpath.h | 15 ++++++--------- xfa/fxfa/app/xfa_ffpushbutton.cpp | 3 +-- xfa/fxfa/app/xfa_ffpushbutton.h | 5 ++--- xfa/fxfa/app/xfa_ffsignature.cpp | 3 +-- xfa/fxfa/app/xfa_ffsignature.h | 5 ++--- xfa/fxfa/app/xfa_fftext.cpp | 3 +-- xfa/fxfa/app/xfa_fftext.h | 5 ++--- xfa/fxfa/app/xfa_ffwidget.cpp | 3 +-- xfa/fxfa/app/xfa_ffwidgethandler.cpp | 2 +- 22 files changed, 38 insertions(+), 63 deletions(-) (limited to 'xfa/fxfa/app') diff --git a/xfa/fxfa/app/xfa_ffbarcode.cpp b/xfa/fxfa/app/xfa_ffbarcode.cpp index 508356ccf2..5b1fe35c90 100644 --- a/xfa/fxfa/app/xfa_ffbarcode.cpp +++ b/xfa/fxfa/app/xfa_ffbarcode.cpp @@ -141,8 +141,7 @@ FX_BOOL CXFA_FFBarcode::LoadWidget() { } void CXFA_FFBarcode::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix, - uint32_t dwStatus, - int32_t iRotate) { + uint32_t dwStatus) { if (!IsMatchVisibleStatus(dwStatus)) { return; } diff --git a/xfa/fxfa/app/xfa_ffbarcode.h b/xfa/fxfa/app/xfa_ffbarcode.h index 5a412a6174..5f6c64e4e0 100644 --- a/xfa/fxfa/app/xfa_ffbarcode.h +++ b/xfa/fxfa/app/xfa_ffbarcode.h @@ -19,9 +19,8 @@ class CXFA_FFBarcode : public CXFA_FFTextEdit { // CXFA_FFTextEdit FX_BOOL LoadWidget() override; void RenderWidget(CFX_Graphics* pGS, - CFX_Matrix* pMatrix = NULL, - uint32_t dwStatus = 0, - int32_t iRotate = 0) override; + CFX_Matrix* pMatrix, + uint32_t dwStatus) override; void UpdateWidgetProperty() override; FX_BOOL OnLButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override; FX_BOOL OnRButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override; diff --git a/xfa/fxfa/app/xfa_ffcheckbutton.cpp b/xfa/fxfa/app/xfa_ffcheckbutton.cpp index 9e174a286e..a24971c9d4 100644 --- a/xfa/fxfa/app/xfa_ffcheckbutton.cpp +++ b/xfa/fxfa/app/xfa_ffcheckbutton.cpp @@ -211,8 +211,7 @@ void CXFA_FFCheckButton::AddUIMargin(int32_t iCapPlacement) { } void CXFA_FFCheckButton::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix, - uint32_t dwStatus, - int32_t iRotate) { + uint32_t dwStatus) { if (!IsMatchVisibleStatus(dwStatus)) { return; } diff --git a/xfa/fxfa/app/xfa_ffcheckbutton.h b/xfa/fxfa/app/xfa_ffcheckbutton.h index fc219f9e2c..ff99aef001 100644 --- a/xfa/fxfa/app/xfa_ffcheckbutton.h +++ b/xfa/fxfa/app/xfa_ffcheckbutton.h @@ -17,9 +17,8 @@ class CXFA_FFCheckButton : public CXFA_FFField { // CXFA_FFField void RenderWidget(CFX_Graphics* pGS, - CFX_Matrix* pMatrix = NULL, - uint32_t dwStatus = 0, - int32_t iRotate = 0) override; + CFX_Matrix* pMatrix, + uint32_t dwStatus) override; FX_BOOL LoadWidget() override; FX_BOOL PerformLayout() override; diff --git a/xfa/fxfa/app/xfa_ffexclgroup.cpp b/xfa/fxfa/app/xfa_ffexclgroup.cpp index f4a1cfb67b..892ee309c3 100644 --- a/xfa/fxfa/app/xfa_ffexclgroup.cpp +++ b/xfa/fxfa/app/xfa_ffexclgroup.cpp @@ -17,8 +17,7 @@ CXFA_FFExclGroup::CXFA_FFExclGroup(CXFA_FFPageView* pPageView, CXFA_FFExclGroup::~CXFA_FFExclGroup() {} void CXFA_FFExclGroup::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix, - uint32_t dwStatus, - int32_t iRotate) { + uint32_t dwStatus) { if (!IsMatchVisibleStatus(dwStatus)) { return; } diff --git a/xfa/fxfa/app/xfa_ffexclgroup.h b/xfa/fxfa/app/xfa_ffexclgroup.h index 52a8e56466..58d05623f9 100644 --- a/xfa/fxfa/app/xfa_ffexclgroup.h +++ b/xfa/fxfa/app/xfa_ffexclgroup.h @@ -17,9 +17,8 @@ class CXFA_FFExclGroup : public CXFA_FFWidget { // CXFA_FFWidget void RenderWidget(CFX_Graphics* pGS, - CFX_Matrix* pMatrix = NULL, - uint32_t dwStatus = 0, - int32_t iRotate = 0) override; + CFX_Matrix* pMatrix, + uint32_t dwStatus) override; }; #endif // XFA_FXFA_APP_XFA_FFEXCLGROUP_H_ diff --git a/xfa/fxfa/app/xfa_fffield.cpp b/xfa/fxfa/app/xfa_fffield.cpp index df366217b0..7fad583c5b 100644 --- a/xfa/fxfa/app/xfa_fffield.cpp +++ b/xfa/fxfa/app/xfa_fffield.cpp @@ -51,8 +51,7 @@ FX_BOOL CXFA_FFField::GetBBox(CFX_RectF& rtBox, void CXFA_FFField::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix, - uint32_t dwStatus, - int32_t iRotate) { + uint32_t dwStatus) { if (!IsMatchVisibleStatus(dwStatus)) { return; } diff --git a/xfa/fxfa/app/xfa_fffield.h b/xfa/fxfa/app/xfa_fffield.h index 3aa358758f..a2c310fa89 100644 --- a/xfa/fxfa/app/xfa_fffield.h +++ b/xfa/fxfa/app/xfa_fffield.h @@ -25,9 +25,8 @@ class CXFA_FFField : public CXFA_FFWidget, public IFWL_WidgetDelegate { uint32_t dwStatus, FX_BOOL bDrawFocus = FALSE) override; void RenderWidget(CFX_Graphics* pGS, - CFX_Matrix* pMatrix = NULL, - uint32_t dwStatus = 0, - int32_t iRotate = 0) override; + CFX_Matrix* pMatrix, + uint32_t dwStatus) override; FX_BOOL IsLoaded() override; FX_BOOL LoadWidget() override; void UnloadWidget() override; diff --git a/xfa/fxfa/app/xfa_ffimage.cpp b/xfa/fxfa/app/xfa_ffimage.cpp index 7e4b0a9c34..5f62f78317 100644 --- a/xfa/fxfa/app/xfa_ffimage.cpp +++ b/xfa/fxfa/app/xfa_ffimage.cpp @@ -32,8 +32,7 @@ void CXFA_FFImage::UnloadWidget() { } void CXFA_FFImage::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix, - uint32_t dwStatus, - int32_t iRotate) { + uint32_t dwStatus) { if (!IsMatchVisibleStatus(dwStatus)) { return; } diff --git a/xfa/fxfa/app/xfa_ffimage.h b/xfa/fxfa/app/xfa_ffimage.h index 8771bde2fd..d0afc5b431 100644 --- a/xfa/fxfa/app/xfa_ffimage.h +++ b/xfa/fxfa/app/xfa_ffimage.h @@ -16,9 +16,8 @@ class CXFA_FFImage : public CXFA_FFDraw { // CXFA_FFWidget void RenderWidget(CFX_Graphics* pGS, - CFX_Matrix* pMatrix = NULL, - uint32_t dwStatus = 0, - int32_t iRotate = 0) override; + CFX_Matrix* pMatrix, + uint32_t dwStatus) override; FX_BOOL IsLoaded() override; FX_BOOL LoadWidget() override; void UnloadWidget() override; diff --git a/xfa/fxfa/app/xfa_ffimageedit.cpp b/xfa/fxfa/app/xfa_ffimageedit.cpp index f58bea1c54..fafa24d5c7 100644 --- a/xfa/fxfa/app/xfa_ffimageedit.cpp +++ b/xfa/fxfa/app/xfa_ffimageedit.cpp @@ -46,8 +46,7 @@ void CXFA_FFImageEdit::UnloadWidget() { } void CXFA_FFImageEdit::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix, - uint32_t dwStatus, - int32_t iRotate) { + uint32_t dwStatus) { if (!IsMatchVisibleStatus(dwStatus)) { return; } diff --git a/xfa/fxfa/app/xfa_ffimageedit.h b/xfa/fxfa/app/xfa_ffimageedit.h index 5749d52c02..88a28f431c 100644 --- a/xfa/fxfa/app/xfa_ffimageedit.h +++ b/xfa/fxfa/app/xfa_ffimageedit.h @@ -16,9 +16,8 @@ class CXFA_FFImageEdit : public CXFA_FFField { // CXFA_FFField void RenderWidget(CFX_Graphics* pGS, - CFX_Matrix* pMatrix = NULL, - uint32_t dwStatus = 0, - int32_t iRotate = 0) override; + CFX_Matrix* pMatrix, + uint32_t dwStatus) override; FX_BOOL LoadWidget() override; void UnloadWidget() override; FX_BOOL OnLButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override; diff --git a/xfa/fxfa/app/xfa_ffpath.cpp b/xfa/fxfa/app/xfa_ffpath.cpp index 2aad39f99c..60cfa38397 100644 --- a/xfa/fxfa/app/xfa_ffpath.cpp +++ b/xfa/fxfa/app/xfa_ffpath.cpp @@ -51,8 +51,7 @@ void CXFA_FFLine::GetRectFromHand(CFX_RectF& rect, } void CXFA_FFLine::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix, - uint32_t dwStatus, - int32_t iRotate) { + uint32_t dwStatus) { if (!IsMatchVisibleStatus(dwStatus)) { return; } @@ -108,8 +107,7 @@ CXFA_FFArc::CXFA_FFArc(CXFA_FFPageView* pPageView, CXFA_WidgetAcc* pDataAcc) CXFA_FFArc::~CXFA_FFArc() {} void CXFA_FFArc::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix, - uint32_t dwStatus, - int32_t iRotate) { + uint32_t dwStatus) { if (!IsMatchVisibleStatus(dwStatus)) { return; } @@ -136,8 +134,7 @@ CXFA_FFRectangle::CXFA_FFRectangle(CXFA_FFPageView* pPageView, CXFA_FFRectangle::~CXFA_FFRectangle() {} void CXFA_FFRectangle::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix, - uint32_t dwStatus, - int32_t iRotate) { + uint32_t dwStatus) { if (!IsMatchVisibleStatus(dwStatus)) { return; } diff --git a/xfa/fxfa/app/xfa_ffpath.h b/xfa/fxfa/app/xfa_ffpath.h index a56843dbdd..71c45e323e 100644 --- a/xfa/fxfa/app/xfa_ffpath.h +++ b/xfa/fxfa/app/xfa_ffpath.h @@ -16,9 +16,8 @@ class CXFA_FFLine : public CXFA_FFDraw { // CXFA_FFWidget void RenderWidget(CFX_Graphics* pGS, - CFX_Matrix* pMatrix = NULL, - uint32_t dwStatus = 0, - int32_t iRotate = 0) override; + CFX_Matrix* pMatrix, + uint32_t dwStatus) override; private: void GetRectFromHand(CFX_RectF& rect, int32_t iHand, FX_FLOAT fLineWidth); @@ -30,9 +29,8 @@ class CXFA_FFArc : public CXFA_FFDraw { // CXFA_FFWidget void RenderWidget(CFX_Graphics* pGS, - CFX_Matrix* pMatrix = NULL, - uint32_t dwStatus = 0, - int32_t iRotate = 0) override; + CFX_Matrix* pMatrix, + uint32_t dwStatus) override; }; class CXFA_FFRectangle : public CXFA_FFDraw { @@ -42,9 +40,8 @@ class CXFA_FFRectangle : public CXFA_FFDraw { // CXFA_FFWidget void RenderWidget(CFX_Graphics* pGS, - CFX_Matrix* pMatrix = NULL, - uint32_t dwStatus = 0, - int32_t iRotate = 0) override; + CFX_Matrix* pMatrix, + uint32_t dwStatus) override; }; #endif // XFA_FXFA_APP_XFA_FFPATH_H_ diff --git a/xfa/fxfa/app/xfa_ffpushbutton.cpp b/xfa/fxfa/app/xfa_ffpushbutton.cpp index 168e8a1535..bb25f1bcc1 100644 --- a/xfa/fxfa/app/xfa_ffpushbutton.cpp +++ b/xfa/fxfa/app/xfa_ffpushbutton.cpp @@ -31,8 +31,7 @@ CXFA_FFPushButton::~CXFA_FFPushButton() { } void CXFA_FFPushButton::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix, - uint32_t dwStatus, - int32_t iRotate) { + uint32_t dwStatus) { if (!IsMatchVisibleStatus(dwStatus)) { return; } diff --git a/xfa/fxfa/app/xfa_ffpushbutton.h b/xfa/fxfa/app/xfa_ffpushbutton.h index 3bd37df466..dae232e173 100644 --- a/xfa/fxfa/app/xfa_ffpushbutton.h +++ b/xfa/fxfa/app/xfa_ffpushbutton.h @@ -23,9 +23,8 @@ class CXFA_FFPushButton : public CXFA_FFField { // CXFA_FFField void RenderWidget(CFX_Graphics* pGS, - CFX_Matrix* pMatrix = NULL, - uint32_t dwStatus = 0, - int32_t iRotate = 0) override; + CFX_Matrix* pMatrix, + uint32_t dwStatus) override; FX_BOOL LoadWidget() override; void UnloadWidget() override; FX_BOOL PerformLayout() override; diff --git a/xfa/fxfa/app/xfa_ffsignature.cpp b/xfa/fxfa/app/xfa_ffsignature.cpp index 4008abf808..695969274c 100644 --- a/xfa/fxfa/app/xfa_ffsignature.cpp +++ b/xfa/fxfa/app/xfa_ffsignature.cpp @@ -20,8 +20,7 @@ FX_BOOL CXFA_FFSignature::LoadWidget() { } void CXFA_FFSignature::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix, - uint32_t dwStatus, - int32_t iRotate) { + uint32_t dwStatus) { if (!IsMatchVisibleStatus(dwStatus)) { return; } diff --git a/xfa/fxfa/app/xfa_ffsignature.h b/xfa/fxfa/app/xfa_ffsignature.h index 7291b42f0d..3cfe9ab2c6 100644 --- a/xfa/fxfa/app/xfa_ffsignature.h +++ b/xfa/fxfa/app/xfa_ffsignature.h @@ -16,9 +16,8 @@ class CXFA_FFSignature final : public CXFA_FFField { // CXFA_FFField void RenderWidget(CFX_Graphics* pGS, - CFX_Matrix* pMatrix = NULL, - uint32_t dwStatus = 0, - int32_t iRotate = 0) override; + CFX_Matrix* pMatrix, + uint32_t dwStatus) override; FX_BOOL LoadWidget() override; FX_BOOL OnMouseEnter() override; FX_BOOL OnMouseExit() override; diff --git a/xfa/fxfa/app/xfa_fftext.cpp b/xfa/fxfa/app/xfa_fftext.cpp index 1000b91c08..88cc6590e6 100644 --- a/xfa/fxfa/app/xfa_fftext.cpp +++ b/xfa/fxfa/app/xfa_fftext.cpp @@ -20,8 +20,7 @@ CXFA_FFText::CXFA_FFText(CXFA_FFPageView* pPageView, CXFA_WidgetAcc* pDataAcc) CXFA_FFText::~CXFA_FFText() {} void CXFA_FFText::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix, - uint32_t dwStatus, - int32_t iRotate) { + uint32_t dwStatus) { if (!IsMatchVisibleStatus(dwStatus)) { return; } diff --git a/xfa/fxfa/app/xfa_fftext.h b/xfa/fxfa/app/xfa_fftext.h index f48840f709..38e7676ac1 100644 --- a/xfa/fxfa/app/xfa_fftext.h +++ b/xfa/fxfa/app/xfa_fftext.h @@ -20,9 +20,8 @@ class CXFA_FFText : public CXFA_FFDraw { FX_BOOL OnMouseMove(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override; FWL_WidgetHit OnHitTest(FX_FLOAT fx, FX_FLOAT fy) override; void RenderWidget(CFX_Graphics* pGS, - CFX_Matrix* pMatrix = NULL, - uint32_t dwStatus = 0, - int32_t iRotate = 0) override; + CFX_Matrix* pMatrix, + uint32_t dwStatus) override; FX_BOOL IsLoaded() override; FX_BOOL PerformLayout() override; diff --git a/xfa/fxfa/app/xfa_ffwidget.cpp b/xfa/fxfa/app/xfa_ffwidget.cpp index 7d4116933f..4ea2857e09 100644 --- a/xfa/fxfa/app/xfa_ffwidget.cpp +++ b/xfa/fxfa/app/xfa_ffwidget.cpp @@ -106,8 +106,7 @@ FX_BOOL CXFA_FFWidget::GetToolTip(CFX_WideString& wsToolTip) { } void CXFA_FFWidget::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix, - uint32_t dwStatus, - int32_t iRotate) { + uint32_t dwStatus) { if (!IsMatchVisibleStatus(dwStatus)) { return; } diff --git a/xfa/fxfa/app/xfa_ffwidgethandler.cpp b/xfa/fxfa/app/xfa_ffwidgethandler.cpp index 534a08a4e3..87ef610882 100644 --- a/xfa/fxfa/app/xfa_ffwidgethandler.cpp +++ b/xfa/fxfa/app/xfa_ffwidgethandler.cpp @@ -180,7 +180,7 @@ void CXFA_FFWidgetHandler::RenderWidget(CXFA_FFWidget* hWidget, CFX_Matrix* pMatrix, FX_BOOL bHighlight) { hWidget->RenderWidget(pGS, pMatrix, - bHighlight ? XFA_WidgetStatus_Highlight : 0, 0); + bHighlight ? XFA_WidgetStatus_Highlight : 0); } FX_BOOL CXFA_FFWidgetHandler::HasEvent(CXFA_WidgetAcc* pWidgetAcc, -- cgit v1.2.3