OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 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 FPDFSDK_FPDFXFA_INCLUDE_FPDFXFA_DOC_H_ | 7 #ifndef FPDFSDK_FPDFXFA_INCLUDE_FPDFXFA_DOC_H_ |
8 #define FPDFSDK_FPDFXFA_INCLUDE_FPDFXFA_DOC_H_ | 8 #define FPDFSDK_FPDFXFA_INCLUDE_FPDFXFA_DOC_H_ |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 20 matching lines...) Expand all Loading... |
31 class CPDFXFA_Document { | 31 class CPDFXFA_Document { |
32 public: | 32 public: |
33 CPDFXFA_Document(std::unique_ptr<CPDF_Document> pPDFDoc, | 33 CPDFXFA_Document(std::unique_ptr<CPDF_Document> pPDFDoc, |
34 CPDFXFA_App* pProvider); | 34 CPDFXFA_App* pProvider); |
35 ~CPDFXFA_Document(); | 35 ~CPDFXFA_Document(); |
36 | 36 |
37 FX_BOOL LoadXFADoc(); | 37 FX_BOOL LoadXFADoc(); |
38 CPDF_Document* GetPDFDoc() { return m_pPDFDoc.get(); } | 38 CPDF_Document* GetPDFDoc() { return m_pPDFDoc.get(); } |
39 CXFA_FFDoc* GetXFADoc() { return m_pXFADoc.get(); } | 39 CXFA_FFDoc* GetXFADoc() { return m_pXFADoc.get(); } |
40 CXFA_FFDocView* GetXFADocView() { return m_pXFADocView; } | 40 CXFA_FFDocView* GetXFADocView() { return m_pXFADocView; } |
41 | 41 CPDFSDK_Document* GetSDKDocument(CPDFSDK_Environment* pFormFillEnv); |
42 int GetPageCount(); | 42 int GetDocType() const { return m_iDocType; } |
43 CPDFXFA_Page* GetPage(int page_index); | |
44 CPDFXFA_Page* GetPage(CXFA_FFPageView* pPage); | |
45 | 43 |
46 void DeletePage(int page_index); | 44 void DeletePage(int page_index); |
| 45 int GetPageCount() const; |
| 46 |
| 47 CPDFXFA_Page* GetXFAPage(int page_index); |
| 48 CPDFXFA_Page* GetXFAPage(CXFA_FFPageView* pPage) const; |
| 49 |
47 void RemovePage(CPDFXFA_Page* page); | 50 void RemovePage(CPDFXFA_Page* page); |
48 int GetDocType() { return m_iDocType; } | |
49 | |
50 CPDFSDK_Document* GetSDKDocument(CPDFSDK_Environment* pFormFillEnv); | |
51 | 51 |
52 void ClearChangeMark(); | 52 void ClearChangeMark(); |
53 | 53 |
54 protected: | 54 protected: |
55 friend class CPDFXFA_DocEnvironment; | 55 friend class CPDFXFA_DocEnvironment; |
56 | 56 |
57 CPDFSDK_Document* GetSDKDoc() { return m_pSDKDoc.get(); } | 57 CPDFSDK_Document* GetSDKDoc() { return m_pSDKDoc.get(); } |
58 int GetOriginalPageCount() const { return m_nPageCount; } | 58 int GetOriginalPageCount() const { return m_nPageCount; } |
59 void SetOriginalPageCount(int count) { | 59 void SetOriginalPageCount(int count) { |
60 m_nPageCount = count; | 60 m_nPageCount = count; |
(...skipping 24 matching lines...) Expand all Loading... |
85 CPDFXFA_App* const m_pApp; | 85 CPDFXFA_App* const m_pApp; |
86 CFX_ArrayTemplate<CPDFXFA_Page*> m_XFAPageList; | 86 CFX_ArrayTemplate<CPDFXFA_Page*> m_XFAPageList; |
87 LoadStatus m_nLoadStatus; | 87 LoadStatus m_nLoadStatus; |
88 int m_nPageCount; | 88 int m_nPageCount; |
89 | 89 |
90 // Must be destroy before |m_pSDKDoc|. | 90 // Must be destroy before |m_pSDKDoc|. |
91 CPDFXFA_DocEnvironment m_DocEnv; | 91 CPDFXFA_DocEnvironment m_DocEnv; |
92 }; | 92 }; |
93 | 93 |
94 #endif // FPDFSDK_FPDFXFA_INCLUDE_FPDFXFA_DOC_H_ | 94 #endif // FPDFSDK_FPDFXFA_INCLUDE_FPDFXFA_DOC_H_ |
OLD | NEW |