summaryrefslogtreecommitdiff
path: root/fpdfsdk/include/fpdfxfa
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/include/fpdfxfa')
-rw-r--r--fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h b/fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h
index fadded858f..317200c2fa 100644
--- a/fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h
+++ b/fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h
@@ -14,6 +14,7 @@ class CPDFSDK_Document;
class CPDFDoc_Environment;
class IFXJS_Runtime;
class IFXJS_Context;
+class IXFA_DocHandler;
class CPDFXFA_Document : public IXFA_DocProvider, public CFX_Object
{
@@ -22,7 +23,6 @@ public:
~CPDFXFA_Document();
FX_BOOL LoadXFADoc();
- void CloseXFADoc();
CPDFXFA_App* GetApp() {return m_pApp;}
CPDF_Document* GetPDFDoc() { return m_pPDFDoc; }
XFA_HDOC GetXFADoc() { return m_pXFADoc; }
@@ -128,6 +128,15 @@ public:
void _ClearChangeMark();
private:
+ void CloseXFADoc(IXFA_DocHandler* pDoc) {
+ if (pDoc) {
+ pDoc->CloseDoc(m_pXFADoc);
+ pDoc->ReleaseDoc(m_pXFADoc);
+ m_pXFADoc = NULL;
+ m_pXFADocView = NULL;
+ }
+ }
+
CPDF_Document* m_pPDFDoc;
XFA_HDOC m_pXFADoc;
IXFA_DocView* m_pXFADocView;