OLD | NEW |
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 Loading... |
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 Loading... |
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_ |
OLD | NEW |