summaryrefslogtreecommitdiff
path: root/core/fpdfapi/fpdf_render
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/fpdf_render')
-rw-r--r--core/fpdfapi/fpdf_render/fpdf_render.cpp9
-rw-r--r--core/fpdfapi/fpdf_render/fpdf_render_image.cpp8
-rw-r--r--core/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp12
3 files changed, 15 insertions, 14 deletions
diff --git a/core/fpdfapi/fpdf_render/fpdf_render.cpp b/core/fpdfapi/fpdf_render/fpdf_render.cpp
index 216613cc61..52f29477a9 100644
--- a/core/fpdfapi/fpdf_render/fpdf_render.cpp
+++ b/core/fpdfapi/fpdf_render/fpdf_render.cpp
@@ -777,9 +777,10 @@ FX_BOOL CPDF_RenderStatus::ProcessTransparency(const CPDF_PageObject* pPageObj,
pDocument = pPageObj->AsImage()->m_pImage->GetDocument();
}
CPDF_Dictionary* pPageResources = pPage ? pPage->m_pPageResources : NULL;
- CPDF_Object* pCSObj =
- pPageObj->AsImage()->m_pImage->GetStream()->GetDict()->GetElementValue(
- "ColorSpace");
+ CPDF_Object* pCSObj = pPageObj->AsImage()
+ ->m_pImage->GetStream()
+ ->GetDict()
+ ->GetDirectObjectBy("ColorSpace");
CPDF_ColorSpace* pColorSpace =
pDocument->LoadColorSpace(pCSObj, pPageResources);
if (pColorSpace) {
@@ -1157,7 +1158,7 @@ CPDF_TransferFunc* CPDF_DocRenderData::GetTransferFunc(CPDF_Object* pObj) {
return nullptr;
for (uint32_t i = 0; i < 3; ++i) {
- pFuncs[2 - i].reset(CPDF_Function::Load(pArray->GetElementValue(i)));
+ pFuncs[2 - i].reset(CPDF_Function::Load(pArray->GetDirectObjectAt(i)));
if (!pFuncs[2 - i])
return nullptr;
}
diff --git a/core/fpdfapi/fpdf_render/fpdf_render_image.cpp b/core/fpdfapi/fpdf_render/fpdf_render_image.cpp
index ef452daa4e..ef2109a02f 100644
--- a/core/fpdfapi/fpdf_render/fpdf_render_image.cpp
+++ b/core/fpdfapi/fpdf_render/fpdf_render_image.cpp
@@ -408,7 +408,7 @@ FX_BOOL CPDF_ImageRenderer::StartRenderDIBSource() {
}
if (m_pRenderStatus->m_pDevice->GetDeviceClass() != FXDC_DISPLAY) {
CPDF_Object* pFilters =
- m_pImageObject->m_pImage->GetStream()->GetDict()->GetElementValue(
+ m_pImageObject->m_pImage->GetStream()->GetDict()->GetDirectObjectBy(
"Filter");
if (pFilters) {
if (pFilters->IsName()) {
@@ -452,7 +452,7 @@ FX_BOOL CPDF_ImageRenderer::StartRenderDIBSource() {
}
CPDF_Dictionary* pPageResources = pPage ? pPage->m_pPageResources : NULL;
CPDF_Object* pCSObj =
- m_pImageObject->m_pImage->GetStream()->GetDict()->GetElementValue(
+ m_pImageObject->m_pImage->GetStream()->GetDict()->GetDirectObjectBy(
"ColorSpace");
CPDF_ColorSpace* pColorSpace =
pDocument->LoadColorSpace(pCSObj, pPageResources);
@@ -889,7 +889,7 @@ CFX_DIBitmap* CPDF_RenderStatus::LoadSMask(CPDF_Dictionary* pSMaskDict,
return NULL;
}
std::unique_ptr<CPDF_Function> pFunc;
- CPDF_Object* pFuncObj = pSMaskDict->GetElementValue("TR");
+ CPDF_Object* pFuncObj = pSMaskDict->GetDirectObjectBy("TR");
if (pFuncObj && (pFuncObj->IsDictionary() || pFuncObj->IsStream()))
pFunc.reset(CPDF_Function::Load(pFuncObj));
@@ -919,7 +919,7 @@ CFX_DIBitmap* CPDF_RenderStatus::LoadSMask(CPDF_Dictionary* pSMaskDict,
if (pBC) {
CPDF_Dictionary* pDict = pGroup->GetDict();
if (pDict && pDict->GetDictBy("Group"))
- pCSObj = pDict->GetDictBy("Group")->GetElementValue("CS");
+ pCSObj = pDict->GetDictBy("Group")->GetDirectObjectBy("CS");
else
pCSObj = NULL;
pCS = m_pContext->GetDocument()->LoadColorSpace(pCSObj);
diff --git a/core/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp b/core/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
index 6ed50ead56..144de779e9 100644
--- a/core/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
+++ b/core/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
@@ -420,7 +420,7 @@ bool CPDF_DIBSource::LoadColorInfo(const CPDF_Dictionary* pFormResources,
if (m_bImageMask || !m_pDict->KeyExist("ColorSpace")) {
if (!m_bImageMask) {
- CPDF_Object* pFilter = m_pDict->GetElementValue("Filter");
+ CPDF_Object* pFilter = m_pDict->GetDirectObjectBy("Filter");
if (pFilter) {
CFX_ByteString filter;
if (pFilter->IsName()) {
@@ -442,7 +442,7 @@ bool CPDF_DIBSource::LoadColorInfo(const CPDF_Dictionary* pFormResources,
return true;
}
- CPDF_Object* pCSObj = m_pDict->GetElementValue("ColorSpace");
+ CPDF_Object* pCSObj = m_pDict->GetDirectObjectBy("ColorSpace");
if (!pCSObj)
return false;
@@ -508,7 +508,7 @@ DIB_COMP_DATA* CPDF_DIBSource::GetDecodeAndMaskArray(FX_BOOL& bDefaultDecode,
}
}
if (!m_pDict->KeyExist("SMask")) {
- CPDF_Object* pMask = m_pDict->GetElementValue("Mask");
+ CPDF_Object* pMask = m_pDict->GetDirectObjectBy("Mask");
if (!pMask) {
return pCompData;
}
@@ -727,7 +727,7 @@ CPDF_DIBSource* CPDF_DIBSource::LoadMask(uint32_t& MatteColor) {
return LoadMaskDIB(pSoftMask);
}
- if (CPDF_Stream* pStream = ToStream(m_pDict->GetElementValue("Mask")))
+ if (CPDF_Stream* pStream = ToStream(m_pDict->GetDirectObjectBy("Mask")))
return LoadMaskDIB(pStream);
return nullptr;
@@ -752,7 +752,7 @@ int CPDF_DIBSource::StratLoadMask() {
return StartLoadMaskDIB();
}
- m_pMaskStream = ToStream(m_pDict->GetElementValue("Mask"));
+ m_pMaskStream = ToStream(m_pDict->GetDirectObjectBy("Mask"));
return m_pMaskStream ? StartLoadMaskDIB() : 1;
}
@@ -879,7 +879,7 @@ void CPDF_DIBSource::LoadPalette() {
void CPDF_DIBSource::ValidateDictParam() {
m_bpc = m_bpc_orig;
- CPDF_Object* pFilter = m_pDict->GetElementValue("Filter");
+ CPDF_Object* pFilter = m_pDict->GetDirectObjectBy("Filter");
if (pFilter) {
if (pFilter->IsName()) {
CFX_ByteString filter = pFilter->GetString();