summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfxfa/cpdfxfa_context.h
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/fpdfxfa/cpdfxfa_context.h')
-rw-r--r--fpdfsdk/fpdfxfa/cpdfxfa_context.h19
1 files changed, 8 insertions, 11 deletions
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_context.h b/fpdfsdk/fpdfxfa/cpdfxfa_context.h
index 690e1855e3..6d7e33b689 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_context.h
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_context.h
@@ -13,11 +13,11 @@
#include "core/fxcrt/cfx_unowned_ptr.h"
#include "core/fxcrt/fx_system.h"
#include "fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h"
+#include "fpdfsdk/fpdfxfa/cpdfxfa_page.h"
#include "xfa/fxfa/cxfa_ffdoc.h"
class CJS_Runtime;
class CPDFSDK_FormFillEnvironment;
-class CPDFXFA_Page;
class CXFA_FFDocHandler;
class IJS_EventContext;
class IJS_Runtime;
@@ -48,14 +48,10 @@ class CPDFXFA_Context : public IXFA_AppProvider {
}
void SetFormFillEnv(CPDFSDK_FormFillEnvironment* pFormFillEnv);
- void DeletePage(int page_index);
int GetPageCount() const;
-
- CPDFXFA_Page* GetXFAPage(int page_index);
- CPDFXFA_Page* GetXFAPage(CXFA_FFPageView* pPage) const;
-
- void RemovePage(CPDFXFA_Page* page);
-
+ void DeletePage(int page_index);
+ CFX_RetainPtr<CPDFXFA_Page> GetXFAPage(int page_index);
+ CFX_RetainPtr<CPDFXFA_Page> GetXFAPage(CXFA_FFPageView* pPage) const;
void ClearChangeMark();
// IFXA_AppProvider:
@@ -97,20 +93,21 @@ class CPDFXFA_Context : public IXFA_AppProvider {
}
LoadStatus GetLoadStatus() const { return m_nLoadStatus; }
- std::vector<CPDFXFA_Page*>* GetXFAPageList() { return &m_XFAPageList; }
+ std::vector<CFX_RetainPtr<CPDFXFA_Page>>* GetXFAPageList() {
+ return &m_XFAPageList;
+ }
private:
void CloseXFADoc();
XFA_DocType m_iDocType;
-
std::unique_ptr<CPDF_Document> m_pPDFDoc;
std::unique_ptr<CXFA_FFDoc> m_pXFADoc;
CFX_UnownedPtr<CPDFSDK_FormFillEnvironment> m_pFormFillEnv;
CFX_UnownedPtr<CXFA_FFDocView> m_pXFADocView;
std::unique_ptr<CXFA_FFApp> m_pXFAApp;
std::unique_ptr<CJS_Runtime> m_pRuntime;
- std::vector<CPDFXFA_Page*> m_XFAPageList;
+ std::vector<CFX_RetainPtr<CPDFXFA_Page>> m_XFAPageList;
LoadStatus m_nLoadStatus;
int m_nPageCount;