Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(427)

Side by Side Diff: core/fpdfapi/fpdf_parser/include/cpdf_document.h

Issue 2323793003: Refactor CPDF_Document (Closed)
Patch Set: Comments Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « core/fpdfapi/fpdf_parser/cpdf_document.cpp ('k') | core/fxge/ge/cfx_font.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_DOCUMENT_H_ 7 #ifndef CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_DOCUMENT_H_
8 #define CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_DOCUMENT_H_ 8 #define CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_DOCUMENT_H_
9 9
10 #include <memory> 10 #include <memory>
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 uint32_t GetUserPermissions() const; 53 uint32_t GetUserPermissions() const;
54 CPDF_DocPageData* GetPageData() const { return m_pDocPage; } 54 CPDF_DocPageData* GetPageData() const { return m_pDocPage; }
55 55
56 std::unique_ptr<JBig2_DocumentContext>* CodecContext() { 56 std::unique_ptr<JBig2_DocumentContext>* CodecContext() {
57 return &m_pCodecContext; 57 return &m_pCodecContext;
58 } 58 }
59 std::unique_ptr<CPDF_LinkList>* LinksContext() { return &m_pLinksContext; } 59 std::unique_ptr<CPDF_LinkList>* LinksContext() { return &m_pLinksContext; }
60 60
61 CPDF_DocRenderData* GetRenderData() const { return m_pDocRender.get(); } 61 CPDF_DocRenderData* GetRenderData() const { return m_pDocRender.get(); }
62 62
63 FX_BOOL IsFormStream(uint32_t objnum, FX_BOOL& bForm) const;
64
65 // |pFontDict| must not be null. 63 // |pFontDict| must not be null.
66 CPDF_Font* LoadFont(CPDF_Dictionary* pFontDict); 64 CPDF_Font* LoadFont(CPDF_Dictionary* pFontDict);
67 CPDF_ColorSpace* LoadColorSpace(CPDF_Object* pCSObj, 65 CPDF_ColorSpace* LoadColorSpace(CPDF_Object* pCSObj,
68 CPDF_Dictionary* pResources = nullptr); 66 CPDF_Dictionary* pResources = nullptr);
69 67
70 CPDF_Pattern* LoadPattern(CPDF_Object* pObj, 68 CPDF_Pattern* LoadPattern(CPDF_Object* pObj,
71 FX_BOOL bShading, 69 FX_BOOL bShading,
72 const CFX_Matrix& matrix); 70 const CFX_Matrix& matrix);
73 71
74 CPDF_Image* LoadImageF(CPDF_Object* pObj); 72 CPDF_Image* LoadImageF(CPDF_Object* pObj);
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 uint32_t m_dwFirstPageObjNum; 119 uint32_t m_dwFirstPageObjNum;
122 CFX_ArrayTemplate<uint32_t> m_PageList; 120 CFX_ArrayTemplate<uint32_t> m_PageList;
123 // TODO(thestig): Figure out why this cannot be a std::unique_ptr. 121 // TODO(thestig): Figure out why this cannot be a std::unique_ptr.
124 CPDF_DocPageData* m_pDocPage; 122 CPDF_DocPageData* m_pDocPage;
125 std::unique_ptr<CPDF_DocRenderData> m_pDocRender; 123 std::unique_ptr<CPDF_DocRenderData> m_pDocRender;
126 std::unique_ptr<JBig2_DocumentContext> m_pCodecContext; 124 std::unique_ptr<JBig2_DocumentContext> m_pCodecContext;
127 std::unique_ptr<CPDF_LinkList> m_pLinksContext; 125 std::unique_ptr<CPDF_LinkList> m_pLinksContext;
128 126
129 private: 127 private:
130 void LoadDocInternal(); 128 void LoadDocInternal();
129 size_t CalculateEncodingDict(int charset, CPDF_Dictionary* pBaseDict);
130 CPDF_Dictionary* GetPagesDict() const;
131 }; 131 };
132 132
133 #endif // CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_DOCUMENT_H_ 133 #endif // CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_DOCUMENT_H_
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_parser/cpdf_document.cpp ('k') | core/fxge/ge/cfx_font.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698