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 /core/fpdfdoc/doc_basic.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 'core/fpdfdoc/doc_basic.cpp')
-rw-r--r-- | core/fpdfdoc/doc_basic.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/core/fpdfdoc/doc_basic.cpp b/core/fpdfdoc/doc_basic.cpp index 08d07e6c66..c711709e73 100644 --- a/core/fpdfdoc/doc_basic.cpp +++ b/core/fpdfdoc/doc_basic.cpp @@ -22,7 +22,7 @@ int CPDF_Dest::GetPageIndex(CPDF_Document* pDoc) { if (!pArray) return 0; - CPDF_Object* pPage = pArray->GetElementValue(0); + CPDF_Object* pPage = pArray->GetDirectObjectAt(0); if (!pPage) return 0; if (pPage->IsNumber()) @@ -36,7 +36,7 @@ uint32_t CPDF_Dest::GetPageObjNum() { if (!pArray) return 0; - CPDF_Object* pPage = pArray->GetElementValue(0); + CPDF_Object* pPage = pArray->GetDirectObjectAt(0); if (!pPage) return 0; if (pPage->IsNumber()) @@ -51,7 +51,7 @@ int CPDF_Dest::GetZoomMode() { if (!pArray) return 0; - CPDF_Object* pObj = pArray->GetElementValue(1); + CPDF_Object* pObj = pArray->GetDirectObjectAt(1); if (!pObj) return 0; @@ -116,7 +116,7 @@ static CPDF_Object* SearchNameNode(CPDF_Dictionary* pNode, break; } nIndex += i; - return pNames->GetElementValue(i * 2 + 1); + return pNames->GetDirectObjectAt(i * 2 + 1); } nIndex += dwCount; return NULL; @@ -158,7 +158,7 @@ static CPDF_Object* SearchNameNode(CPDF_Dictionary* pNode, *ppFind = pNames; } csName = pNames->GetStringAt((nIndex - nCurIndex) * 2); - return pNames->GetElementValue((nIndex - nCurIndex) * 2 + 1); + return pNames->GetDirectObjectAt((nIndex - nCurIndex) * 2 + 1); } CPDF_Array* pKids = pNode->GetArrayBy("Kids"); if (!pKids) { @@ -237,7 +237,7 @@ CPDF_Array* CPDF_NameTree::LookupNamedDest(CPDF_Document* pDoc, CPDF_Dictionary* pDests = pDoc->GetRoot()->GetDictBy("Dests"); if (!pDests) return nullptr; - pValue = pDests->GetElementValue(sName); + pValue = pDests->GetDirectObjectBy(sName); } if (!pValue) return nullptr; |