diff options
author | tsepez <tsepez@chromium.org> | 2016-03-29 14:51:50 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-29 14:51:50 -0700 |
commit | bd56755ba86f2d87e24a3cee5cb92aa14a81bb27 (patch) | |
tree | fb4692dc44cb549b7149be080ec26f4b7cd7b086 /fpdfsdk/fpdfppo.cpp | |
parent | 7f432a1c87014d6673ee69ff0ffa3724f237acf4 (diff) | |
download | pdfium-bd56755ba86f2d87e24a3cee5cb92aa14a81bb27.tar.xz |
Rename GetElementValue() to GetDirectObject{By,At}().
Every time I read this code, I have to make the mental substituion
that "Element value" means "de-ref indirect object", so it might
as well just say so.
BUG=
Review URL: https://codereview.chromium.org/1841173002
Diffstat (limited to 'fpdfsdk/fpdfppo.cpp')
-rw-r--r-- | fpdfsdk/fpdfppo.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fpdfsdk/fpdfppo.cpp b/fpdfsdk/fpdfppo.cpp index 7484a3e85f..94fa6bae84 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)) |