Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2787)

Unified Diff: core/src/fpdfdoc/doc_formcontrol.cpp

Issue 1252613002: FX_BOOL considered harmful. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Manual edits. Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/src/fpdfdoc/doc_form.cpp ('k') | core/src/fpdfdoc/doc_formfield.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdfdoc/doc_formcontrol.cpp
diff --git a/core/src/fpdfdoc/doc_formcontrol.cpp b/core/src/fpdfdoc/doc_formcontrol.cpp
index 7fa17b8ffac011fa5179003da8580c69347f3ca6..fd524b26a97ba03e83e8d158e4ac0f9601a5760b 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()
@@ -346,10 +346,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);
}
« no previous file with comments | « core/src/fpdfdoc/doc_form.cpp ('k') | core/src/fpdfdoc/doc_formfield.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698