summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi/fpdf_parser/fpdf_parser_document.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/fpdfapi/fpdf_parser/fpdf_parser_document.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/fpdfapi/fpdf_parser/fpdf_parser_document.cpp')
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp
index 6bb30c085a..be55a56d0f 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp
@@ -15,17 +15,17 @@ namespace {
int CountPages(CPDF_Dictionary* pPages,
std::set<CPDF_Dictionary*>* visited_pages) {
- int count = pPages->GetInteger("Count");
+ int count = pPages->GetIntegerBy("Count");
if (count > 0 && count < FPDF_PAGE_MAX_NUM) {
return count;
}
- CPDF_Array* pKidList = pPages->GetArray("Kids");
+ CPDF_Array* pKidList = pPages->GetArrayBy("Kids");
if (!pKidList) {
return 0;
}
count = 0;
for (FX_DWORD i = 0; i < pKidList->GetCount(); i++) {
- CPDF_Dictionary* pKid = pKidList->GetDict(i);
+ CPDF_Dictionary* pKid = pKidList->GetDictAt(i);
if (!pKid || pdfium::ContainsKey(*visited_pages, pKid)) {
continue;
}
@@ -85,8 +85,8 @@ void CPDF_Document::LoadDoc() {
}
CPDF_Array* pIDArray = m_pParser->GetIDArray();
if (pIDArray) {
- m_ID1 = pIDArray->GetString(0);
- m_ID2 = pIDArray->GetString(1);
+ m_ID1 = pIDArray->GetStringAt(0);
+ m_ID2 = pIDArray->GetStringAt(1);
}
m_PageList.SetSize(RetrievePageCount());
}
@@ -102,8 +102,8 @@ void CPDF_Document::LoadAsynDoc(CPDF_Dictionary* pLinearized) {
m_pInfoDict = pIndirectObj ? pIndirectObj->GetDict() : nullptr;
CPDF_Array* pIDArray = m_pParser->GetIDArray();
if (pIDArray) {
- m_ID1 = pIDArray->GetString(0);
- m_ID2 = pIDArray->GetString(1);
+ m_ID1 = pIDArray->GetStringAt(0);
+ m_ID2 = pIDArray->GetStringAt(1);
}
FX_DWORD dwPageCount = 0;
CPDF_Object* pCount = pLinearized->GetElement("N");
@@ -136,7 +136,7 @@ CPDF_Dictionary* CPDF_Document::_FindPDFPage(CPDF_Dictionary* pPages,
int iPage,
int nPagesToGo,
int level) {
- CPDF_Array* pKidList = pPages->GetArray("Kids");
+ CPDF_Array* pKidList = pPages->GetArrayBy("Kids");
if (!pKidList) {
if (nPagesToGo == 0) {
return pPages;
@@ -148,7 +148,7 @@ CPDF_Dictionary* CPDF_Document::_FindPDFPage(CPDF_Dictionary* pPages,
}
int nKids = pKidList->GetCount();
for (int i = 0; i < nKids; i++) {
- CPDF_Dictionary* pKid = pKidList->GetDict(i);
+ CPDF_Dictionary* pKid = pKidList->GetDictAt(i);
if (!pKid) {
nPagesToGo--;
continue;
@@ -163,7 +163,7 @@ CPDF_Dictionary* CPDF_Document::_FindPDFPage(CPDF_Dictionary* pPages,
m_PageList.SetAt(iPage - nPagesToGo, pKid->GetObjNum());
nPagesToGo--;
} else {
- int nPages = pKid->GetInteger("Count");
+ int nPages = pKid->GetIntegerBy("Count");
if (nPagesToGo < nPages) {
return _FindPDFPage(pKid, iPage, nPagesToGo, level + 1);
}
@@ -194,7 +194,7 @@ CPDF_Dictionary* CPDF_Document::GetPage(int iPage) {
if (!pRoot)
return nullptr;
- CPDF_Dictionary* pPages = pRoot->GetDict("Pages");
+ CPDF_Dictionary* pPages = pRoot->GetDictBy("Pages");
if (!pPages)
return nullptr;
@@ -212,14 +212,14 @@ int CPDF_Document::_FindPageIndex(CPDF_Dictionary* pNode,
int& index,
int level) {
if (pNode->KeyExist("Kids")) {
- CPDF_Array* pKidList = pNode->GetArray("Kids");
+ CPDF_Array* pKidList = pNode->GetArrayBy("Kids");
if (!pKidList) {
return -1;
}
if (level >= FX_MAX_PAGE_LEVEL) {
return -1;
}
- FX_DWORD count = pNode->GetInteger("Count");
+ FX_DWORD count = pNode->GetIntegerBy("Count");
if (count <= skip_count) {
skip_count -= count;
index += count;
@@ -236,7 +236,7 @@ int CPDF_Document::_FindPageIndex(CPDF_Dictionary* pNode,
}
}
for (FX_DWORD i = 0; i < pKidList->GetCount(); i++) {
- CPDF_Dictionary* pKid = pKidList->GetDict(i);
+ CPDF_Dictionary* pKid = pKidList->GetDictAt(i);
if (!pKid) {
continue;
}
@@ -278,7 +278,7 @@ int CPDF_Document::GetPageIndex(FX_DWORD objnum) {
if (!pRoot) {
return -1;
}
- CPDF_Dictionary* pPages = pRoot->GetDict("Pages");
+ CPDF_Dictionary* pPages = pRoot->GetDictBy("Pages");
if (!pPages) {
return -1;
}
@@ -294,7 +294,7 @@ int CPDF_Document::RetrievePageCount() const {
if (!pRoot) {
return 0;
}
- CPDF_Dictionary* pPages = pRoot->GetDict("Pages");
+ CPDF_Dictionary* pPages = pRoot->GetDictBy("Pages");
if (!pPages) {
return 0;
}
@@ -321,7 +321,7 @@ FX_BOOL CPDF_Document::IsFormStream(FX_DWORD objnum, FX_BOOL& bForm) const {
auto it = m_IndirectObjs.find(objnum);
if (it != m_IndirectObjs.end()) {
CPDF_Stream* pStream = it->second->AsStream();
- bForm = pStream && pStream->GetDict()->GetString("Subtype") == "Form";
+ bForm = pStream && pStream->GetDict()->GetStringBy("Subtype") == "Form";
return TRUE;
}
if (!m_pParser) {