Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Unified Diff: core/fpdfapi/fpdf_page/fpdf_page_doc.cpp

Issue 1841173002: Rename GetElementValue() to GetDirectObject{By,At}(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Fix test name Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fpdfapi/fpdf_page/cpdf_shadingpattern.cpp ('k') | core/fpdfapi/fpdf_page/fpdf_page_func.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_page/fpdf_page_doc.cpp
diff --git a/core/fpdfapi/fpdf_page/fpdf_page_doc.cpp b/core/fpdfapi/fpdf_page/fpdf_page_doc.cpp
index d762e1aa53c59f198bda96ee48d3c248654ed71d..9f4ad5a7d52f86310d9a5ced50c0629492d5b3ad 100644
--- a/core/fpdfapi/fpdf_page/fpdf_page_doc.cpp
+++ b/core/fpdfapi/fpdf_page/fpdf_page_doc.cpp
@@ -331,7 +331,7 @@ CPDF_ColorSpace* CPDF_DocPageData::GetColorSpace(
if (!pCS && pResources) {
CPDF_Dictionary* pList = pResources->GetDictBy("ColorSpace");
if (pList) {
- pCSObj = pList->GetElementValue(name);
+ pCSObj = pList->GetDirectObjectBy(name);
return GetColorSpace(pCSObj, nullptr);
}
}
@@ -345,13 +345,13 @@ CPDF_ColorSpace* CPDF_DocPageData::GetColorSpace(
CPDF_Object* pDefaultCS = nullptr;
switch (pCS->GetFamily()) {
case PDFCS_DEVICERGB:
- pDefaultCS = pColorSpaces->GetElementValue("DefaultRGB");
+ pDefaultCS = pColorSpaces->GetDirectObjectBy("DefaultRGB");
break;
case PDFCS_DEVICEGRAY:
- pDefaultCS = pColorSpaces->GetElementValue("DefaultGray");
+ pDefaultCS = pColorSpaces->GetDirectObjectBy("DefaultGray");
break;
case PDFCS_DEVICECMYK:
- pDefaultCS = pColorSpaces->GetElementValue("DefaultCMYK");
+ pDefaultCS = pColorSpaces->GetDirectObjectBy("DefaultCMYK");
break;
}
return pDefaultCS ? GetColorSpace(pDefaultCS, nullptr) : pCS;
@@ -361,7 +361,7 @@ CPDF_ColorSpace* CPDF_DocPageData::GetColorSpace(
if (!pArray || pArray->GetCount() == 0)
return nullptr;
if (pArray->GetCount() == 1)
- return GetColorSpace(pArray->GetElementValue(0), pResources);
+ return GetColorSpace(pArray->GetDirectObjectAt(0), pResources);
CPDF_CountedColorSpace* csData = nullptr;
auto it = m_ColorSpaceMap.find(pCSObj);
« no previous file with comments | « core/fpdfapi/fpdf_page/cpdf_shadingpattern.cpp ('k') | core/fpdfapi/fpdf_page/fpdf_page_func.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698