From 9b76113ae4567eb998618d049afde26d3f0175d5 Mon Sep 17 00:00:00 2001 From: Wei Li Date: Fri, 29 Jan 2016 15:44:20 -0800 Subject: 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 . --- core/src/fpdfdoc/doc_formfield.cpp | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'core/src/fpdfdoc/doc_formfield.cpp') 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; -- cgit v1.2.3