From ed5d7aa789ec5ef7b440d7e56b71804b41a928e3 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Tue, 2 Feb 2016 16:02:03 -0800 Subject: 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 . --- core/src/fpdfdoc/doc_formcontrol.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 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 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); -- cgit v1.2.3