From ded3634145b214b11212a7c53faa8ba15a1789ca Mon Sep 17 00:00:00 2001 From: thestig Date: Mon, 23 May 2016 17:54:02 -0700 Subject: Change CPDF_Boolean to use bool instead of FX_BOOL. Review-Url: https://codereview.chromium.org/1999313002 --- fpdfsdk/fpdfview.cpp | 9 ++------- fpdfsdk/fsdk_baseform.cpp | 2 +- fpdfsdk/javascript/Field.cpp | 3 +-- fpdfsdk/pdfwindow/PWL_Icon.cpp | 7 ------- fpdfsdk/pdfwindow/PWL_Icon.h | 1 - 5 files changed, 4 insertions(+), 18 deletions(-) (limited to 'fpdfsdk') diff --git a/fpdfsdk/fpdfview.cpp b/fpdfsdk/fpdfview.cpp index e7b3a96b0b..cdcaba4318 100644 --- a/fpdfsdk/fpdfview.cpp +++ b/fpdfsdk/fpdfview.cpp @@ -364,13 +364,8 @@ DLLEXPORT FPDF_BOOL STDCALL FPDF_HasXFAField(FPDF_DOCUMENT document, if (!pXFA) return FALSE; - FX_BOOL bDynamicXFA = pRoot->GetBooleanBy("NeedsRendering", FALSE); - - if (bDynamicXFA) - *docType = DOCTYPE_DYNAMIC_XFA; - else - *docType = DOCTYPE_STATIC_XFA; - + bool bDynamicXFA = pRoot->GetBooleanBy("NeedsRendering", false); + *docType = bDynamicXFA ? DOCTYPE_DYNAMIC_XFA : DOCTYPE_STATIC_XFA; return TRUE; } diff --git a/fpdfsdk/fsdk_baseform.cpp b/fpdfsdk/fsdk_baseform.cpp index dbef4a9b67..6461221552 100644 --- a/fpdfsdk/fsdk_baseform.cpp +++ b/fpdfsdk/fsdk_baseform.cpp @@ -2312,7 +2312,7 @@ FX_BOOL CPDFSDK_InterForm::DoAction_Hide(const CPDF_Action& action) { std::vector fieldObjects = af.GetAllFields(); std::vector fields = GetFieldFromObjects(fieldObjects); - FX_BOOL bHide = action.GetHideStatus(); + bool bHide = action.GetHideStatus(); FX_BOOL bChanged = FALSE; for (CPDF_FormField* pField : fields) { diff --git a/fpdfsdk/javascript/Field.cpp b/fpdfsdk/javascript/Field.cpp index c1838332ba..2a739deed0 100644 --- a/fpdfsdk/javascript/Field.cpp +++ b/fpdfsdk/javascript/Field.cpp @@ -601,8 +601,7 @@ FX_BOOL Field::buttonFitBounds(IJS_Context* cc, if (!pFormControl) return FALSE; - CPDF_IconFit IconFit = pFormControl->GetIconFit(); - vp << IconFit.GetFittingBounds(); + vp << pFormControl->GetIconFit().GetFittingBounds(); } return TRUE; diff --git a/fpdfsdk/pdfwindow/PWL_Icon.cpp b/fpdfsdk/pdfwindow/PWL_Icon.cpp index cfd62dfcd9..18111ac358 100644 --- a/fpdfsdk/pdfwindow/PWL_Icon.cpp +++ b/fpdfsdk/pdfwindow/PWL_Icon.cpp @@ -145,13 +145,6 @@ void CPWL_Icon::GetIconPosition(FX_FLOAT& fLeft, FX_FLOAT& fBottom) { } } -FX_BOOL CPWL_Icon::GetFittingBounds() { - if (m_pIconFit) - return m_pIconFit->GetFittingBounds(); - - return FALSE; -} - void CPWL_Icon::GetScale(FX_FLOAT& fHScale, FX_FLOAT& fVScale) { fHScale = 1.0f; fVScale = 1.0f; diff --git a/fpdfsdk/pdfwindow/PWL_Icon.h b/fpdfsdk/pdfwindow/PWL_Icon.h index 5abf9c26cc..a5bd907012 100644 --- a/fpdfsdk/pdfwindow/PWL_Icon.h +++ b/fpdfsdk/pdfwindow/PWL_Icon.h @@ -47,7 +47,6 @@ class CPWL_Icon : public CPWL_Image { int32_t GetScaleMethod(); FX_BOOL IsProportionalScale(); void GetIconPosition(FX_FLOAT& fLeft, FX_FLOAT& fBottom); - FX_BOOL GetFittingBounds(); void SetIconFit(CPDF_IconFit* pIconFit) { m_pIconFit = pIconFit; } -- cgit v1.2.3