diff options
Diffstat (limited to 'core/fpdfapi')
-rw-r--r-- | core/fpdfapi/page/cpdf_contentparser.cpp | 2 | ||||
-rw-r--r-- | core/fpdfapi/page/cpdf_form.cpp | 4 | ||||
-rw-r--r-- | core/fpdfapi/page/cpdf_form.h | 4 | ||||
-rw-r--r-- | core/fpdfapi/page/cpdf_pageobjectholder.h | 2 |
4 files changed, 9 insertions, 3 deletions
diff --git a/core/fpdfapi/page/cpdf_contentparser.cpp b/core/fpdfapi/page/cpdf_contentparser.cpp index c74a889ff6..82f288f22b 100644 --- a/core/fpdfapi/page/cpdf_contentparser.cpp +++ b/core/fpdfapi/page/cpdf_contentparser.cpp @@ -106,7 +106,7 @@ CPDF_ContentParser::CPDF_ContentParser(CPDF_Form* pForm, pState->SetSoftMask(nullptr); } RetainPtr<CPDF_StreamAcc> pSingleStream = - pdfium::MakeRetain<CPDF_StreamAcc>(pForm->m_pFormStream.Get()); + pdfium::MakeRetain<CPDF_StreamAcc>(pForm->GetStream()); pSingleStream->LoadAllDataFiltered(); m_StreamArray.push_back(pSingleStream); } diff --git a/core/fpdfapi/page/cpdf_form.cpp b/core/fpdfapi/page/cpdf_form.cpp index a63d3ce96d..5132029072 100644 --- a/core/fpdfapi/page/cpdf_form.cpp +++ b/core/fpdfapi/page/cpdf_form.cpp @@ -50,3 +50,7 @@ void CPDF_Form::ParseContent(CPDF_AllStates* pGraphicStates, ContinueParse(nullptr); } + +const CPDF_Stream* CPDF_Form::GetStream() const { + return m_pFormStream.Get(); +} diff --git a/core/fpdfapi/page/cpdf_form.h b/core/fpdfapi/page/cpdf_form.h index 9f2987ddb6..155a6ae50f 100644 --- a/core/fpdfapi/page/cpdf_form.h +++ b/core/fpdfapi/page/cpdf_form.h @@ -32,8 +32,12 @@ class CPDF_Form : public CPDF_PageObjectHolder { CPDF_Type3Char* pType3Char, std::set<const uint8_t*>* parsedSet); + const CPDF_Stream* GetStream() const; + private: std::unique_ptr<std::set<const uint8_t*>> m_ParsedSet; + + UnownedPtr<CPDF_Stream> m_pFormStream; }; #endif // CORE_FPDFAPI_PAGE_CPDF_FORM_H_ diff --git a/core/fpdfapi/page/cpdf_pageobjectholder.h b/core/fpdfapi/page/cpdf_pageobjectholder.h index 61004444c0..816a294149 100644 --- a/core/fpdfapi/page/cpdf_pageobjectholder.h +++ b/core/fpdfapi/page/cpdf_pageobjectholder.h @@ -84,8 +84,6 @@ class CPDF_PageObjectHolder { void Transform(const CFX_Matrix& matrix); CFX_FloatRect CalcBoundingBox() const; - // TODO(thestig): Move |m_pFormStream| into CPDF_Form. - UnownedPtr<CPDF_Stream> m_pFormStream; UnownedPtr<CPDF_Dictionary> m_pPageResources; UnownedPtr<CPDF_Dictionary> m_pResources; std::map<GraphicsData, ByteString> m_GraphicsMap; |