summaryrefslogtreecommitdiff
path: root/core/src/fpdfdoc/doc_formfield.cpp
diff options
context:
space:
mode:
authorWei Li <weili@chromium.org>2016-01-29 15:44:20 -0800
committerWei Li <weili@chromium.org>2016-01-29 15:44:20 -0800
commit9b76113ae4567eb998618d049afde26d3f0175d5 (patch)
treeede02b9835770dafe91eaee727e328765e4ffd52 /core/src/fpdfdoc/doc_formfield.cpp
parent47f7199eee69abdd48c5ab16a5b8f5aef433a003 (diff)
downloadpdfium-9b76113ae4567eb998618d049afde26d3f0175d5.tar.xz
Merge to XFA: Member function name refactoring
This is needed by Cl 1634373003 as the name collision with virtual functions will be shown as warnings on Linux. Also, it is better to use different names for different cases. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1644633003 . (cherry picked from commit d45e7a51904164fb22049f0a7a80d2a94c06936b) Review URL: https://codereview.chromium.org/1648233002 .
Diffstat (limited to 'core/src/fpdfdoc/doc_formfield.cpp')
-rw-r--r--core/src/fpdfdoc/doc_formfield.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/core/src/fpdfdoc/doc_formfield.cpp b/core/src/fpdfdoc/doc_formfield.cpp
index 617acd4e99..39af0c94c7 100644
--- a/core/src/fpdfdoc/doc_formfield.cpp
+++ b/core/src/fpdfdoc/doc_formfield.cpp
@@ -408,7 +408,7 @@ int CPDF_FormField::GetMaxLen() {
CPDF_Dictionary* pWidgetDict = pControl->m_pWidgetDict;
if (pWidgetDict->KeyExist("MaxLen"))
- return pWidgetDict->GetInteger("MaxLen");
+ return pWidgetDict->GetIntegerBy("MaxLen");
}
return 0;
}
@@ -948,7 +948,7 @@ int CPDF_FormField::GetSelectedOptionIndex(int index) {
}
int iCount = (int)pArray->GetCount();
if (iCount > 0 && index < iCount) {
- return pArray->GetInteger(index);
+ return pArray->GetIntegerAt(index);
}
return -1;
}
@@ -963,7 +963,7 @@ FX_BOOL CPDF_FormField::IsOptionSelected(int iOptIndex) {
}
int iCount = (int)pArray->GetCount();
for (int i = 0; i < iCount; i++) {
- if (pArray->GetInteger(i) == iOptIndex) {
+ if (pArray->GetIntegerAt(i) == iOptIndex) {
return TRUE;
}
}
@@ -972,7 +972,7 @@ FX_BOOL CPDF_FormField::IsOptionSelected(int iOptIndex) {
FX_BOOL CPDF_FormField::SelectOption(int iOptIndex,
FX_BOOL bSelected,
FX_BOOL bNotify) {
- CPDF_Array* pArray = m_pDict->GetArray("I");
+ CPDF_Array* pArray = m_pDict->GetArrayBy("I");
if (!pArray) {
if (!bSelected) {
return TRUE;
@@ -982,7 +982,7 @@ FX_BOOL CPDF_FormField::SelectOption(int iOptIndex,
}
FX_BOOL bReturn = FALSE;
for (int i = 0; i < (int)pArray->GetCount(); i++) {
- int iFind = pArray->GetInteger(i);
+ int iFind = pArray->GetIntegerAt(i);
if (iFind == iOptIndex) {
if (bSelected) {
return TRUE;
@@ -1081,7 +1081,7 @@ void CPDF_FormField::LoadDA() {
DA = pObj_t->GetString();
}
if (DA.IsEmpty() && m_pForm->m_pFormDict) {
- DA = m_pForm->m_pFormDict->GetString("DA");
+ DA = m_pForm->m_pFormDict->GetStringBy("DA");
}
if (DA.IsEmpty()) {
return;
@@ -1090,10 +1090,11 @@ void CPDF_FormField::LoadDA() {
syntax.FindTagParam("Tf", 2);
CFX_ByteString font_name = syntax.GetWord();
CPDF_Dictionary* pFontDict = NULL;
- if (m_pForm->m_pFormDict && m_pForm->m_pFormDict->GetDict("DR") &&
- m_pForm->m_pFormDict->GetDict("DR")->GetDict("Font"))
- pFontDict = m_pForm->m_pFormDict->GetDict("DR")->GetDict("Font")->GetDict(
- font_name);
+ if (m_pForm->m_pFormDict && m_pForm->m_pFormDict->GetDictBy("DR") &&
+ m_pForm->m_pFormDict->GetDictBy("DR")->GetDictBy("Font"))
+ pFontDict = m_pForm->m_pFormDict->GetDictBy("DR")
+ ->GetDictBy("Font")
+ ->GetDictBy(font_name);
if (!pFontDict) {
return;