diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp | 4 | ||||
-rw-r--r-- | core/fpdfapi/page/cpdf_contentparser.cpp | 12 | ||||
-rw-r--r-- | core/fpdfapi/page/cpdf_pageobjectholder.h | 2 | ||||
-rw-r--r-- | core/fpdfdoc/cpdf_interform.cpp | 4 | ||||
-rw-r--r-- | core/fpdfdoc/cpdf_linklist.cpp | 4 |
5 files changed, 13 insertions, 13 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; diff --git a/core/fpdfdoc/cpdf_interform.cpp b/core/fpdfdoc/cpdf_interform.cpp index 6bf72fd5ef..0c548d8e0b 100644 --- a/core/fpdfdoc/cpdf_interform.cpp +++ b/core/fpdfdoc/cpdf_interform.cpp @@ -815,7 +815,7 @@ CPDF_FormControl* CPDF_InterForm::GetControlAtPoint(CPDF_Page* pPage, const CFX_PointF& point, int* z_order) const { - CPDF_Array* pAnnotList = pPage->m_pFormDict->GetArrayFor("Annots"); + CPDF_Array* pAnnotList = pPage->GetFormDict()->GetArrayFor("Annots"); if (!pAnnotList) return nullptr; @@ -964,7 +964,7 @@ bool CPDF_InterForm::HasXFAForm() const { } void CPDF_InterForm::FixPageFields(const CPDF_Page* pPage) { - CPDF_Dictionary* pPageDict = pPage->m_pFormDict.Get(); + const CPDF_Dictionary* pPageDict = pPage->GetFormDict(); if (!pPageDict) return; diff --git a/core/fpdfdoc/cpdf_linklist.cpp b/core/fpdfdoc/cpdf_linklist.cpp index 0620dbf32b..2f5d4aee3e 100644 --- a/core/fpdfdoc/cpdf_linklist.cpp +++ b/core/fpdfdoc/cpdf_linklist.cpp @@ -15,7 +15,7 @@ CPDF_LinkList::~CPDF_LinkList() {} const std::vector<CPDF_Dictionary*>* CPDF_LinkList::GetPageLinks( CPDF_Page* pPage) { - uint32_t objnum = pPage->m_pFormDict->GetObjNum(); + uint32_t objnum = pPage->GetFormDict()->GetObjNum(); if (objnum == 0) return nullptr; @@ -55,7 +55,7 @@ CPDF_Link CPDF_LinkList::GetLinkAtPoint(CPDF_Page* pPage, void CPDF_LinkList::LoadPageLinks(CPDF_Page* pPage, std::vector<CPDF_Dictionary*>* pList) { - CPDF_Array* pAnnotList = pPage->m_pFormDict->GetArrayFor("Annots"); + CPDF_Array* pAnnotList = pPage->GetFormDict()->GetArrayFor("Annots"); if (!pAnnotList) return; |