diff options
author | Lei Zhang <thestig@chromium.org> | 2018-06-05 17:33:52 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-06-05 17:33:52 +0000 |
commit | 799468b2917eab7ea5752b7db6b9ace9da96f4c3 (patch) | |
tree | 57bf63c58ecf49c85fcf85da750d71b4bbc6714e | |
parent | d3d8287e143daf12a602a919c120b4e0c656abf8 (diff) | |
download | pdfium-799468b2917eab7ea5752b7db6b9ace9da96f4c3.tar.xz |
Move CPDF_PageObjectHolder::m_pFormStream to CPDF_Form.
This member variable is only used in the CPDF_Form subclass.
Change-Id: Ib922228e51f5c3b370027e565d04ffe47374a320
Reviewed-on: https://pdfium-review.googlesource.com/33830
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
-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; |