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/fpdfapi/fpdf_page/cpdf_shadingpattern.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/fpdfapi/fpdf_page/cpdf_shadingpattern.cpp')
-rw-r--r-- | core/fpdfapi/fpdf_page/cpdf_shadingpattern.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/fpdfapi/fpdf_page/cpdf_shadingpattern.cpp b/core/fpdfapi/fpdf_page/cpdf_shadingpattern.cpp index 6ccf1403f9..4ca9acbea7 100644 --- a/core/fpdfapi/fpdf_page/cpdf_shadingpattern.cpp +++ b/core/fpdfapi/fpdf_page/cpdf_shadingpattern.cpp @@ -39,7 +39,7 @@ CPDF_ShadingPattern::CPDF_ShadingPattern(CPDF_Document* pDoc, if (!bShading) { CPDF_Dictionary* pDict = m_pPatternObj->GetDict(); m_Pattern2Form = pDict->GetMatrixBy("Matrix"); - m_pShadingObj = pDict->GetElementValue("Shading"); + m_pShadingObj = pDict->GetDirectObjectBy("Shading"); if (parentMatrix) m_Pattern2Form.Concat(*parentMatrix); } @@ -70,19 +70,19 @@ FX_BOOL CPDF_ShadingPattern::Load() { delete m_pFunctions[i]; m_nFuncs = 0; } - CPDF_Object* pFunc = pShadingDict->GetElementValue("Function"); + CPDF_Object* pFunc = pShadingDict->GetDirectObjectBy("Function"); if (pFunc) { if (CPDF_Array* pArray = pFunc->AsArray()) { m_nFuncs = std::min<int>(pArray->GetCount(), 4); for (int i = 0; i < m_nFuncs; i++) - m_pFunctions[i] = CPDF_Function::Load(pArray->GetElementValue(i)); + m_pFunctions[i] = CPDF_Function::Load(pArray->GetDirectObjectAt(i)); } else { m_pFunctions[0] = CPDF_Function::Load(pFunc); m_nFuncs = 1; } } - CPDF_Object* pCSObj = pShadingDict->GetElementValue("ColorSpace"); + CPDF_Object* pCSObj = pShadingDict->GetDirectObjectBy("ColorSpace"); if (!pCSObj) return FALSE; |