summaryrefslogtreecommitdiff
path: root/core/fpdfapi
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-05-08 00:00:16 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-08 00:00:16 +0000
commite5c0fa97c2da104426dbc1cecfc0ed488a22efe5 (patch)
treef98799cbca4694a7f20fbc0816d422a1147368b8 /core/fpdfapi
parent8f63763317ae1ef65d1ac2719624adeb728f2207 (diff)
downloadpdfium-e5c0fa97c2da104426dbc1cecfc0ed488a22efe5.tar.xz
Make one more CPDF_PageObjectHolder member protected.
Change-Id: Id9288d504f063759f69632ab59b0a21569ff76d8 Reviewed-on: https://pdfium-review.googlesource.com/32113 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
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;