summaryrefslogtreecommitdiff
path: root/core/fpdfapi
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi')
-rw-r--r--core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp4
-rw-r--r--core/fpdfapi/page/cpdf_contentparser.cpp12
-rw-r--r--core/fpdfapi/page/cpdf_pageobjectholder.h2
3 files changed, 9 insertions, 9 deletions
diff --git a/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp b/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp
index e9b134fa6b..107f54efdb 100644
--- a/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp
+++ b/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp
@@ -81,7 +81,7 @@ void CPDF_PageContentGenerator::GenerateContent() {
buf << "Q\n";
// Add buffer to a stream in page's 'Contents'
- CPDF_Dictionary* pPageDict = m_pObjHolder->m_pFormDict.Get();
+ CPDF_Dictionary* pPageDict = m_pObjHolder->GetFormDict();
CPDF_Object* pContent =
pPageDict ? pPageDict->GetObjectFor("Contents") : nullptr;
CPDF_Stream* pStream = pDoc->NewIndirect<CPDF_Stream>();
@@ -128,7 +128,7 @@ ByteString CPDF_PageContentGenerator::RealizeResource(
ASSERT(dwResourceObjNum);
if (!m_pObjHolder->m_pResources) {
m_pObjHolder->m_pResources = m_pDocument->NewIndirect<CPDF_Dictionary>();
- m_pObjHolder->m_pFormDict->SetNewFor<CPDF_Reference>(
+ m_pObjHolder->GetFormDict()->SetNewFor<CPDF_Reference>(
"Resources", m_pDocument.Get(),
m_pObjHolder->m_pResources->GetObjNum());
}
diff --git a/core/fpdfapi/page/cpdf_contentparser.cpp b/core/fpdfapi/page/cpdf_contentparser.cpp
index dcdf138779..f558ac823a 100644
--- a/core/fpdfapi/page/cpdf_contentparser.cpp
+++ b/core/fpdfapi/page/cpdf_contentparser.cpp
@@ -24,12 +24,12 @@
CPDF_ContentParser::CPDF_ContentParser(CPDF_Page* pPage)
: m_InternalStage(STAGE_GETCONTENT), m_pObjectHolder(pPage) {
- if (!pPage || !pPage->GetDocument() || !pPage->m_pFormDict) {
+ if (!pPage || !pPage->GetDocument() || !pPage->GetFormDict()) {
m_bIsDone = true;
return;
}
- CPDF_Object* pContent = pPage->m_pFormDict->GetDirectObjectFor("Contents");
+ CPDF_Object* pContent = pPage->GetFormDict()->GetDirectObjectFor("Contents");
if (!pContent) {
m_bIsDone = true;
return;
@@ -61,11 +61,11 @@ CPDF_ContentParser::CPDF_ContentParser(CPDF_Form* pForm,
: m_InternalStage(STAGE_PARSE),
m_pObjectHolder(pForm),
m_pType3Char(pType3Char) {
- CFX_Matrix form_matrix = pForm->m_pFormDict->GetMatrixFor("Matrix");
+ CFX_Matrix form_matrix = pForm->GetFormDict()->GetMatrixFor("Matrix");
if (pGraphicStates)
form_matrix.Concat(pGraphicStates->m_CTM);
- CPDF_Array* pBBox = pForm->m_pFormDict->GetArrayFor("BBox");
+ CPDF_Array* pBBox = pForm->GetFormDict()->GetArrayFor("BBox");
CFX_FloatRect form_bbox;
CPDF_Path ClipPath;
if (pBBox) {
@@ -82,7 +82,7 @@ CPDF_ContentParser::CPDF_ContentParser(CPDF_Form* pForm,
form_bbox = pParentMatrix->TransformRect(form_bbox);
}
- CPDF_Dictionary* pResources = pForm->m_pFormDict->GetDictFor("Resources");
+ CPDF_Dictionary* pResources = pForm->GetFormDict()->GetDictFor("Resources");
m_pParser = pdfium::MakeUnique<CPDF_StreamContentParser>(
pForm->GetDocument(), pForm->m_pPageResources.Get(),
pForm->m_pResources.Get(), pParentMatrix, pForm, pResources, form_bbox,
@@ -144,7 +144,7 @@ bool CPDF_ContentParser::Continue(PauseIndicatorIface* pPause) {
m_CurrentOffset = 0;
} else {
CPDF_Array* pContent =
- m_pObjectHolder->m_pFormDict->GetArrayFor("Contents");
+ m_pObjectHolder->GetFormDict()->GetArrayFor("Contents");
CPDF_Stream* pStreamObj = ToStream(
pContent ? pContent->GetDirectObjectAt(m_CurrentOffset) : nullptr);
m_StreamArray[m_CurrentOffset] =
diff --git a/core/fpdfapi/page/cpdf_pageobjectholder.h b/core/fpdfapi/page/cpdf_pageobjectholder.h
index 54c4f2b063..b26fc0d0e2 100644
--- a/core/fpdfapi/page/cpdf_pageobjectholder.h
+++ b/core/fpdfapi/page/cpdf_pageobjectholder.h
@@ -87,7 +87,6 @@ class CPDF_PageObjectHolder {
void Transform(const CFX_Matrix& matrix);
CFX_FloatRect CalcBoundingBox() const;
- const UnownedPtr<CPDF_Dictionary> m_pFormDict;
UnownedPtr<CPDF_Stream> m_pFormStream;
UnownedPtr<CPDF_Dictionary> m_pPageResources;
UnownedPtr<CPDF_Dictionary> m_pResources;
@@ -99,6 +98,7 @@ class CPDF_PageObjectHolder {
void LoadTransInfo();
+ const UnownedPtr<CPDF_Dictionary> m_pFormDict;
UnownedPtr<CPDF_Document> m_pDocument;
CFX_FloatRect m_BBox;
int m_iTransparency = 0;