diff options
author | Tom Sepez <tsepez@chromium.org> | 2016-02-02 16:02:03 -0800 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2016-02-02 16:02:03 -0800 |
commit | ed5d7aa789ec5ef7b440d7e56b71804b41a928e3 (patch) | |
tree | 028bced4e1203313752240a1a3de7fbf998611c3 /core/src/fpdfdoc/doc_formcontrol.cpp | |
parent | 23bf560507a8e03968e66480281597be9161abf4 (diff) | |
download | pdfium-ed5d7aa789ec5ef7b440d7e56b71804b41a928e3.tar.xz |
Merge to XFA: Kill CFX_ByteArray in master.
One trivial edit in fx_basic.h
Includes both fixes for build breakage.
Review URL: https://codereview.chromium.org/1653253002 .
(cherry picked from commit 9b0a59d659d8083802385649ba74370d65c41e36)
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1655423002 .
Diffstat (limited to 'core/src/fpdfdoc/doc_formcontrol.cpp')
-rw-r--r-- | core/src/fpdfdoc/doc_formcontrol.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/core/src/fpdfdoc/doc_formcontrol.cpp b/core/src/fpdfdoc/doc_formcontrol.cpp index feaff38f16..169e9d73b7 100644 --- a/core/src/fpdfdoc/doc_formcontrol.cpp +++ b/core/src/fpdfdoc/doc_formcontrol.cpp @@ -17,7 +17,7 @@ CPDF_FormControl::CPDF_FormControl(CPDF_FormField* pField, CFX_FloatRect CPDF_FormControl::GetRect() const { return m_pWidgetDict->GetRectBy("Rect"); } -CFX_ByteString CPDF_FormControl::GetOnStateName() { +CFX_ByteString CPDF_FormControl::GetOnStateName() const { ASSERT(GetType() == CPDF_FormField::CheckBox || GetType() == CPDF_FormField::RadioButton); CFX_ByteString csOn; @@ -112,14 +112,16 @@ CFX_WideString CPDF_FormControl::GetExportValue() { CFX_WideString csWOn = PDF_DecodeText(csOn); return csWOn; } -FX_BOOL CPDF_FormControl::IsChecked() { + +bool CPDF_FormControl::IsChecked() const { ASSERT(GetType() == CPDF_FormField::CheckBox || GetType() == CPDF_FormField::RadioButton); CFX_ByteString csOn = GetOnStateName(); CFX_ByteString csAS = m_pWidgetDict->GetStringBy("AS"); return csAS == csOn; } -FX_BOOL CPDF_FormControl::IsDefaultChecked() { + +bool CPDF_FormControl::IsDefaultChecked() const { ASSERT(GetType() == CPDF_FormField::CheckBox || GetType() == CPDF_FormField::RadioButton); CPDF_Object* pDV = FPDF_GetFieldAttr(m_pField->m_pDict, "DV"); @@ -130,6 +132,7 @@ FX_BOOL CPDF_FormControl::IsDefaultChecked() { CFX_ByteString csOn = GetOnStateName(); return (csDV == csOn); } + void CPDF_FormControl::CheckControl(FX_BOOL bChecked) { ASSERT(GetType() == CPDF_FormField::CheckBox || GetType() == CPDF_FormField::RadioButton); |