diff options
author | thestig <thestig@chromium.org> | 2016-04-26 11:46:02 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-26 11:46:02 -0700 |
commit | 5cc24654fb345189140acb4711ff981e1c720951 (patch) | |
tree | 1e9e11a9136363e2b330ffbbce6fdf9e3827b5b1 /core/fpdfapi/fpdf_page/include | |
parent | 76c53794b6202ec37f6dcace5f2ae86870e953b6 (diff) | |
download | pdfium-5cc24654fb345189140acb4711ff981e1c720951.tar.xz |
Clean up CPDF_Page.
- Merge CPDF_Page::Load() into ctor.
- Remove always nullptr param for CPDF_Page::ParseContent().
- Remove unneeded indirection in IPDF_RenderModule.
- Delete CPDF_ParseOptions.
- Fix up CPDF_Pattern.
Review URL: https://codereview.chromium.org/1918113002
Diffstat (limited to 'core/fpdfapi/fpdf_page/include')
-rw-r--r-- | core/fpdfapi/fpdf_page/include/cpdf_form.h | 3 | ||||
-rw-r--r-- | core/fpdfapi/fpdf_page/include/cpdf_page.h | 26 |
2 files changed, 11 insertions, 18 deletions
diff --git a/core/fpdfapi/fpdf_page/include/cpdf_form.h b/core/fpdfapi/fpdf_page/include/cpdf_form.h index 3b9f1cc7fb..542ab498a6 100644 --- a/core/fpdfapi/fpdf_page/include/cpdf_form.h +++ b/core/fpdfapi/fpdf_page/include/cpdf_form.h @@ -15,7 +15,6 @@ class CPDF_Stream; class CPDF_AllStates; class CFX_Matrix; class CPDF_Type3Char; -class CPDF_ParseOptions; class CPDF_Form : public CPDF_PageObjectHolder { public: @@ -29,13 +28,11 @@ class CPDF_Form : public CPDF_PageObjectHolder { void StartParse(CPDF_AllStates* pGraphicStates, CFX_Matrix* pParentMatrix, CPDF_Type3Char* pType3Char, - CPDF_ParseOptions* pOptions, int level = 0); void ParseContent(CPDF_AllStates* pGraphicStates, CFX_Matrix* pParentMatrix, CPDF_Type3Char* pType3Char, - CPDF_ParseOptions* pOptions, int level = 0); CPDF_Form* Clone() const; diff --git a/core/fpdfapi/fpdf_page/include/cpdf_page.h b/core/fpdfapi/fpdf_page/include/cpdf_page.h index 3ede3c9404..7f4430187a 100644 --- a/core/fpdfapi/fpdf_page/include/cpdf_page.h +++ b/core/fpdfapi/fpdf_page/include/cpdf_page.h @@ -7,30 +7,26 @@ #ifndef CORE_FPDFAPI_FPDF_PAGE_INCLUDE_CPDF_PAGE_H_ #define CORE_FPDFAPI_FPDF_PAGE_INCLUDE_CPDF_PAGE_H_ +#include <memory> + #include "core/fpdfapi/fpdf_page/include/cpdf_pageobjectholder.h" #include "core/fxcrt/include/fx_basic.h" #include "core/fxcrt/include/fx_coordinates.h" #include "core/fxcrt/include/fx_system.h" -class CPDF_Document; class CPDF_Dictionary; +class CPDF_Document; class CPDF_Object; class CPDF_PageRenderCache; -class CPDF_ParseOptions; - -CPDF_Object* FPDFAPI_GetPageAttr(CPDF_Dictionary* pPageDict, - const CFX_ByteStringC& name); class CPDF_Page : public CPDF_PageObjectHolder, public CFX_PrivateData { public: - CPDF_Page(); - ~CPDF_Page(); - - void Load(CPDF_Document* pDocument, + CPDF_Page(CPDF_Document* pDocument, CPDF_Dictionary* pPageDict, - FX_BOOL bPageCache = TRUE); + bool bPageCache); + ~CPDF_Page(); - void ParseContent(CPDF_ParseOptions* pOptions); + void ParseContent(); void GetDisplayMatrix(CFX_Matrix& matrix, int xPos, @@ -43,18 +39,18 @@ class CPDF_Page : public CPDF_PageObjectHolder, public CFX_PrivateData { FX_FLOAT GetPageHeight() const { return m_PageHeight; } CFX_FloatRect GetPageBBox() const { return m_BBox; } const CFX_Matrix& GetPageMatrix() const { return m_PageMatrix; } - CPDF_Object* GetPageAttr(const CFX_ByteStringC& name) const; - CPDF_PageRenderCache* GetRenderCache() const { return m_pPageRender; } + CPDF_Object* GetPageAttr(const CFX_ByteString& name) const; + CPDF_PageRenderCache* GetRenderCache() const { return m_pPageRender.get(); } protected: friend class CPDF_ContentParser; - void StartParse(CPDF_ParseOptions* pOptions); + void StartParse(); FX_FLOAT m_PageWidth; FX_FLOAT m_PageHeight; CFX_Matrix m_PageMatrix; - CPDF_PageRenderCache* m_pPageRender; + std::unique_ptr<CPDF_PageRenderCache> m_pPageRender; }; #endif // CORE_FPDFAPI_FPDF_PAGE_INCLUDE_CPDF_PAGE_H_ |