summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_docpagedata.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/page/cpdf_docpagedata.cpp')
-rw-r--r--core/fpdfapi/page/cpdf_docpagedata.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/core/fpdfapi/page/cpdf_docpagedata.cpp b/core/fpdfapi/page/cpdf_docpagedata.cpp
index 58e81559ea..435b0f2eec 100644
--- a/core/fpdfapi/page/cpdf_docpagedata.cpp
+++ b/core/fpdfapi/page/cpdf_docpagedata.cpp
@@ -28,7 +28,7 @@
#include "third_party/base/stl_util.h"
CPDF_DocPageData::CPDF_DocPageData(CPDF_Document* pPDFDoc)
- : m_pPDFDoc(pPDFDoc), m_bForceClear(false) {
+ : m_bForceClear(false), m_pPDFDoc(pPDFDoc) {
assert(m_pPDFDoc);
}
@@ -117,7 +117,8 @@ CPDF_Font* CPDF_DocPageData::GetFont(CPDF_Dictionary* pFontDict) {
return pFontData->AddRef();
}
}
- std::unique_ptr<CPDF_Font> pFont = CPDF_Font::Create(m_pPDFDoc, pFontDict);
+ std::unique_ptr<CPDF_Font> pFont =
+ CPDF_Font::Create(m_pPDFDoc.Get(), pFontDict);
if (!pFont)
return nullptr;
@@ -165,7 +166,7 @@ CPDF_Font* CPDF_DocPageData::GetStandardFont(const CFX_ByteString& fontName,
pEncoding->Realize(m_pPDFDoc->GetByteStringPool()));
}
- std::unique_ptr<CPDF_Font> pFont = CPDF_Font::Create(m_pPDFDoc, pDict);
+ std::unique_ptr<CPDF_Font> pFont = CPDF_Font::Create(m_pPDFDoc.Get(), pDict);
if (!pFont)
return nullptr;
@@ -268,7 +269,7 @@ CPDF_ColorSpace* CPDF_DocPageData::GetColorSpaceImpl(
}
std::unique_ptr<CPDF_ColorSpace> pCS =
- CPDF_ColorSpace::Load(m_pPDFDoc, pArray);
+ CPDF_ColorSpace::Load(m_pPDFDoc.Get(), pArray);
if (!pCS)
return nullptr;
@@ -329,18 +330,18 @@ CPDF_Pattern* CPDF_DocPageData::GetPattern(CPDF_Object* pPatternObj,
}
std::unique_ptr<CPDF_Pattern> pPattern;
if (bShading) {
- pPattern = pdfium::MakeUnique<CPDF_ShadingPattern>(m_pPDFDoc, pPatternObj,
- true, matrix);
+ pPattern = pdfium::MakeUnique<CPDF_ShadingPattern>(
+ m_pPDFDoc.Get(), pPatternObj, true, matrix);
} else {
CPDF_Dictionary* pDict = pPatternObj->GetDict();
if (pDict) {
int type = pDict->GetIntegerFor("PatternType");
if (type == CPDF_Pattern::TILING) {
- pPattern = pdfium::MakeUnique<CPDF_TilingPattern>(m_pPDFDoc,
+ pPattern = pdfium::MakeUnique<CPDF_TilingPattern>(m_pPDFDoc.Get(),
pPatternObj, matrix);
} else if (type == CPDF_Pattern::SHADING) {
pPattern = pdfium::MakeUnique<CPDF_ShadingPattern>(
- m_pPDFDoc, pPatternObj, false, matrix);
+ m_pPDFDoc.Get(), pPatternObj, false, matrix);
}
}
}
@@ -382,7 +383,7 @@ CFX_RetainPtr<CPDF_Image> CPDF_DocPageData::GetImage(uint32_t dwStreamObjNum) {
if (it != m_ImageMap.end())
return it->second;
- auto pImage = pdfium::MakeRetain<CPDF_Image>(m_pPDFDoc, dwStreamObjNum);
+ auto pImage = pdfium::MakeRetain<CPDF_Image>(m_pPDFDoc.Get(), dwStreamObjNum);
m_ImageMap[dwStreamObjNum] = pImage;
return pImage;
}