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 . --- fpdfsdk/src/fsdk_baseform.cpp | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'fpdfsdk/src/fsdk_baseform.cpp') diff --git a/fpdfsdk/src/fsdk_baseform.cpp b/fpdfsdk/src/fsdk_baseform.cpp index 66e843473d..b2480941bc 100644 --- a/fpdfsdk/src/fsdk_baseform.cpp +++ b/fpdfsdk/src/fsdk_baseform.cpp @@ -459,7 +459,7 @@ void CPDFSDK_Widget::SynchronizeXFAItems(IXFA_DocView* pXFADocView, FX_BOOL CPDFSDK_Widget::IsWidgetAppearanceValid( CPDF_Annot::AppearanceMode mode) { - CPDF_Dictionary* pAP = m_pAnnot->GetAnnotDict()->GetDict("AP"); + CPDF_Dictionary* pAP = m_pAnnot->GetAnnotDict()->GetDictBy("AP"); if (!pAP) return FALSE; @@ -488,7 +488,7 @@ FX_BOOL CPDFSDK_Widget::IsWidgetAppearanceValid( case FIELDTYPE_CHECKBOX: case FIELDTYPE_RADIOBUTTON: if (CPDF_Dictionary* pSubDict = psub->AsDictionary()) { - return pSubDict->GetStream(GetAppState()) != NULL; + return pSubDict->GetStreamBy(GetAppState()) != NULL; } return FALSE; } @@ -993,21 +993,21 @@ void CPDFSDK_Widget::ResetAppearance_PushButton() { if (pNormalIcon) { if (CPDF_Dictionary* pImageDict = pNormalIcon->GetDict()) { - if (pImageDict->GetString("Name").IsEmpty()) + if (pImageDict->GetStringBy("Name").IsEmpty()) pImageDict->SetAtString("Name", "ImgA"); } } if (pRolloverIcon) { if (CPDF_Dictionary* pImageDict = pRolloverIcon->GetDict()) { - if (pImageDict->GetString("Name").IsEmpty()) + if (pImageDict->GetStringBy("Name").IsEmpty()) pImageDict->SetAtString("Name", "ImgB"); } } if (pDownIcon) { if (CPDF_Dictionary* pImageDict = pDownIcon->GetDict()) { - if (pImageDict->GetString("Name").IsEmpty()) + if (pImageDict->GetStringBy("Name").IsEmpty()) pImageDict->SetAtString("Name", "ImgC"); } } @@ -1846,18 +1846,18 @@ void CPDFSDK_Widget::AddImageToAppearance(const CFX_ByteString& sAPType, CPDF_Document* pDoc = m_pPageView->GetPDFDocument(); ASSERT(pDoc); - CPDF_Dictionary* pAPDict = m_pAnnot->GetAnnotDict()->GetDict("AP"); - CPDF_Stream* pStream = pAPDict->GetStream(sAPType); + CPDF_Dictionary* pAPDict = m_pAnnot->GetAnnotDict()->GetDictBy("AP"); + CPDF_Stream* pStream = pAPDict->GetStreamBy(sAPType); CPDF_Dictionary* pStreamDict = pStream->GetDict(); CFX_ByteString sImageAlias = "IMG"; if (CPDF_Dictionary* pImageDict = pImage->GetDict()) { - sImageAlias = pImageDict->GetString("Name"); + sImageAlias = pImageDict->GetStringBy("Name"); if (sImageAlias.IsEmpty()) sImageAlias = "IMG"; } - CPDF_Dictionary* pStreamResList = pStreamDict->GetDict("Resources"); + CPDF_Dictionary* pStreamResList = pStreamDict->GetDictBy("Resources"); if (!pStreamResList) { pStreamResList = new CPDF_Dictionary(); pStreamDict->SetAt("Resources", pStreamResList); @@ -1871,7 +1871,7 @@ void CPDFSDK_Widget::AddImageToAppearance(const CFX_ByteString& sAPType, } void CPDFSDK_Widget::RemoveAppearance(const CFX_ByteString& sAPType) { - if (CPDF_Dictionary* pAPDict = m_pAnnot->GetAnnotDict()->GetDict("AP")) { + if (CPDF_Dictionary* pAPDict = m_pAnnot->GetAnnotDict()->GetDictBy("AP")) { pAPDict->RemoveAt(sAPType); } } @@ -2078,7 +2078,7 @@ CPDFSDK_Widget* CPDFSDK_InterForm::GetWidget(CPDF_FormControl* pControl) const { CPDF_Document* pDocument = m_pDocument->GetPDFDocument(); CPDFSDK_PageView* pPage = nullptr; - if (CPDF_Dictionary* pPageDict = pControlDict->GetDict("P")) { + if (CPDF_Dictionary* pPageDict = pControlDict->GetDictBy("P")) { int nPageIndex = pDocument->GetPageIndex(pPageDict->GetObjNum()); if (nPageIndex >= 0) { pPage = m_pDocument->GetPageView(nPageIndex); @@ -2126,7 +2126,7 @@ int CPDFSDK_InterForm::GetPageIndexByAnnotDict( for (int i = 0, sz = pDocument->GetPageCount(); i < sz; i++) { if (CPDF_Dictionary* pPageDict = pDocument->GetPage(i)) { - if (CPDF_Array* pAnnots = pPageDict->GetArray("Annots")) { + if (CPDF_Array* pAnnots = pPageDict->GetArrayBy("Annots")) { for (int j = 0, jsz = pAnnots->GetCount(); j < jsz; j++) { CPDF_Object* pDict = pAnnots->GetElementValue(j); if (pAnnotDict == pDict) { @@ -2450,25 +2450,25 @@ FX_BOOL CPDFSDK_InterForm::FDFToURLEncodedData(uint8_t*& pBuf, FX_STRSIZE& nBufSize) { CFDF_Document* pFDF = CFDF_Document::ParseMemory(pBuf, nBufSize); if (pFDF) { - CPDF_Dictionary* pMainDict = pFDF->GetRoot()->GetDict("FDF"); + CPDF_Dictionary* pMainDict = pFDF->GetRoot()->GetDictBy("FDF"); if (!pMainDict) return FALSE; // Get fields - CPDF_Array* pFields = pMainDict->GetArray("Fields"); + CPDF_Array* pFields = pMainDict->GetArrayBy("Fields"); if (!pFields) return FALSE; CFX_ByteTextBuf fdfEncodedData; for (FX_DWORD i = 0; i < pFields->GetCount(); i++) { - CPDF_Dictionary* pField = pFields->GetDict(i); + CPDF_Dictionary* pField = pFields->GetDictAt(i); if (!pField) continue; CFX_WideString name; - name = pField->GetUnicodeText("T"); + name = pField->GetUnicodeTextBy("T"); CFX_ByteString name_b = CFX_ByteString::FromUnicode(name); - CFX_ByteString csBValue = pField->GetString("V"); + CFX_ByteString csBValue = pField->GetStringBy("V"); CFX_WideString csWValue = PDF_DecodeText(csBValue); CFX_ByteString csValue_b = CFX_ByteString::FromUnicode(csWValue); @@ -2746,7 +2746,7 @@ CBA_AnnotIterator::CBA_AnnotIterator(CPDFSDK_PageView* pPageView, m_sSubType(sSubType), m_nTabs(BAI_STRUCTURE) { CPDF_Page* pPDFPage = m_pPageView->GetPDFPage(); - CFX_ByteString sTabs = pPDFPage->m_pFormDict->GetString("Tabs"); + CFX_ByteString sTabs = pPDFPage->m_pFormDict->GetStringBy("Tabs"); if (sTabs == "R") { m_nTabs = BAI_ROW; -- cgit v1.2.3