diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-07-23 13:36:00 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-07-23 13:36:00 -0700 |
commit | f1e7c461dfabbff6b65a072f24f6711b34159361 (patch) | |
tree | 3b0bb772a59669f06b86824a444fd06642592d4b /core/src/fpdfdoc/doc_formcontrol.cpp | |
parent | 320b2313d19869333ed453af546e61a9fc2b81c9 (diff) | |
download | pdfium-f1e7c461dfabbff6b65a072f24f6711b34159361.tar.xz |
Revert "FX_BOOL considered harmful, part 2."
This reverts commit 320b2313d19869333ed453af546e61a9fc2b81c9.
Reason for revert: build failure.
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1255693002 .
Diffstat (limited to 'core/src/fpdfdoc/doc_formcontrol.cpp')
-rw-r--r-- | core/src/fpdfdoc/doc_formcontrol.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/core/src/fpdfdoc/doc_formcontrol.cpp b/core/src/fpdfdoc/doc_formcontrol.cpp index 62eb591f94..87eee92c2e 100644 --- a/core/src/fpdfdoc/doc_formcontrol.cpp +++ b/core/src/fpdfdoc/doc_formcontrol.cpp @@ -113,25 +113,25 @@ CFX_WideString CPDF_FormControl::GetExportValue() CFX_WideString csWOn = PDF_DecodeText(csOn); return csWOn; } -bool CPDF_FormControl::IsChecked() +FX_BOOL CPDF_FormControl::IsChecked() { ASSERT(GetType() == CPDF_FormField::CheckBox || GetType() == CPDF_FormField::RadioButton); CFX_ByteString csOn = GetOnStateName(); CFX_ByteString csAS = m_pWidgetDict->GetString("AS"); return csAS == csOn; } -bool CPDF_FormControl::IsDefaultChecked() +FX_BOOL CPDF_FormControl::IsDefaultChecked() { ASSERT(GetType() == CPDF_FormField::CheckBox || GetType() == CPDF_FormField::RadioButton); CPDF_Object* pDV = FPDF_GetFieldAttr(m_pField->m_pDict, "DV"); if (pDV == NULL) { - return false; + return FALSE; } CFX_ByteString csDV = pDV->GetString(); CFX_ByteString csOn = GetOnStateName(); return (csDV == csOn); } -void CPDF_FormControl::CheckControl(bool bChecked) +void CPDF_FormControl::CheckControl(FX_BOOL bChecked) { ASSERT(GetType() == CPDF_FormField::CheckBox || GetType() == CPDF_FormField::RadioButton); CFX_ByteString csOn = GetOnStateName(); @@ -144,7 +144,7 @@ void CPDF_FormControl::CheckControl(bool bChecked) return; } m_pWidgetDict->SetAtName("AS", csAS); - m_pForm->m_bUpdated = true; + m_pForm->m_bUpdated = TRUE; } CPDF_Stream* FPDFDOC_GetAnnotAP(CPDF_Dictionary* pAnnotDict, CPDF_Annot::AppearanceMode mode); void CPDF_FormControl::DrawControl(CFX_RenderDevice* pDevice, CFX_AffineMatrix* pMatrix, CPDF_Page* pPage, @@ -186,7 +186,7 @@ CPDF_FormControl::HighlightingMode CPDF_FormControl::GetHighlightingMode() } return Invert; } -CPDF_ApSettings CPDF_FormControl::GetMK(bool bCreate) +CPDF_ApSettings CPDF_FormControl::GetMK(FX_BOOL bCreate) { if (!m_pWidgetDict) { return NULL; @@ -201,49 +201,49 @@ CPDF_ApSettings CPDF_FormControl::GetMK(bool bCreate) } return mk; } -bool CPDF_FormControl::HasMKEntry(CFX_ByteString csEntry) +FX_BOOL CPDF_FormControl::HasMKEntry(CFX_ByteString csEntry) { - CPDF_ApSettings mk = GetMK(false); + CPDF_ApSettings mk = GetMK(FALSE); return mk.HasMKEntry(csEntry); } int CPDF_FormControl::GetRotation() { - CPDF_ApSettings mk = GetMK(false); + CPDF_ApSettings mk = GetMK(FALSE); return mk.GetRotation(); } FX_ARGB CPDF_FormControl::GetColor(int& iColorType, CFX_ByteString csEntry) { - CPDF_ApSettings mk = GetMK(false); + CPDF_ApSettings mk = GetMK(FALSE); return mk.GetColor(iColorType, csEntry); } FX_FLOAT CPDF_FormControl::GetOriginalColor(int index, CFX_ByteString csEntry) { - CPDF_ApSettings mk = GetMK(false); + CPDF_ApSettings mk = GetMK(FALSE); return mk.GetOriginalColor(index, csEntry); } void CPDF_FormControl::GetOriginalColor(int& iColorType, FX_FLOAT fc[4], CFX_ByteString csEntry) { - CPDF_ApSettings mk = GetMK(false); + CPDF_ApSettings mk = GetMK(FALSE); mk.GetOriginalColor(iColorType, fc, csEntry); } CFX_WideString CPDF_FormControl::GetCaption(CFX_ByteString csEntry) { - CPDF_ApSettings mk = GetMK(false); + CPDF_ApSettings mk = GetMK(FALSE); return mk.GetCaption(csEntry); } CPDF_Stream* CPDF_FormControl::GetIcon(CFX_ByteString csEntry) { - CPDF_ApSettings mk = GetMK(false); + CPDF_ApSettings mk = GetMK(FALSE); return mk.GetIcon(csEntry); } CPDF_IconFit CPDF_FormControl::GetIconFit() { - CPDF_ApSettings mk = GetMK(false); + CPDF_ApSettings mk = GetMK(FALSE); return mk.GetIconFit(); } int CPDF_FormControl::GetTextPosition() { - CPDF_ApSettings mk = GetMK(false); + CPDF_ApSettings mk = GetMK(FALSE); return mk.GetTextPosition(); } CPDF_Action CPDF_FormControl::GetAction() @@ -343,10 +343,10 @@ int CPDF_FormControl::GetControlAlignment() } return pObj->GetInteger(); } -bool CPDF_ApSettings::HasMKEntry(const CFX_ByteStringC& csEntry) +FX_BOOL CPDF_ApSettings::HasMKEntry(const CFX_ByteStringC& csEntry) { if (m_pDict == NULL) { - return false; + return FALSE; } return m_pDict->KeyExist(csEntry); } |