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

Unified Diff: fpdfsdk/fpdfppo.cpp

Issue 1841173002: Rename GetElementValue() to GetDirectObject{By,At}(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Fix test name Created 4 years, 9 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
« no previous file with comments | « fpdfsdk/fpdfeditpage.cpp ('k') | fpdfsdk/fpdfsave.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/fpdfppo.cpp
diff --git a/fpdfsdk/fpdfppo.cpp b/fpdfsdk/fpdfppo.cpp
index 7484a3e85f16154f8114d9ef7b2f407876a39cdf..94fa6bae84fe0398f19b3d1a8c5430fb6af544a9 100644
--- a/fpdfsdk/fpdfppo.cpp
+++ b/fpdfsdk/fpdfppo.cpp
@@ -69,7 +69,7 @@ FX_BOOL CPDF_PageOrganizer::PDFDocInit(CPDF_Document* pDestPDFDoc,
pNewRoot->SetAt("Type", new CPDF_Name("Catalog"));
}
- CPDF_Object* pElement = pNewRoot->GetElement("Pages");
+ CPDF_Object* pElement = pNewRoot->GetObjectBy("Pages");
CPDF_Dictionary* pNewPages =
pElement ? ToDictionary(pElement->GetDirect()) : nullptr;
if (!pNewPages) {
@@ -184,25 +184,25 @@ CPDF_Object* CPDF_PageOrganizer::PageDictGetInheritableTag(
if (!pDict->KeyExist("Parent") || !pDict->KeyExist("Type"))
return nullptr;
- CPDF_Object* pType = pDict->GetElement("Type")->GetDirect();
+ CPDF_Object* pType = pDict->GetObjectBy("Type")->GetDirect();
if (!ToName(pType))
return nullptr;
if (pType->GetString().Compare("Page"))
return nullptr;
- CPDF_Dictionary* pp = ToDictionary(pDict->GetElement("Parent")->GetDirect());
+ CPDF_Dictionary* pp = ToDictionary(pDict->GetObjectBy("Parent")->GetDirect());
if (!pp)
return nullptr;
if (pDict->KeyExist((const char*)nSrctag))
- return pDict->GetElement((const char*)nSrctag);
+ return pDict->GetObjectBy((const char*)nSrctag);
while (pp) {
if (pp->KeyExist((const char*)nSrctag))
- return pp->GetElement((const char*)nSrctag);
+ return pp->GetObjectBy((const char*)nSrctag);
if (!pp->KeyExist("Parent"))
break;
- pp = ToDictionary(pp->GetElement("Parent")->GetDirect());
+ pp = ToDictionary(pp->GetObjectBy("Parent")->GetDirect());
}
return nullptr;
}
@@ -243,7 +243,7 @@ FX_BOOL CPDF_PageOrganizer::UpdateReference(CPDF_Object* pObj,
CPDF_Array* pArray = pObj->AsArray();
uint32_t count = pArray->GetCount();
for (uint32_t i = 0; i < count; ++i) {
- CPDF_Object* pNextObj = pArray->GetElement(i);
+ CPDF_Object* pNextObj = pArray->GetObjectAt(i);
if (!pNextObj)
return FALSE;
if (!UpdateReference(pNextObj, pDoc, pObjNumberMap))
« no previous file with comments | « fpdfsdk/fpdfeditpage.cpp ('k') | fpdfsdk/fpdfsave.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698