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

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

Issue 1194933003: Make CPDF_Object::GetString() a virtual method. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: rebase 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
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..f54a123a82e23b412d2edbf69549c05da8d664cd 100644
--- a/core/src/fpdfdoc/doc_formcontrol.cpp
+++ b/core/src/fpdfdoc/doc_formcontrol.cpp
@@ -46,7 +46,7 @@ void CPDF_FormControl::SetOnStateName(const CFX_ByteString& csOn)
if (csValue == "Off") {
csValue = "Yes";
}
- CFX_ByteString csAS = m_pWidgetDict->GetString("AS", "Off");
+ CFX_ByteString csAS = m_pWidgetDict->GetStringAt("AS", "Off");
if (csAS != "Off") {
m_pWidgetDict->SetAtName("AS", csValue);
}
@@ -104,7 +104,7 @@ CFX_WideString CPDF_FormControl::GetExportValue()
CPDF_Object* pOpt = FPDF_GetFieldAttr(m_pField->m_pDict, "Opt");
if (pOpt != NULL && pOpt->GetType() == PDFOBJ_ARRAY) {
int iIndex = m_pField->GetControlIndex(this);
- csOn = ((CPDF_Array*)pOpt)->GetString(iIndex);
+ csOn = ((CPDF_Array*)pOpt)->GetStringAt(iIndex);
}
}
if (csOn.IsEmpty()) {
@@ -117,7 +117,7 @@ FX_BOOL CPDF_FormControl::IsChecked()
{
ASSERT(GetType() == CPDF_FormField::CheckBox || GetType() == CPDF_FormField::RadioButton);
CFX_ByteString csOn = GetOnStateName();
- CFX_ByteString csAS = m_pWidgetDict->GetString("AS");
+ CFX_ByteString csAS = m_pWidgetDict->GetStringAt("AS");
return csAS == csOn;
}
FX_BOOL CPDF_FormControl::IsDefaultChecked()
@@ -135,7 +135,7 @@ void CPDF_FormControl::CheckControl(FX_BOOL bChecked)
{
ASSERT(GetType() == CPDF_FormField::CheckBox || GetType() == CPDF_FormField::RadioButton);
CFX_ByteString csOn = GetOnStateName();
- CFX_ByteString csOldAS = m_pWidgetDict->GetString("AS", "Off");
+ CFX_ByteString csOldAS = m_pWidgetDict->GetStringAt("AS", "Off");
CFX_ByteString csAS = "Off";
if (bChecked) {
csAS = csOn;
@@ -176,7 +176,7 @@ CPDF_FormControl::HighlightingMode CPDF_FormControl::GetHighlightingMode()
if (m_pWidgetDict == NULL) {
return Invert;
}
- CFX_ByteString csH = m_pWidgetDict->GetString("H", "I");
+ CFX_ByteString csH = m_pWidgetDict->GetStringAt("H", "I");
int i = 0;
while (g_sHighlightingMode[i][0] != '\0') {
if (csH.Equal(g_sHighlightingMode[i])) {
@@ -277,7 +277,7 @@ CPDF_DefaultAppearance CPDF_FormControl::GetDefaultAppearance()
return CFX_ByteString();
}
if (m_pWidgetDict->KeyExist("DA")) {
- return m_pWidgetDict->GetString("DA");
+ return m_pWidgetDict->GetStringAt("DA");
} else {
CPDF_Object* pObj = FPDF_GetFieldAttr(m_pField->m_pDict, "DA");
if (pObj == NULL) {

Powered by Google App Engine
This is Rietveld 408576698