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

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

Issue 1653253002: Kill CFX_ByteArray in master. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: ... and its gone. Created 4 years, 11 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 feaff38f16ef0c936eae81b2bd2a67bf954e99a0..169e9d73b71276afff9f2d3000c8446ce4826e59 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);
« 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