diff options
author | Lei Zhang <thestig@chromium.org> | 2018-10-12 17:03:30 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-10-12 17:03:30 +0000 |
commit | de859c1493c39e3d2397a748054966d2ae985214 (patch) | |
tree | 5f2f3819984d5292dfca54ef31bf7f84b59d4ea2 /core/fpdfdoc/cpdf_formcontrol.cpp | |
parent | 29b708e7af32de30d946b4bb609b390187987cb5 (diff) | |
download | pdfium-de859c1493c39e3d2397a748054966d2ae985214.tar.xz |
Fix naming for CPDF_FormField::Type enum.
The preferred Google C++ style is kFoo.
Change-Id: I167b147aab91245a4dfce1185008f0b412078260
Reviewed-on: https://pdfium-review.googlesource.com/c/43934
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfdoc/cpdf_formcontrol.cpp')
-rw-r--r-- | core/fpdfdoc/cpdf_formcontrol.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/core/fpdfdoc/cpdf_formcontrol.cpp b/core/fpdfdoc/cpdf_formcontrol.cpp index 6ce14ed7ab..06b578d71b 100644 --- a/core/fpdfdoc/cpdf_formcontrol.cpp +++ b/core/fpdfdoc/cpdf_formcontrol.cpp @@ -37,8 +37,8 @@ CFX_FloatRect CPDF_FormControl::GetRect() const { } ByteString CPDF_FormControl::GetOnStateName() const { - ASSERT(GetType() == CPDF_FormField::CheckBox || - GetType() == CPDF_FormField::RadioButton); + ASSERT(GetType() == CPDF_FormField::kCheckBox || + GetType() == CPDF_FormField::kRadioButton); ByteString csOn; CPDF_Dictionary* pAP = m_pWidgetDict->GetDictFor("AP"); if (!pAP) @@ -56,11 +56,11 @@ ByteString CPDF_FormControl::GetOnStateName() const { } ByteString CPDF_FormControl::GetCheckedAPState() const { - ASSERT(GetType() == CPDF_FormField::CheckBox || - GetType() == CPDF_FormField::RadioButton); + ASSERT(GetType() == CPDF_FormField::kCheckBox || + GetType() == CPDF_FormField::kRadioButton); ByteString csOn = GetOnStateName(); - if (GetType() == CPDF_FormField::RadioButton || - GetType() == CPDF_FormField::CheckBox) { + if (GetType() == CPDF_FormField::kRadioButton || + GetType() == CPDF_FormField::kCheckBox) { if (ToArray(FPDF_GetFieldAttr(m_pField->GetDict(), "Opt"))) csOn = ByteString::Format("%d", m_pField->GetControlIndex(this)); } @@ -70,11 +70,11 @@ ByteString CPDF_FormControl::GetCheckedAPState() const { } WideString CPDF_FormControl::GetExportValue() const { - ASSERT(GetType() == CPDF_FormField::CheckBox || - GetType() == CPDF_FormField::RadioButton); + ASSERT(GetType() == CPDF_FormField::kCheckBox || + GetType() == CPDF_FormField::kRadioButton); ByteString csOn = GetOnStateName(); - if (GetType() == CPDF_FormField::RadioButton || - GetType() == CPDF_FormField::CheckBox) { + if (GetType() == CPDF_FormField::kRadioButton || + GetType() == CPDF_FormField::kCheckBox) { if (CPDF_Array* pArray = ToArray(FPDF_GetFieldAttr(m_pField->GetDict(), "Opt"))) { int iIndex = m_pField->GetControlIndex(this); @@ -87,16 +87,16 @@ WideString CPDF_FormControl::GetExportValue() const { } bool CPDF_FormControl::IsChecked() const { - ASSERT(GetType() == CPDF_FormField::CheckBox || - GetType() == CPDF_FormField::RadioButton); + ASSERT(GetType() == CPDF_FormField::kCheckBox || + GetType() == CPDF_FormField::kRadioButton); ByteString csOn = GetOnStateName(); ByteString csAS = m_pWidgetDict->GetStringFor("AS"); return csAS == csOn; } bool CPDF_FormControl::IsDefaultChecked() const { - ASSERT(GetType() == CPDF_FormField::CheckBox || - GetType() == CPDF_FormField::RadioButton); + ASSERT(GetType() == CPDF_FormField::kCheckBox || + GetType() == CPDF_FormField::kRadioButton); CPDF_Object* pDV = FPDF_GetFieldAttr(m_pField->GetDict(), "DV"); if (!pDV) return false; @@ -107,8 +107,8 @@ bool CPDF_FormControl::IsDefaultChecked() const { } void CPDF_FormControl::CheckControl(bool bChecked) { - ASSERT(GetType() == CPDF_FormField::CheckBox || - GetType() == CPDF_FormField::RadioButton); + ASSERT(GetType() == CPDF_FormField::kCheckBox || + GetType() == CPDF_FormField::kRadioButton); ByteString csOldAS = m_pWidgetDict->GetStringFor("AS", "Off"); ByteString csAS = "Off"; if (bChecked) |