summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/cpdf_document.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/parser/cpdf_document.h')
-rw-r--r--core/fpdfapi/parser/cpdf_document.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/core/fpdfapi/parser/cpdf_document.h b/core/fpdfapi/parser/cpdf_document.h
index c2774b163a..c240e77567 100644
--- a/core/fpdfapi/parser/cpdf_document.h
+++ b/core/fpdfapi/parser/cpdf_document.h
@@ -8,6 +8,7 @@
#define CORE_FPDFAPI_PARSER_CPDF_DOCUMENT_H_
#include <functional>
+#include <map>
#include <memory>
#include <set>
#include <utility>
@@ -64,6 +65,7 @@ class CPDF_Document : public CPDF_IndirectObjectHolder {
const CPDF_Dictionary* GetInfo() const { return m_pInfoDict.Get(); }
CPDF_Dictionary* GetInfo() { return m_pInfoDict.Get(); }
+ RetainPtr<CPDF_Page> GetOrCreatePDFPage(CPDF_Dictionary* pPageDict);
void DeletePage(int iPage);
int GetPageCount() const;
bool IsPageLoaded(int iPage) const;
@@ -167,7 +169,13 @@ class CPDF_Document : public CPDF_IndirectObjectHolder {
std::unique_ptr<CPDF_DocRenderData> m_pDocRender;
std::unique_ptr<JBig2_DocumentContext> m_pCodecContext;
std::unique_ptr<CPDF_LinkList> m_pLinksContext;
- std::vector<uint32_t> m_PageList; // Page number to page's dict objnum.
+
+ // Page number (index) to page's dict objnum.
+ std::vector<uint32_t> m_PageList;
+
+ // Dict {objnum, gennum} to page mapping.
+ std::map<std::pair<uint32_t, uint32_t>, CPDF_Page::ObservedPtr> m_PageMap;
+
UnownedPtr<Extension> m_pExtension;
};