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_PARSER_CPDF_DOCUMENT_H_ | 7 #ifndef CORE_FPDFAPI_PARSER_CPDF_DOCUMENT_H_ |
8 #define CORE_FPDFAPI_PARSER_CPDF_DOCUMENT_H_ | 8 #define CORE_FPDFAPI_PARSER_CPDF_DOCUMENT_H_ |
9 | 9 |
10 #include <functional> | 10 #include <functional> |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 protected: | 106 protected: |
107 // Retrieve page count information by getting count value from the tree nodes | 107 // Retrieve page count information by getting count value from the tree nodes |
108 int RetrievePageCount() const; | 108 int RetrievePageCount() const; |
109 // When this method is called, m_pTreeTraversal[level] exists. | 109 // When this method is called, m_pTreeTraversal[level] exists. |
110 CPDF_Dictionary* TraversePDFPages(int iPage, int* nPagesToGo, size_t level); | 110 CPDF_Dictionary* TraversePDFPages(int iPage, int* nPagesToGo, size_t level); |
111 int FindPageIndex(CPDF_Dictionary* pNode, | 111 int FindPageIndex(CPDF_Dictionary* pNode, |
112 uint32_t& skip_count, | 112 uint32_t& skip_count, |
113 uint32_t objnum, | 113 uint32_t objnum, |
114 int& index, | 114 int& index, |
115 int level = 0); | 115 int level = 0); |
116 CPDF_Object* ParseIndirectObject(uint32_t objnum) override; | 116 std::unique_ptr<CPDF_Object> ParseIndirectObject(uint32_t objnum) override; |
117 void LoadDocInternal(); | 117 void LoadDocInternal(); |
118 size_t CalculateEncodingDict(int charset, CPDF_Dictionary* pBaseDict); | 118 size_t CalculateEncodingDict(int charset, CPDF_Dictionary* pBaseDict); |
119 CPDF_Dictionary* GetPagesDict() const; | 119 CPDF_Dictionary* GetPagesDict() const; |
120 CPDF_Dictionary* ProcessbCJK( | 120 CPDF_Dictionary* ProcessbCJK( |
121 CPDF_Dictionary* pBaseDict, | 121 CPDF_Dictionary* pBaseDict, |
122 int charset, | 122 int charset, |
123 bool bVert, | 123 bool bVert, |
124 CFX_ByteString basefont, | 124 CFX_ByteString basefont, |
125 std::function<void(FX_WCHAR, FX_WCHAR, CPDF_Array*)> Insert); | 125 std::function<void(FX_WCHAR, FX_WCHAR, CPDF_Array*)> Insert); |
126 bool InsertDeletePDFPage(CPDF_Dictionary* pPages, | 126 bool InsertDeletePDFPage(CPDF_Dictionary* pPages, |
(...skipping 20 matching lines...) Expand all Loading... |
147 // TODO(thestig): Figure out why this cannot be a std::unique_ptr. | 147 // TODO(thestig): Figure out why this cannot be a std::unique_ptr. |
148 CPDF_DocPageData* m_pDocPage; | 148 CPDF_DocPageData* m_pDocPage; |
149 std::unique_ptr<CPDF_DocRenderData> m_pDocRender; | 149 std::unique_ptr<CPDF_DocRenderData> m_pDocRender; |
150 std::unique_ptr<JBig2_DocumentContext> m_pCodecContext; | 150 std::unique_ptr<JBig2_DocumentContext> m_pCodecContext; |
151 std::unique_ptr<CPDF_LinkList> m_pLinksContext; | 151 std::unique_ptr<CPDF_LinkList> m_pLinksContext; |
152 CFX_ArrayTemplate<uint32_t> m_PageList; | 152 CFX_ArrayTemplate<uint32_t> m_PageList; |
153 CFX_WeakPtr<CFX_ByteStringPool> m_pByteStringPool; | 153 CFX_WeakPtr<CFX_ByteStringPool> m_pByteStringPool; |
154 }; | 154 }; |
155 | 155 |
156 #endif // CORE_FPDFAPI_PARSER_CPDF_DOCUMENT_H_ | 156 #endif // CORE_FPDFAPI_PARSER_CPDF_DOCUMENT_H_ |
OLD | NEW |