From bd56755ba86f2d87e24a3cee5cb92aa14a81bb27 Mon Sep 17 00:00:00 2001 From: tsepez Date: Tue, 29 Mar 2016 14:51:50 -0700 Subject: 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 --- core/fpdfdoc/doc_basic.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'core/fpdfdoc/doc_basic.cpp') 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; -- cgit v1.2.3