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_ocg.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'core/fpdfdoc/doc_ocg.cpp') diff --git a/core/fpdfdoc/doc_ocg.cpp b/core/fpdfdoc/doc_ocg.cpp index 43ccc3fd8d..a739c1675c 100644 --- a/core/fpdfdoc/doc_ocg.cpp +++ b/core/fpdfdoc/doc_ocg.cpp @@ -26,7 +26,7 @@ static int32_t FPDFDOC_OCG_FindGroup(const CPDF_Object* pObject, static FX_BOOL FPDFDOC_OCG_HasIntent(const CPDF_Dictionary* pDict, const CFX_ByteStringC& csElement, const CFX_ByteStringC& csDef = "") { - CPDF_Object* pIntent = pDict->GetElementValue("Intent"); + CPDF_Object* pIntent = pDict->GetDirectObjectBy("Intent"); if (!pIntent) { return csElement == csDef; } @@ -198,7 +198,7 @@ FX_BOOL CPDF_OCContext::GetOCGVE(CPDF_Array* pExpression, CPDF_Object* pOCGObj; CFX_ByteString csOperator = pExpression->GetStringAt(0); if (csOperator == "Not") { - pOCGObj = pExpression->GetElementValue(1); + pOCGObj = pExpression->GetDirectObjectAt(1); if (!pOCGObj) return FALSE; if (CPDF_Dictionary* pDict = pOCGObj->AsDictionary()) @@ -210,7 +210,7 @@ FX_BOOL CPDF_OCContext::GetOCGVE(CPDF_Array* pExpression, if (csOperator == "Or" || csOperator == "And") { FX_BOOL bValue = FALSE; for (int32_t i = 1; i < iCount; i++) { - pOCGObj = pExpression->GetElementValue(1); + pOCGObj = pExpression->GetDirectObjectAt(1); if (!pOCGObj) { continue; } @@ -241,7 +241,7 @@ FX_BOOL CPDF_OCContext::LoadOCMDState(const CPDF_Dictionary* pOCMDDict, return GetOCGVE(pVE, bFromConfig); } CFX_ByteString csP = pOCMDDict->GetStringBy("P", "AnyOn"); - CPDF_Object* pOCGObj = pOCMDDict->GetElementValue("OCGs"); + CPDF_Object* pOCGObj = pOCMDDict->GetDirectObjectBy("OCGs"); if (!pOCGObj) return TRUE; if (const CPDF_Dictionary* pDict = pOCGObj->AsDictionary()) -- cgit v1.2.3