| 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 22 matching lines...) Expand all Loading... |
| 33 #define FPDFPERM_ANNOT_FORM 0x0020 | 33 #define FPDFPERM_ANNOT_FORM 0x0020 |
| 34 #define FPDFPERM_FILL_FORM 0x0100 | 34 #define FPDFPERM_FILL_FORM 0x0100 |
| 35 #define FPDFPERM_EXTRACT_ACCESS 0x0200 | 35 #define FPDFPERM_EXTRACT_ACCESS 0x0200 |
| 36 #define FPDFPERM_ASSEMBLE 0x0400 | 36 #define FPDFPERM_ASSEMBLE 0x0400 |
| 37 #define FPDFPERM_PRINT_HIGH 0x0800 | 37 #define FPDFPERM_PRINT_HIGH 0x0800 |
| 38 #define FPDF_PAGE_MAX_NUM 0xFFFFF | 38 #define FPDF_PAGE_MAX_NUM 0xFFFFF |
| 39 | 39 |
| 40 class CPDF_Document : public CPDF_IndirectObjectHolder { | 40 class CPDF_Document : public CPDF_IndirectObjectHolder { |
| 41 public: | 41 public: |
| 42 explicit CPDF_Document(CPDF_Parser* pParser); | 42 explicit CPDF_Document(CPDF_Parser* pParser); |
| 43 ~CPDF_Document() override; | 43 ~CPDF_Document(); |
| 44 | 44 |
| 45 CPDF_Parser* GetParser() const { return m_pParser; } | 45 CPDF_Parser* GetParser() const { return m_pParser; } |
| 46 CPDF_Dictionary* GetRoot() const { return m_pRootDict; } | 46 CPDF_Dictionary* GetRoot() const { return m_pRootDict; } |
| 47 CPDF_Dictionary* GetInfo() const { return m_pInfoDict; } | 47 CPDF_Dictionary* GetInfo() const { return m_pInfoDict; } |
| 48 | 48 |
| 49 void GetID(CFX_ByteString& id1, CFX_ByteString& id2) const { | 49 void GetID(CFX_ByteString& id1, CFX_ByteString& id2) const { |
| 50 id1 = m_ID1; | 50 id1 = m_ID1; |
| 51 id2 = m_ID2; | 51 id2 = m_ID2; |
| 52 } | 52 } |
| 53 | 53 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 CPDF_Dictionary* FindPDFPage(CPDF_Dictionary* pPages, | 118 CPDF_Dictionary* FindPDFPage(CPDF_Dictionary* pPages, |
| 119 int iPage, | 119 int iPage, |
| 120 int nPagesToGo, | 120 int nPagesToGo, |
| 121 int level); | 121 int level); |
| 122 int FindPageIndex(CPDF_Dictionary* pNode, | 122 int FindPageIndex(CPDF_Dictionary* pNode, |
| 123 uint32_t& skip_count, | 123 uint32_t& skip_count, |
| 124 uint32_t objnum, | 124 uint32_t objnum, |
| 125 int& index, | 125 int& index, |
| 126 int level = 0); | 126 int level = 0); |
| 127 FX_BOOL CheckOCGVisible(CPDF_Dictionary* pOCG, FX_BOOL bPrinting); | 127 FX_BOOL CheckOCGVisible(CPDF_Dictionary* pOCG, FX_BOOL bPrinting); |
| 128 CPDF_Object* ParseIndirectObject(uint32_t objnum) override; | |
| 129 | 128 |
| 130 CPDF_Parser* m_pParser; | |
| 131 CPDF_Dictionary* m_pRootDict; | 129 CPDF_Dictionary* m_pRootDict; |
| 132 CPDF_Dictionary* m_pInfoDict; | 130 CPDF_Dictionary* m_pInfoDict; |
| 133 CFX_ByteString m_ID1; | 131 CFX_ByteString m_ID1; |
| 134 CFX_ByteString m_ID2; | 132 CFX_ByteString m_ID2; |
| 135 bool m_bLinearized; | 133 bool m_bLinearized; |
| 136 int m_iFirstPageNo; | 134 int m_iFirstPageNo; |
| 137 uint32_t m_dwFirstPageObjNum; | 135 uint32_t m_dwFirstPageObjNum; |
| 138 CFX_ArrayTemplate<uint32_t> m_PageList; | 136 CFX_ArrayTemplate<uint32_t> m_PageList; |
| 139 // TODO(thestig): Figure out why this cannot be a std::unique_ptr. | 137 // TODO(thestig): Figure out why this cannot be a std::unique_ptr. |
| 140 CPDF_DocPageData* m_pDocPage; | 138 CPDF_DocPageData* m_pDocPage; |
| 141 std::unique_ptr<CPDF_DocRenderData> m_pDocRender; | 139 std::unique_ptr<CPDF_DocRenderData> m_pDocRender; |
| 142 std::unique_ptr<JBig2_DocumentContext> m_pCodecContext; | 140 std::unique_ptr<JBig2_DocumentContext> m_pCodecContext; |
| 143 std::unique_ptr<CPDF_LinkList> m_pLinksContext; | 141 std::unique_ptr<CPDF_LinkList> m_pLinksContext; |
| 144 | 142 |
| 145 private: | 143 private: |
| 146 void LoadDocInternal(); | 144 void LoadDocInternal(); |
| 147 }; | 145 }; |
| 148 | 146 |
| 149 #endif // CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_DOCUMENT_H_ | 147 #endif // CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_DOCUMENT_H_ |
| OLD | NEW |