From 320b2313d19869333ed453af546e61a9fc2b81c9 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Thu, 23 Jul 2015 13:26:26 -0700 Subject: FX_BOOL considered harmful, part 2. Fully automatic change, execpt for cleanup in fx_system.h R=thestig@chromium.org Review URL: https://codereview.chromium.org/1254703002 . --- core/src/fpdfdoc/doc_formcontrol.cpp | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'core/src/fpdfdoc/doc_formcontrol.cpp') diff --git a/core/src/fpdfdoc/doc_formcontrol.cpp b/core/src/fpdfdoc/doc_formcontrol.cpp index 87eee92c2e..62eb591f94 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; } -FX_BOOL CPDF_FormControl::IsChecked() +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; } -FX_BOOL CPDF_FormControl::IsDefaultChecked() +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(FX_BOOL bChecked) +void CPDF_FormControl::CheckControl(bool bChecked) { ASSERT(GetType() == CPDF_FormField::CheckBox || GetType() == CPDF_FormField::RadioButton); CFX_ByteString csOn = GetOnStateName(); @@ -144,7 +144,7 @@ void CPDF_FormControl::CheckControl(FX_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(FX_BOOL bCreate) +CPDF_ApSettings CPDF_FormControl::GetMK(bool bCreate) { if (!m_pWidgetDict) { return NULL; @@ -201,49 +201,49 @@ CPDF_ApSettings CPDF_FormControl::GetMK(FX_BOOL bCreate) } return mk; } -FX_BOOL CPDF_FormControl::HasMKEntry(CFX_ByteString csEntry) +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(); } -FX_BOOL CPDF_ApSettings::HasMKEntry(const CFX_ByteStringC& csEntry) +bool CPDF_ApSettings::HasMKEntry(const CFX_ByteStringC& csEntry) { if (m_pDict == NULL) { - return FALSE; + return false; } return m_pDict->KeyExist(csEntry); } -- cgit v1.2.3