diff options
author | Lei Zhang <thestig@chromium.org> | 2018-05-07 23:36:26 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-05-07 23:36:26 +0000 |
commit | 8f63763317ae1ef65d1ac2719624adeb728f2207 (patch) | |
tree | b4d7e2c8edd8a84e0bc197f29a3ac05532077e44 /core | |
parent | 4c31a13a704850fdf301fb561ba966baa3c7c29c (diff) | |
download | pdfium-8f63763317ae1ef65d1ac2719624adeb728f2207.tar.xz |
Make more CPDF_PageObjectHolder members protected.
Change-Id: Id31b9f6ac33971c47cdb378ff7f9ca7d33f899b9
Reviewed-on: https://pdfium-review.googlesource.com/32112
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core')
-rw-r--r-- | core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp | 2 | ||||
-rw-r--r-- | core/fpdfapi/page/cpdf_contentparser.cpp | 8 | ||||
-rw-r--r-- | core/fpdfapi/page/cpdf_pageobjectholder.h | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp b/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp index 92b92ecf01..e9b134fa6b 100644 --- a/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp +++ b/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp @@ -52,7 +52,7 @@ bool GetColor(const CPDF_Color* pColor, float* rgb) { CPDF_PageContentGenerator::CPDF_PageContentGenerator( CPDF_PageObjectHolder* pObjHolder) - : m_pObjHolder(pObjHolder), m_pDocument(pObjHolder->m_pDocument.Get()) { + : m_pObjHolder(pObjHolder), m_pDocument(pObjHolder->GetDocument()) { for (const auto& pObj : *pObjHolder->GetPageObjectList()) { if (pObj) m_pageObjects.emplace_back(pObj.get()); diff --git a/core/fpdfapi/page/cpdf_contentparser.cpp b/core/fpdfapi/page/cpdf_contentparser.cpp index 0b11da5554..dcdf138779 100644 --- a/core/fpdfapi/page/cpdf_contentparser.cpp +++ b/core/fpdfapi/page/cpdf_contentparser.cpp @@ -24,7 +24,7 @@ CPDF_ContentParser::CPDF_ContentParser(CPDF_Page* pPage) : m_InternalStage(STAGE_GETCONTENT), m_pObjectHolder(pPage) { - if (!pPage || !pPage->m_pDocument || !pPage->m_pFormDict) { + if (!pPage || !pPage->GetDocument() || !pPage->m_pFormDict) { m_bIsDone = true; return; } @@ -84,7 +84,7 @@ CPDF_ContentParser::CPDF_ContentParser(CPDF_Form* pForm, CPDF_Dictionary* pResources = pForm->m_pFormDict->GetDictFor("Resources"); m_pParser = pdfium::MakeUnique<CPDF_StreamContentParser>( - pForm->m_pDocument.Get(), pForm->m_pPageResources.Get(), + pForm->GetDocument(), pForm->m_pPageResources.Get(), pForm->m_pResources.Get(), pParentMatrix, pForm, pResources, form_bbox, pGraphicStates, parsedSet); m_pParser->GetCurStates()->m_CTM = form_matrix; @@ -157,10 +157,10 @@ bool CPDF_ContentParser::Continue(PauseIndicatorIface* pPause) { if (!m_pParser) { m_parsedSet = pdfium::MakeUnique<std::set<const uint8_t*>>(); m_pParser = pdfium::MakeUnique<CPDF_StreamContentParser>( - m_pObjectHolder->m_pDocument.Get(), + m_pObjectHolder->GetDocument(), m_pObjectHolder->m_pPageResources.Get(), nullptr, nullptr, m_pObjectHolder.Get(), m_pObjectHolder->m_pResources.Get(), - m_pObjectHolder->m_BBox, nullptr, m_parsedSet.get()); + m_pObjectHolder->GetBBox(), nullptr, m_parsedSet.get()); m_pParser->GetCurStates()->m_ColorState.SetDefault(); } if (m_CurrentOffset >= m_Size) { diff --git a/core/fpdfapi/page/cpdf_pageobjectholder.h b/core/fpdfapi/page/cpdf_pageobjectholder.h index 98cd97adb2..54c4f2b063 100644 --- a/core/fpdfapi/page/cpdf_pageobjectholder.h +++ b/core/fpdfapi/page/cpdf_pageobjectholder.h @@ -89,18 +89,18 @@ class CPDF_PageObjectHolder { const UnownedPtr<CPDF_Dictionary> m_pFormDict; UnownedPtr<CPDF_Stream> m_pFormStream; - UnownedPtr<CPDF_Document> m_pDocument; UnownedPtr<CPDF_Dictionary> m_pPageResources; UnownedPtr<CPDF_Dictionary> m_pResources; std::map<GraphicsData, ByteString> m_GraphicsMap; std::map<FontData, ByteString> m_FontsMap; - CFX_FloatRect m_BBox; protected: enum ParseState { CONTENT_NOT_PARSED, CONTENT_PARSING, CONTENT_PARSED }; void LoadTransInfo(); + UnownedPtr<CPDF_Document> m_pDocument; + CFX_FloatRect m_BBox; int m_iTransparency = 0; bool m_bBackgroundAlphaNeeded = false; std::vector<CFX_FloatRect> m_MaskBoundingBoxes; |