summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-05-23 17:54:02 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-23 17:54:02 -0700
commitded3634145b214b11212a7c53faa8ba15a1789ca (patch)
treefe715734e07dc73b3b63d9223d59e7a2799b557e /fpdfsdk
parenta2d699f1462050833f959ebcf24853c2a6a10f72 (diff)
downloadpdfium-ded3634145b214b11212a7c53faa8ba15a1789ca.tar.xz
Change CPDF_Boolean to use bool instead of FX_BOOL.
Review-Url: https://codereview.chromium.org/1999313002
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/fpdfview.cpp9
-rw-r--r--fpdfsdk/fsdk_baseform.cpp2
-rw-r--r--fpdfsdk/javascript/Field.cpp3
-rw-r--r--fpdfsdk/pdfwindow/PWL_Icon.cpp7
-rw-r--r--fpdfsdk/pdfwindow/PWL_Icon.h1
5 files changed, 4 insertions, 18 deletions
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<CPDF_Object*> fieldObjects = af.GetAllFields();
std::vector<CPDF_FormField*> 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; }