diff options
Diffstat (limited to 'core/fpdfapi/page/cpdf_docpagedata.cpp')
-rw-r--r-- | core/fpdfapi/page/cpdf_docpagedata.cpp | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/core/fpdfapi/page/cpdf_docpagedata.cpp b/core/fpdfapi/page/cpdf_docpagedata.cpp index 03db315912..9ac5c1e304 100644 --- a/core/fpdfapi/page/cpdf_docpagedata.cpp +++ b/core/fpdfapi/page/cpdf_docpagedata.cpp @@ -209,32 +209,33 @@ void CPDF_DocPageData::ReleaseFont(const CPDF_Dictionary* pFontDict) { } CPDF_ColorSpace* CPDF_DocPageData::GetColorSpace( - CPDF_Object* pCSObj, + const CPDF_Object* pCSObj, const CPDF_Dictionary* pResources) { - std::set<CPDF_Object*> visited; + std::set<const CPDF_Object*> visited; return GetColorSpaceGuarded(pCSObj, pResources, &visited); } CPDF_ColorSpace* CPDF_DocPageData::GetColorSpaceGuarded( - CPDF_Object* pCSObj, + const CPDF_Object* pCSObj, const CPDF_Dictionary* pResources, - std::set<CPDF_Object*>* pVisited) { - std::set<CPDF_Object*> visitedLocal; + std::set<const CPDF_Object*>* pVisited) { + std::set<const CPDF_Object*> visitedLocal; return GetColorSpaceInternal(pCSObj, pResources, pVisited, &visitedLocal); } CPDF_ColorSpace* CPDF_DocPageData::GetColorSpaceInternal( - CPDF_Object* pCSObj, + const CPDF_Object* pCSObj, const CPDF_Dictionary* pResources, - std::set<CPDF_Object*>* pVisited, - std::set<CPDF_Object*>* pVisitedInternal) { + std::set<const CPDF_Object*>* pVisited, + std::set<const CPDF_Object*>* pVisitedInternal) { if (!pCSObj) return nullptr; if (pdfium::ContainsKey(*pVisitedInternal, pCSObj)) return nullptr; - pdfium::ScopedSetInsertion<CPDF_Object*> insertion(pVisitedInternal, pCSObj); + pdfium::ScopedSetInsertion<const CPDF_Object*> insertion(pVisitedInternal, + pCSObj); if (pCSObj->IsName()) { ByteString name = pCSObj->GetString(); @@ -272,7 +273,7 @@ CPDF_ColorSpace* CPDF_DocPageData::GetColorSpaceInternal( pVisitedInternal); } - CPDF_Array* pArray = pCSObj->AsArray(); + const CPDF_Array* pArray = pCSObj->AsArray(); if (!pArray || pArray->IsEmpty()) return nullptr; @@ -304,7 +305,8 @@ CPDF_ColorSpace* CPDF_DocPageData::GetColorSpaceInternal( return csData->AddRef(); } -CPDF_ColorSpace* CPDF_DocPageData::GetCopiedColorSpace(CPDF_Object* pCSObj) { +CPDF_ColorSpace* CPDF_DocPageData::GetCopiedColorSpace( + const CPDF_Object* pCSObj) { if (!pCSObj) return nullptr; @@ -484,7 +486,7 @@ void CPDF_DocPageData::MaybePurgeFontFileStreamAcc( } CPDF_CountedColorSpace* CPDF_DocPageData::FindColorSpacePtr( - CPDF_Object* pCSObj) const { + const CPDF_Object* pCSObj) const { if (!pCSObj) return nullptr; |