Replace XFA_HDOC with IXFA_Doc*
authorTom Sepez <tsepez@chromium.org>
Wed, 27 May 2015 23:36:35 +0000 (16:36 -0700)
committerTom Sepez <tsepez@chromium.org>
Wed, 27 May 2015 23:36:35 +0000 (16:36 -0700)
There are better ways to provide information hiding than casting
willy-nilly from an unrelated structure.  Kill dozens of casts in
the process.

R=thestig@chromium.org

Review URL: https://codereview.chromium.org/1146153005

27 files changed:
fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h
fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp
fpdfsdk/src/fpdfxfa/fpdfxfa_page.cpp
xfa/include/fxfa/fxfa.h
xfa/src/fxfa/src/app/xfa_ffapp.cpp
xfa/src/fxfa/src/app/xfa_ffapp.h
xfa/src/fxfa/src/app/xfa_ffdoc.cpp
xfa/src/fxfa/src/app/xfa_ffdoc.h
xfa/src/fxfa/src/app/xfa_ffdochandler.cpp
xfa/src/fxfa/src/app/xfa_ffdochandler.h
xfa/src/fxfa/src/app/xfa_ffdocview.cpp
xfa/src/fxfa/src/app/xfa_ffdocview.h
xfa/src/fxfa/src/app/xfa_fffield.cpp
xfa/src/fxfa/src/app/xfa_ffnotify.cpp
xfa/src/fxfa/src/app/xfa_ffnotify.h
xfa/src/fxfa/src/app/xfa_fftext.cpp
xfa/src/fxfa/src/app/xfa_fftextedit.cpp
xfa/src/fxfa/src/app/xfa_ffwidget.cpp
xfa/src/fxfa/src/app/xfa_ffwidgetacc.cpp
xfa/src/fxfa/src/app/xfa_ffwidgethandler.cpp
xfa/src/fxfa/src/app/xfa_fontmgr.cpp
xfa/src/fxfa/src/app/xfa_fontmgr.h
xfa/src/fxfa/src/app/xfa_textlayout.cpp
xfa/src/fxfa/src/common/xfa_document.h
xfa/src/fxfa/src/parser/xfa_script_hostpseudomodel.cpp
xfa/src/fxfa/src/parser/xfa_script_layoutpseudomodel.cpp
xfa/src/fxfa/src/parser/xfa_script_signaturepseudomodel.cpp

index 954162e..dc15ec4 100644 (file)
@@ -4,8 +4,8 @@
  \r
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com\r
 \r
-#ifndef _FPDFXFA_DOC_H_\r
-#define _FPDFXFA_DOC_H_\r
+#ifndef FPDFXFA_DOC_H_\r
+#define FPDFXFA_DOC_H_\r
 \r
 class CPDFXFA_App;\r
 class CPDFXFA_Document;\r
@@ -25,7 +25,7 @@ public:
        FX_BOOL                         LoadXFADoc();\r
        CPDFXFA_App*            GetApp() {return m_pApp;}\r
        CPDF_Document*          GetPDFDoc() { return m_pPDFDoc; }\r
-       XFA_HDOC                        GetXFADoc() { return m_pXFADoc; }\r
+       IXFA_Doc*                       GetXFADoc() { return m_pXFADoc; }\r
        IXFA_DocView*       GetXFADocView() { return m_pXFADocView; }\r
 \r
        int                                     GetPageCount();\r
@@ -40,8 +40,8 @@ public:
        void                            FXRect2PDFRect(const CFX_RectF& fxRectF, CPDF_Rect& pdfRect);\r
 \r
 public:\r
-       virtual void            SetChangeMark(XFA_HDOC hDoc);\r
-       virtual FX_BOOL         GetChangeMark(XFA_HDOC hDoc);\r
+       virtual void            SetChangeMark(IXFA_Doc* hDoc);\r
+       virtual FX_BOOL         GetChangeMark(IXFA_Doc* hDoc);\r
        //used in dynamic xfa, dwFlags refer to XFA_INVALIDATE_XXX macros.\r
        virtual void            InvalidateRect(IXFA_PageView* pPageView, const CFX_RectF& rt, FX_DWORD dwFlags = 0);\r
        //used in static xfa, dwFlags refer to XFA_INVALIDATE_XXX macros.\r
@@ -62,37 +62,37 @@ public:
        virtual FX_BOOL         RenderCustomWidget(XFA_HWIDGET hWidget, CFX_Graphics* pGS, CFX_Matrix* pMatrix, const CFX_RectF& rtUI){return FALSE;}\r
 \r
        //host method\r
-       virtual FX_INT32        CountPages(XFA_HDOC hDoc);\r
-       virtual FX_INT32        GetCurrentPage(XFA_HDOC hDoc);\r
-       virtual void            SetCurrentPage(XFA_HDOC hDoc, FX_INT32 iCurPage);\r
-       virtual FX_BOOL         IsCalculationsEnabled(XFA_HDOC hDoc);\r
-       virtual void            SetCalculationsEnabled(XFA_HDOC hDoc, FX_BOOL bEnabled);\r
-       virtual void            GetTitle(XFA_HDOC hDoc, CFX_WideString &wsTitle);\r
-       virtual void            SetTitle(XFA_HDOC hDoc, FX_WSTR wsTitle);\r
-       virtual void            ExportData(XFA_HDOC hDoc, FX_WSTR wsFilePath, FX_BOOL bXDP = TRUE);\r
-       virtual void            ImportData(XFA_HDOC hDoc, FX_WSTR wsFilePath);\r
-       virtual void            GotoURL(XFA_HDOC hDoc, FX_WSTR bsURL, FX_BOOL bAppend = TRUE);\r
-       virtual FX_BOOL         IsValidationsEnabled(XFA_HDOC hDoc);\r
-       virtual void            SetValidationsEnabled(XFA_HDOC hDoc, FX_BOOL bEnabled);\r
-       virtual void            SetFocusWidget(XFA_HDOC hDoc, XFA_HWIDGET hWidget);\r
-       virtual void            Print(XFA_HDOC hDoc, FX_INT32 nStartPage, FX_INT32 nEndPage, FX_DWORD dwOptions);\r
+       virtual FX_INT32        CountPages(IXFA_Doc* hDoc);\r
+       virtual FX_INT32        GetCurrentPage(IXFA_Doc* hDoc);\r
+       virtual void            SetCurrentPage(IXFA_Doc* hDoc, FX_INT32 iCurPage);\r
+       virtual FX_BOOL         IsCalculationsEnabled(IXFA_Doc* hDoc);\r
+       virtual void            SetCalculationsEnabled(IXFA_Doc* hDoc, FX_BOOL bEnabled);\r
+       virtual void            GetTitle(IXFA_Doc* hDoc, CFX_WideString &wsTitle);\r
+       virtual void            SetTitle(IXFA_Doc* hDoc, FX_WSTR wsTitle);\r
+       virtual void            ExportData(IXFA_Doc* hDoc, FX_WSTR wsFilePath, FX_BOOL bXDP = TRUE);\r
+       virtual void            ImportData(IXFA_Doc* hDoc, FX_WSTR wsFilePath);\r
+       virtual void            GotoURL(IXFA_Doc* hDoc, FX_WSTR bsURL, FX_BOOL bAppend = TRUE);\r
+       virtual FX_BOOL         IsValidationsEnabled(IXFA_Doc* hDoc);\r
+       virtual void            SetValidationsEnabled(IXFA_Doc* hDoc, FX_BOOL bEnabled);\r
+       virtual void            SetFocusWidget(IXFA_Doc* hDoc, XFA_HWIDGET hWidget);\r
+       virtual void            Print(IXFA_Doc* hDoc, FX_INT32 nStartPage, FX_INT32 nEndPage, FX_DWORD dwOptions);\r
 \r
        //LayoutPseudo method\r
-       virtual FX_INT32                        AbsPageCountInBatch(XFA_HDOC hDoc){return 0;}\r
-       virtual FX_INT32                        AbsPageInBatch(XFA_HDOC hDoc, XFA_HWIDGET hWidget){return 0;}\r
-       virtual FX_INT32                        SheetCountInBatch(XFA_HDOC hDoc){return 0;}\r
-       virtual FX_INT32                        SheetInBatch(XFA_HDOC hDoc, XFA_HWIDGET hWidget){return 0;}\r
+       virtual FX_INT32                        AbsPageCountInBatch(IXFA_Doc* hDoc){return 0;}\r
+       virtual FX_INT32                        AbsPageInBatch(IXFA_Doc* hDoc, XFA_HWIDGET hWidget){return 0;}\r
+       virtual FX_INT32                        SheetCountInBatch(IXFA_Doc* hDoc){return 0;}\r
+       virtual FX_INT32                        SheetInBatch(IXFA_Doc* hDoc, XFA_HWIDGET hWidget){return 0;}\r
 \r
        //SignaturePseudoModel method\r
        //TODO:\r
-       virtual FX_INT32                        Verify(XFA_HDOC hDoc, CXFA_Node* pSigNode, FX_BOOL bUsed = TRUE/*, SecurityHandler* pHandler, SignatureInfo &info*/) {return 0;}\r
-       virtual FX_BOOL                         Sign(XFA_HDOC hDoc, CXFA_NodeList* pNodeList, FX_WSTR wsExpression, FX_WSTR wsXMLIdent, FX_WSTR wsValue = FX_WSTRC(L"open"), FX_BOOL bUsed = TRUE/*, SecurityHandler* pHandler = NULL, SignatureInfo &info*/) {return 0;}\r
-       virtual CXFA_NodeList*          Enumerate(XFA_HDOC hDoc) {return 0;}\r
-       virtual FX_BOOL                         Clear(XFA_HDOC hDoc, CXFA_Node* pSigNode, FX_BOOL bCleared = TRUE) {return 0;}\r
+       virtual FX_INT32                        Verify(IXFA_Doc* hDoc, CXFA_Node* pSigNode, FX_BOOL bUsed = TRUE/*, SecurityHandler* pHandler, SignatureInfo &info*/) {return 0;}\r
+       virtual FX_BOOL                         Sign(IXFA_Doc* hDoc, CXFA_NodeList* pNodeList, FX_WSTR wsExpression, FX_WSTR wsXMLIdent, FX_WSTR wsValue = FX_WSTRC(L"open"), FX_BOOL bUsed = TRUE/*, SecurityHandler* pHandler = NULL, SignatureInfo &info*/) {return 0;}\r
+       virtual CXFA_NodeList*          Enumerate(IXFA_Doc* hDoc) {return 0;}\r
+       virtual FX_BOOL                         Clear(IXFA_Doc* hDoc, CXFA_Node* pSigNode, FX_BOOL bCleared = TRUE) {return 0;}\r
 \r
        //Get document path\r
-       virtual void            GetURL(XFA_HDOC hDoc, CFX_WideString &wsDocURL);\r
-       virtual FX_ARGB         GetHighlightColor(XFA_HDOC hDoc);\r
+       virtual void            GetURL(IXFA_Doc* hDoc, CFX_WideString &wsDocURL);\r
+       virtual FX_ARGB         GetHighlightColor(IXFA_Doc* hDoc);\r
        virtual void            AddDoRecord(XFA_HWIDGET hWidget);\r
        /** \r
         *Submit data to email, http, ftp.      \r
@@ -103,25 +103,25 @@ public:
         * @param[in] pXDPContent Controls what subset of the data is submitted, used only when the format property is xdp.\r
         * @param[in] bEmbedPDF, specifies whether PDF is embedded in the submitted content or not.\r
         */\r
-       virtual FX_BOOL         SubmitData(XFA_HDOC hDoc, CXFA_Submit submit);\r
+       virtual FX_BOOL         SubmitData(IXFA_Doc* hDoc, CXFA_Submit submit);\r
 \r
-       virtual FX_BOOL         CheckWord(XFA_HDOC hDoc, FX_BSTR sWord){return FALSE;}\r
-       virtual FX_BOOL         GetSuggestWords(XFA_HDOC hDoc, FX_BSTR sWord, CFX_ByteStringArray& sSuggest){return FALSE;}\r
+       virtual FX_BOOL         CheckWord(IXFA_Doc* hDoc, FX_BSTR sWord){return FALSE;}\r
+       virtual FX_BOOL         GetSuggestWords(IXFA_Doc* hDoc, FX_BSTR sWord, CFX_ByteStringArray& sSuggest){return FALSE;}\r
 \r
        //Get PDF javascript object, set the object to hValue.\r
-       virtual FX_BOOL         GetPDFScriptObject(XFA_HDOC hDoc, FX_BSTR utf8Name, FXJSE_HVALUE hValue);\r
+       virtual FX_BOOL         GetPDFScriptObject(IXFA_Doc* hDoc, FX_BSTR utf8Name, FXJSE_HVALUE hValue);\r
 \r
-       virtual FX_BOOL         GetGlobalProperty(XFA_HDOC hDoc, FX_BSTR szPropName, FXJSE_HVALUE hValue);\r
-       virtual FX_BOOL         SetGlobalProperty(XFA_HDOC hDoc, FX_BSTR szPropName, FXJSE_HVALUE hValue);\r
-       virtual CPDF_Document*  OpenPDF(XFA_HDOC hDoc, IFX_FileRead* pFile, FX_BOOL bTakeOverFile){return NULL;}\r
+       virtual FX_BOOL         GetGlobalProperty(IXFA_Doc* hDoc, FX_BSTR szPropName, FXJSE_HVALUE hValue);\r
+       virtual FX_BOOL         SetGlobalProperty(IXFA_Doc* hDoc, FX_BSTR szPropName, FXJSE_HVALUE hValue);\r
+       virtual CPDF_Document*  OpenPDF(IXFA_Doc* hDoc, IFX_FileRead* pFile, FX_BOOL bTakeOverFile){return NULL;}\r
 \r
-       virtual IFX_FileRead*   OpenLinkedFile(XFA_HDOC hDoc, const CFX_WideString& wsLink);\r
+       virtual IFX_FileRead*   OpenLinkedFile(IXFA_Doc* hDoc, const CFX_WideString& wsLink);\r
 \r
        FX_BOOL         _GetHValueByName(FX_BSTR utf8Name, FXJSE_HVALUE hValue, IFXJS_Runtime* runTime);\r
        FX_BOOL         _OnBeforeNotifySumbit();\r
        void            _OnAfterNotifySumbit();\r
        FX_BOOL         _NotifySubmit(FX_BOOL bPrevOrPost);\r
-       FX_BOOL         _SubmitData(XFA_HDOC hDoc, CXFA_Submit submit);\r
+       FX_BOOL         _SubmitData(IXFA_Doc* hDoc, CXFA_Submit submit);\r
        FX_BOOL         _MailToInfo(CFX_WideString& csURL, CFX_WideString& csToAddress, CFX_WideString& csCCAddress, CFX_WideString& csBCCAddress, CFX_WideString& csSubject, CFX_WideString& csMsg);\r
        FX_BOOL         _ExportSubmitFile(FPDF_FILEHANDLER* ppFileHandler, int fileType, FPDF_DWORD encodeType, FPDF_DWORD flag = 0x01111111);\r
        void            _ToXFAContentFlags(CFX_WideString csSrcContent, FPDF_DWORD& flag);\r
@@ -138,7 +138,7 @@ private:
                                }\r
 \r
        CPDF_Document* m_pPDFDoc;\r
-       XFA_HDOC  m_pXFADoc;\r
+       IXFA_Doc*  m_pXFADoc;\r
        IXFA_DocView* m_pXFADocView;\r
        CFX_ArrayTemplate<CPDFXFA_Page*> m_XFAPageList;\r
 \r
@@ -154,4 +154,4 @@ private:
        int                     m_iDocType;\r
 };\r
 \r
-#endif \r
+#endif  // FPDFXFA_DOC_H_\r
index c3137f5..9ef8d53 100644 (file)
@@ -252,7 +252,7 @@ void CPDFXFA_Document::FXRect2PDFRect(const CFX_RectF& fxRectF, CPDF_Rect& pdfRe
 }\r
 \r
 //////////////////////////////////////////////////////////////////////////\r
-void CPDFXFA_Document::SetChangeMark(XFA_HDOC hDoc)\r
+void CPDFXFA_Document::SetChangeMark(IXFA_Doc* hDoc)\r
 {\r
        if (hDoc == m_pXFADoc && m_pSDKDoc)\r
        {\r
@@ -260,7 +260,7 @@ void CPDFXFA_Document::SetChangeMark(XFA_HDOC hDoc)
        }\r
 }\r
 \r
-FX_BOOL CPDFXFA_Document::GetChangeMark(XFA_HDOC hDoc)\r
+FX_BOOL CPDFXFA_Document::GetChangeMark(IXFA_Doc* hDoc)\r
 {\r
        if (hDoc == m_pXFADoc && m_pSDKDoc)\r
                return m_pSDKDoc->GetChangeMark();\r
@@ -633,7 +633,7 @@ void CPDFXFA_Document::WidgetEvent(XFA_HWIDGET hWidget, CXFA_WidgetAcc* pWidgetD
        }\r
 }\r
 \r
-FX_INT32 CPDFXFA_Document::CountPages(XFA_HDOC hDoc)\r
+FX_INT32 CPDFXFA_Document::CountPages(IXFA_Doc* hDoc)\r
 {\r
        if (hDoc == m_pXFADoc && m_pSDKDoc)\r
        {\r
@@ -641,7 +641,7 @@ FX_INT32 CPDFXFA_Document::CountPages(XFA_HDOC hDoc)
        }\r
        return 0;\r
 }\r
-FX_INT32 CPDFXFA_Document::GetCurrentPage(XFA_HDOC hDoc)\r
+FX_INT32 CPDFXFA_Document::GetCurrentPage(IXFA_Doc* hDoc)\r
 {\r
        if (hDoc != m_pXFADoc || !m_pSDKDoc)\r
                return -1;\r
@@ -655,7 +655,7 @@ FX_INT32 CPDFXFA_Document::GetCurrentPage(XFA_HDOC hDoc)
 \r
        return pEnv->FFI_GetCurrentPageIndex(this);\r
 }\r
-void CPDFXFA_Document::SetCurrentPage(XFA_HDOC hDoc, FX_INT32 iCurPage)\r
+void CPDFXFA_Document::SetCurrentPage(IXFA_Doc* hDoc, FX_INT32 iCurPage)\r
 {\r
        if (hDoc != m_pXFADoc || !m_pSDKDoc)\r
                return;\r
@@ -668,7 +668,7 @@ void CPDFXFA_Document::SetCurrentPage(XFA_HDOC hDoc, FX_INT32 iCurPage)
 \r
        pEnv->FFI_SetCurrentPage(this, iCurPage);\r
 }\r
-FX_BOOL        CPDFXFA_Document::IsCalculationsEnabled(XFA_HDOC hDoc)\r
+FX_BOOL        CPDFXFA_Document::IsCalculationsEnabled(IXFA_Doc* hDoc)\r
 {\r
        if (hDoc != m_pXFADoc || !m_pSDKDoc)\r
                return FALSE;\r
@@ -678,7 +678,7 @@ FX_BOOL     CPDFXFA_Document::IsCalculationsEnabled(XFA_HDOC hDoc)
        return FALSE;\r
 \r
 }\r
-void CPDFXFA_Document::SetCalculationsEnabled(XFA_HDOC hDoc, FX_BOOL bEnabled)\r
+void CPDFXFA_Document::SetCalculationsEnabled(IXFA_Doc* hDoc, FX_BOOL bEnabled)\r
 {\r
        if (hDoc != m_pXFADoc || !m_pSDKDoc)\r
                return;\r
@@ -686,7 +686,7 @@ void CPDFXFA_Document::SetCalculationsEnabled(XFA_HDOC hDoc, FX_BOOL bEnabled)
                m_pSDKDoc->GetInterForm()->XfaEnableCalculate(bEnabled);\r
 }\r
 \r
-void CPDFXFA_Document::GetTitle(XFA_HDOC hDoc, CFX_WideString &wsTitle)\r
+void CPDFXFA_Document::GetTitle(IXFA_Doc* hDoc, CFX_WideString &wsTitle)\r
 {\r
        if (hDoc != m_pXFADoc)\r
                return;\r
@@ -701,7 +701,7 @@ void CPDFXFA_Document::GetTitle(XFA_HDOC hDoc, CFX_WideString &wsTitle)
     wsTitle = wsTitle.FromLocal(csTitle.GetBuffer(csTitle.GetLength()));\r
        csTitle.ReleaseBuffer(csTitle.GetLength());\r
 }\r
-void CPDFXFA_Document::SetTitle(XFA_HDOC hDoc, FX_WSTR wsTitle)\r
+void CPDFXFA_Document::SetTitle(IXFA_Doc* hDoc, FX_WSTR wsTitle)\r
 {\r
        if (hDoc != m_pXFADoc)\r
                return;\r
@@ -713,7 +713,7 @@ void CPDFXFA_Document::SetTitle(XFA_HDOC hDoc, FX_WSTR wsTitle)
                return;\r
        pInfoDict->SetAt("Title", FX_NEW CPDF_String(wsTitle));\r
 }\r
-void CPDFXFA_Document::ExportData(XFA_HDOC hDoc, FX_WSTR wsFilePath, FX_BOOL bXDP)\r
+void CPDFXFA_Document::ExportData(IXFA_Doc* hDoc, FX_WSTR wsFilePath, FX_BOOL bXDP)\r
 {\r
        if (hDoc != m_pXFADoc)\r
                return;\r
@@ -834,12 +834,12 @@ void CPDFXFA_Document::ExportData(XFA_HDOC hDoc, FX_WSTR wsFilePath, FX_BOOL bXD
        }\r
        FX_BOOL bError= fileWrite.Flush();\r
 }\r
-void CPDFXFA_Document::ImportData(XFA_HDOC hDoc, FX_WSTR wsFilePath)\r
+void CPDFXFA_Document::ImportData(IXFA_Doc* hDoc, FX_WSTR wsFilePath)\r
 {\r
        //TODO...\r
 }\r
 \r
-void CPDFXFA_Document::GotoURL(XFA_HDOC hDoc, FX_WSTR bsURL, FX_BOOL bAppend)\r
+void CPDFXFA_Document::GotoURL(IXFA_Doc* hDoc, FX_WSTR bsURL, FX_BOOL bAppend)\r
 {\r
        if (hDoc != m_pXFADoc)\r
                return;\r
@@ -857,7 +857,7 @@ void CPDFXFA_Document::GotoURL(XFA_HDOC hDoc, FX_WSTR bsURL, FX_BOOL bAppend)
 \r
 }\r
 \r
-FX_BOOL        CPDFXFA_Document::IsValidationsEnabled(XFA_HDOC hDoc)\r
+FX_BOOL        CPDFXFA_Document::IsValidationsEnabled(IXFA_Doc* hDoc)\r
 {\r
        if (hDoc != m_pXFADoc || !m_pSDKDoc)\r
                return FALSE;\r
@@ -866,14 +866,14 @@ FX_BOOL   CPDFXFA_Document::IsValidationsEnabled(XFA_HDOC hDoc)
 \r
        return TRUE;\r
 }\r
-void CPDFXFA_Document::SetValidationsEnabled(XFA_HDOC hDoc, FX_BOOL bEnabled)\r
+void CPDFXFA_Document::SetValidationsEnabled(IXFA_Doc* hDoc, FX_BOOL bEnabled)\r
 {\r
        if (hDoc != m_pXFADoc || !m_pSDKDoc)\r
                return;\r
        if (m_pSDKDoc->GetInterForm())\r
                m_pSDKDoc->GetInterForm()->XfaSetValidationsEnabled(bEnabled);\r
 }\r
-void  CPDFXFA_Document::SetFocusWidget(XFA_HDOC hDoc, XFA_HWIDGET hWidget)\r
+void  CPDFXFA_Document::SetFocusWidget(IXFA_Doc* hDoc, XFA_HWIDGET hWidget)\r
 {\r
        if (hDoc != m_pXFADoc)\r
                return;\r
@@ -896,7 +896,7 @@ void  CPDFXFA_Document::SetFocusWidget(XFA_HDOC hDoc, XFA_HWIDGET hWidget)
                }\r
        }\r
 }\r
-void CPDFXFA_Document::Print(XFA_HDOC hDoc, FX_INT32 nStartPage, FX_INT32 nEndPage, FX_DWORD dwOptions)\r
+void CPDFXFA_Document::Print(IXFA_Doc* hDoc, FX_INT32 nStartPage, FX_INT32 nEndPage, FX_DWORD dwOptions)\r
 {\r
        if (hDoc != m_pXFADoc)\r
                return;\r
@@ -914,7 +914,7 @@ void CPDFXFA_Document::Print(XFA_HDOC hDoc, FX_INT32 nStartPage, FX_INT32 nEndPa
                dwOptions&XFA_PRINTOPT_ReverseOrder,dwOptions&XFA_PRINTOPT_PrintAnnot);\r
 }\r
 \r
-void CPDFXFA_Document::GetURL(XFA_HDOC hDoc, CFX_WideString &wsDocURL)\r
+void CPDFXFA_Document::GetURL(IXFA_Doc* hDoc, CFX_WideString &wsDocURL)\r
 {\r
        if (hDoc != m_pXFADoc)\r
                return;\r
@@ -926,7 +926,7 @@ void CPDFXFA_Document::GetURL(XFA_HDOC hDoc, CFX_WideString &wsDocURL)
        pEnv->FFI_GetURL(this, wsDocURL);\r
 }\r
 \r
-FX_ARGB        CPDFXFA_Document::GetHighlightColor(XFA_HDOC hDoc)\r
+FX_ARGB        CPDFXFA_Document::GetHighlightColor(IXFA_Doc* hDoc)\r
 {\r
        if (hDoc != m_pXFADoc)\r
                return 0;\r
@@ -1039,7 +1039,7 @@ void CPDFXFA_Document::_OnAfterNotifySumbit()
        m_pXFADocView->UpdateDocView();\r
 }\r
 \r
-FX_BOOL CPDFXFA_Document::SubmitData(XFA_HDOC hDoc, CXFA_Submit submit)\r
+FX_BOOL CPDFXFA_Document::SubmitData(IXFA_Doc* hDoc, CXFA_Submit submit)\r
 {\r
        if (!_NotifySubmit(TRUE))\r
                return FALSE;\r
@@ -1052,7 +1052,7 @@ FX_BOOL CPDFXFA_Document::SubmitData(XFA_HDOC hDoc, CXFA_Submit submit)
        return ret;\r
 }\r
 \r
-IFX_FileRead* CPDFXFA_Document::OpenLinkedFile(XFA_HDOC hDoc, const CFX_WideString& wsLink)\r
+IFX_FileRead* CPDFXFA_Document::OpenLinkedFile(IXFA_Doc* hDoc, const CFX_WideString& wsLink)\r
 {\r
        CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv();\r
        if (pEnv == NULL)\r
@@ -1277,7 +1277,7 @@ FX_BOOL CPDFXFA_Document::_MailToInfo(CFX_WideString& csURL, CFX_WideString& csT
        return TRUE;\r
 }\r
 \r
-FX_BOOL CPDFXFA_Document::_SubmitData(XFA_HDOC hDoc, CXFA_Submit submit)\r
+FX_BOOL CPDFXFA_Document::_SubmitData(IXFA_Doc* hDoc, CXFA_Submit submit)\r
 {\r
        CFX_WideStringC csURLC;\r
        submit.GetSubmitTarget(csURLC);\r
@@ -1392,7 +1392,7 @@ FX_BOOL CPDFXFA_Document::_SubmitData(XFA_HDOC hDoc, CXFA_Submit submit)
        return bRet;\r
 }\r
 \r
-FX_BOOL        CPDFXFA_Document::SetGlobalProperty(XFA_HDOC hDoc, FX_BSTR szPropName, FXJSE_HVALUE hValue)\r
+FX_BOOL        CPDFXFA_Document::SetGlobalProperty(IXFA_Doc* hDoc, FX_BSTR szPropName, FXJSE_HVALUE hValue)\r
 {\r
        if (hDoc != m_pXFADoc)\r
                return FALSE;\r
@@ -1401,7 +1401,7 @@ FX_BOOL   CPDFXFA_Document::SetGlobalProperty(XFA_HDOC hDoc, FX_BSTR szPropName, F
                return m_pSDKDoc->GetEnv()->GetJSRuntime()->SetHValueByName(szPropName, hValue);\r
        return FALSE;\r
 }\r
-FX_BOOL        CPDFXFA_Document::GetPDFScriptObject(XFA_HDOC hDoc, FX_BSTR utf8Name, FXJSE_HVALUE hValue)\r
+FX_BOOL        CPDFXFA_Document::GetPDFScriptObject(IXFA_Doc* hDoc, FX_BSTR utf8Name, FXJSE_HVALUE hValue)\r
 {\r
        if (hDoc != m_pXFADoc)\r
                return FALSE;\r
@@ -1418,7 +1418,7 @@ FX_BOOL   CPDFXFA_Document::GetPDFScriptObject(XFA_HDOC hDoc, FX_BSTR utf8Name, FX
        return _GetHValueByName(utf8Name, hValue, m_pSDKDoc->GetEnv()->GetJSRuntime());\r
 \r
 }\r
-FX_BOOL CPDFXFA_Document::GetGlobalProperty(XFA_HDOC hDoc, FX_BSTR szPropName, FXJSE_HVALUE hValue)\r
+FX_BOOL CPDFXFA_Document::GetGlobalProperty(IXFA_Doc* hDoc, FX_BSTR szPropName, FXJSE_HVALUE hValue)\r
 {\r
        if (hDoc != m_pXFADoc)\r
                return FALSE;\r
index cf05d4c..7cd72de 100644 (file)
@@ -69,7 +69,7 @@ FX_BOOL CPDFXFA_Page::LoadXFAPageView()
 {\r
        if (!m_pDocument)\r
                return FALSE;\r
-       XFA_HDOC pXFADoc = m_pDocument->GetXFADoc();\r
+       IXFA_Doc* pXFADoc = m_pDocument->GetXFADoc();\r
        if (pXFADoc)\r
        {\r
                IXFA_DocView* pXFADocView = m_pDocument->GetXFADocView();\r
@@ -99,9 +99,6 @@ FX_BOOL CPDFXFA_Page::LoadPage()
                return FALSE;\r
 \r
        int iDocType = m_pDocument->GetDocType();\r
-       CPDF_Document* pPDFDoc = m_pDocument->GetPDFDoc();\r
-       XFA_HDOC pXFADoc = m_pDocument->GetXFADoc();\r
-\r
        switch (iDocType)\r
        {\r
        case DOCTYPE_PDF:\r
index e7ddcce..4d6a036 100644 (file)
@@ -27,9 +27,14 @@ class IXFA_WidgetIterator;
 class IXFA_MenuHandler;\r
 class IXFA_ChecksumContext;\r
 class IXFA_WidgetAccIterator;\r
-typedef struct _XFA_HDOC {\r
-    FX_LPVOID pData;\r
-}* XFA_HDOC;\r
+\r
+class IXFA_Doc {\r
+public:\r
+    virtual ~IXFA_Doc() { }\r
+protected:\r
+    IXFA_Doc() { }\r
+};\r
+\r
 typedef struct _XFA_HWIDGET {\r
     FX_LPVOID pData;\r
 }* XFA_HWIDGET;\r
@@ -258,8 +263,8 @@ public:
     static IXFA_FontMgr* CreateDefault();\r
     virtual ~IXFA_FontMgr();\r
 \r
-    virtual IFX_Font*  GetFont(XFA_HDOC hDoc, FX_WSTR wsFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage = 0xFFFF) = 0;\r
-    virtual IFX_Font*  GetDefaultFont(XFA_HDOC hDoc, FX_WSTR wsFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage = 0xFFFF) = 0;\r
+    virtual IFX_Font*  GetFont(IXFA_Doc* hDoc, FX_WSTR wsFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage = 0xFFFF) = 0;\r
+    virtual IFX_Font*  GetDefaultFont(IXFA_Doc* hDoc, FX_WSTR wsFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage = 0xFFFF) = 0;\r
 };\r
 class IXFA_App\r
 {\r
@@ -268,8 +273,8 @@ public:
     virtual ~IXFA_App();\r
 \r
     virtual IXFA_DocHandler*   GetDocHandler() = 0;\r
-    virtual XFA_HDOC                   CreateDoc(IXFA_DocProvider* pProvider, IFX_FileRead* pStream, FX_BOOL bTakeOverFile = TRUE) = 0;\r
-    virtual XFA_HDOC                   CreateDoc(IXFA_DocProvider* pProvider, CPDF_Document* pPDFDoc) = 0;\r
+    virtual IXFA_Doc*                  CreateDoc(IXFA_DocProvider* pProvider, IFX_FileRead* pStream, FX_BOOL bTakeOverFile = TRUE) = 0;\r
+    virtual IXFA_Doc*                  CreateDoc(IXFA_DocProvider* pProvider, CPDF_Document* pPDFDoc) = 0;\r
     virtual    IXFA_AppProvider*       GetAppProvider() = 0;\r
     virtual void                               SetDefaultFontMgr(IXFA_FontMgr* pFontMgr) = 0;\r
     virtual IXFA_MenuHandler*  GetMenuHandler() = 0;\r
@@ -319,7 +324,7 @@ class IXFA_DocProvider
 public:\r
     virtual ~IXFA_DocProvider() { }\r
 \r
-    virtual void               SetChangeMark(XFA_HDOC hDoc) = 0;\r
+    virtual void               SetChangeMark(IXFA_Doc* hDoc) = 0;\r
     virtual void               InvalidateRect(IXFA_PageView* pPageView, const CFX_RectF& rt, FX_DWORD dwFlags = 0) = 0;\r
     virtual void               DisplayCaret(XFA_HWIDGET hWidget, FX_BOOL bVisible, const CFX_RectF* pRtAnchor) = 0;\r
     virtual FX_BOOL            GetPopupPos(XFA_HWIDGET hWidget, FX_FLOAT fMinPopup, FX_FLOAT fMaxPopup,\r
@@ -331,52 +336,52 @@ public:
     {\r
         return FALSE;\r
     }\r
-    virtual    FX_INT32        CountPages(XFA_HDOC hDoc) = 0;\r
-    virtual    FX_INT32        GetCurrentPage(XFA_HDOC hDoc) = 0;\r
-    virtual void               SetCurrentPage(XFA_HDOC hDoc, FX_INT32 iCurPage) = 0;\r
-    virtual FX_BOOL            IsCalculationsEnabled(XFA_HDOC hDoc) = 0;\r
-    virtual void               SetCalculationsEnabled(XFA_HDOC hDoc, FX_BOOL bEnabled) = 0;\r
-    virtual void               GetTitle(XFA_HDOC hDoc, CFX_WideString &wsTitle) = 0;\r
-    virtual void               SetTitle(XFA_HDOC hDoc, FX_WSTR wsTitle) = 0;\r
-    virtual void               ExportData(XFA_HDOC hDoc, FX_WSTR wsFilePath, FX_BOOL bXDP = TRUE) = 0;\r
-    virtual void               ImportData(XFA_HDOC hDoc, FX_WSTR wsFilePath) = 0;\r
-    virtual void               GotoURL(XFA_HDOC hDoc, FX_WSTR bsURL, FX_BOOL bAppend = TRUE) = 0;\r
-    virtual FX_BOOL            IsValidationsEnabled(XFA_HDOC hDoc) = 0;\r
-    virtual void               SetValidationsEnabled(XFA_HDOC hDoc, FX_BOOL bEnabled) = 0;\r
-    virtual void               SetFocusWidget(XFA_HDOC hDoc, XFA_HWIDGET hWidget) = 0;\r
-    virtual void               Print(XFA_HDOC hDoc, FX_INT32 nStartPage, FX_INT32 nEndPage, FX_DWORD dwOptions) = 0;\r
-    virtual FX_INT32                   AbsPageCountInBatch(XFA_HDOC hDoc) = 0;\r
-    virtual FX_INT32                   AbsPageInBatch(XFA_HDOC hDoc, XFA_HWIDGET hWidget) = 0;\r
-    virtual FX_INT32                   SheetCountInBatch(XFA_HDOC hDoc) = 0;\r
-    virtual FX_INT32                   SheetInBatch(XFA_HDOC hDoc, XFA_HWIDGET hWidget) = 0;\r
-    virtual FX_INT32                   Verify(XFA_HDOC hDoc, CXFA_Node* pSigNode, FX_BOOL bUsed = TRUE)\r
+    virtual    FX_INT32        CountPages(IXFA_Doc* hDoc) = 0;\r
+    virtual    FX_INT32        GetCurrentPage(IXFA_Doc* hDoc) = 0;\r
+    virtual void               SetCurrentPage(IXFA_Doc* hDoc, FX_INT32 iCurPage) = 0;\r
+    virtual FX_BOOL            IsCalculationsEnabled(IXFA_Doc* hDoc) = 0;\r
+    virtual void               SetCalculationsEnabled(IXFA_Doc* hDoc, FX_BOOL bEnabled) = 0;\r
+    virtual void               GetTitle(IXFA_Doc* hDoc, CFX_WideString &wsTitle) = 0;\r
+    virtual void               SetTitle(IXFA_Doc* hDoc, FX_WSTR wsTitle) = 0;\r
+    virtual void               ExportData(IXFA_Doc* hDoc, FX_WSTR wsFilePath, FX_BOOL bXDP = TRUE) = 0;\r
+    virtual void               ImportData(IXFA_Doc* hDoc, FX_WSTR wsFilePath) = 0;\r
+    virtual void               GotoURL(IXFA_Doc* hDoc, FX_WSTR bsURL, FX_BOOL bAppend = TRUE) = 0;\r
+    virtual FX_BOOL            IsValidationsEnabled(IXFA_Doc* hDoc) = 0;\r
+    virtual void               SetValidationsEnabled(IXFA_Doc* hDoc, FX_BOOL bEnabled) = 0;\r
+    virtual void               SetFocusWidget(IXFA_Doc* hDoc, XFA_HWIDGET hWidget) = 0;\r
+    virtual void               Print(IXFA_Doc* hDoc, FX_INT32 nStartPage, FX_INT32 nEndPage, FX_DWORD dwOptions) = 0;\r
+    virtual FX_INT32                   AbsPageCountInBatch(IXFA_Doc* hDoc) = 0;\r
+    virtual FX_INT32                   AbsPageInBatch(IXFA_Doc* hDoc, XFA_HWIDGET hWidget) = 0;\r
+    virtual FX_INT32                   SheetCountInBatch(IXFA_Doc* hDoc) = 0;\r
+    virtual FX_INT32                   SheetInBatch(IXFA_Doc* hDoc, XFA_HWIDGET hWidget) = 0;\r
+    virtual FX_INT32                   Verify(IXFA_Doc* hDoc, CXFA_Node* pSigNode, FX_BOOL bUsed = TRUE)\r
     {\r
         return 0;\r
     }\r
-    virtual FX_BOOL                            Sign(XFA_HDOC hDoc, CXFA_NodeList* pNodeList, FX_WSTR wsExpression, FX_WSTR wsXMLIdent, FX_WSTR wsValue = FX_WSTRC(L"open"), FX_BOOL bUsed = TRUE)\r
+    virtual FX_BOOL                            Sign(IXFA_Doc* hDoc, CXFA_NodeList* pNodeList, FX_WSTR wsExpression, FX_WSTR wsXMLIdent, FX_WSTR wsValue = FX_WSTRC(L"open"), FX_BOOL bUsed = TRUE)\r
     {\r
         return 0;\r
     }\r
-    virtual CXFA_NodeList*             Enumerate(XFA_HDOC hDoc)\r
+    virtual CXFA_NodeList*             Enumerate(IXFA_Doc* hDoc)\r
     {\r
         return 0;\r
     }\r
-    virtual FX_BOOL                            Clear(XFA_HDOC hDoc, CXFA_Node* pSigNode, FX_BOOL bCleared = TRUE)\r
+    virtual FX_BOOL                            Clear(IXFA_Doc* hDoc, CXFA_Node* pSigNode, FX_BOOL bCleared = TRUE)\r
     {\r
         return 0;\r
     }\r
-    virtual void               GetURL(XFA_HDOC hDoc, CFX_WideString &wsDocURL) = 0;\r
-    virtual FX_ARGB            GetHighlightColor(XFA_HDOC hDoc) = 0;\r
+    virtual void               GetURL(IXFA_Doc* hDoc, CFX_WideString &wsDocURL) = 0;\r
+    virtual FX_ARGB            GetHighlightColor(IXFA_Doc* hDoc) = 0;\r
     virtual void               AddDoRecord(XFA_HWIDGET hWidget) = 0;\r
 \r
-    virtual FX_BOOL            SubmitData(XFA_HDOC hDoc, CXFA_Submit submit) = 0;\r
-    virtual FX_BOOL            CheckWord(XFA_HDOC hDoc, FX_BSTR sWord) = 0;\r
-    virtual FX_BOOL            GetSuggestWords(XFA_HDOC hDoc, FX_BSTR sWord, CFX_ByteStringArray& sSuggest) = 0;\r
-    virtual FX_BOOL            GetPDFScriptObject(XFA_HDOC hDoc, FX_BSTR utf8Name, FXJSE_HVALUE hValue) = 0;\r
-    virtual FX_BOOL            GetGlobalProperty(XFA_HDOC hDoc, FX_BSTR szPropName, FXJSE_HVALUE hValue) = 0;\r
-    virtual FX_BOOL            SetGlobalProperty(XFA_HDOC hDoc, FX_BSTR szPropName, FXJSE_HVALUE hValue) = 0;\r
-    virtual CPDF_Document*  OpenPDF(XFA_HDOC hDoc, IFX_FileRead* pFile, FX_BOOL bTakeOverFile) = 0;\r
-    virtual IFX_FileRead*      OpenLinkedFile(XFA_HDOC hDoc, const CFX_WideString& wsLink) = 0;\r
+    virtual FX_BOOL            SubmitData(IXFA_Doc* hDoc, CXFA_Submit submit) = 0;\r
+    virtual FX_BOOL            CheckWord(IXFA_Doc* hDoc, FX_BSTR sWord) = 0;\r
+    virtual FX_BOOL            GetSuggestWords(IXFA_Doc* hDoc, FX_BSTR sWord, CFX_ByteStringArray& sSuggest) = 0;\r
+    virtual FX_BOOL            GetPDFScriptObject(IXFA_Doc* hDoc, FX_BSTR utf8Name, FXJSE_HVALUE hValue) = 0;\r
+    virtual FX_BOOL            GetGlobalProperty(IXFA_Doc* hDoc, FX_BSTR szPropName, FXJSE_HVALUE hValue) = 0;\r
+    virtual FX_BOOL            SetGlobalProperty(IXFA_Doc* hDoc, FX_BSTR szPropName, FXJSE_HVALUE hValue) = 0;\r
+    virtual CPDF_Document*  OpenPDF(IXFA_Doc* hDoc, IFX_FileRead* pFile, FX_BOOL bTakeOverFile) = 0;\r
+    virtual IFX_FileRead*      OpenLinkedFile(IXFA_Doc* hDoc, const CFX_WideString& wsLink) = 0;\r
 };\r
 #define XFA_DOCVIEW_View               0x00000000\r
 #define XFA_DOCVIEW_MasterPage 0x00000001\r
@@ -394,27 +399,27 @@ class IXFA_DocHandler
 public:\r
     virtual ~IXFA_DocHandler() { }\r
 \r
-    virtual void                               ReleaseDoc(XFA_HDOC hDoc) = 0;\r
-    virtual IXFA_DocProvider*  GetDocProvider(XFA_HDOC hDoc) = 0;\r
+    virtual void                               ReleaseDoc(IXFA_Doc* hDoc) = 0;\r
+    virtual IXFA_DocProvider*  GetDocProvider(IXFA_Doc* hDoc) = 0;\r
 \r
-    virtual FX_DWORD                   GetDocType(XFA_HDOC hDoc) = 0;\r
-    virtual    FX_INT32                        StartLoad(XFA_HDOC hDoc) = 0;\r
-    virtual FX_INT32                   DoLoad(XFA_HDOC hDoc, IFX_Pause *pPause = NULL) = 0;\r
-    virtual void                               StopLoad(XFA_HDOC hDoc) = 0;\r
+    virtual FX_DWORD                   GetDocType(IXFA_Doc* hDoc) = 0;\r
+    virtual    FX_INT32                        StartLoad(IXFA_Doc* hDoc) = 0;\r
+    virtual FX_INT32                   DoLoad(IXFA_Doc* hDoc, IFX_Pause *pPause = NULL) = 0;\r
+    virtual void                               StopLoad(IXFA_Doc* hDoc) = 0;\r
 \r
-    virtual IXFA_DocView*              CreateDocView(XFA_HDOC hDoc, FX_DWORD dwView = 0) = 0;\r
+    virtual IXFA_DocView*              CreateDocView(IXFA_Doc* hDoc, FX_DWORD dwView = 0) = 0;\r
 \r
-    virtual FX_INT32                   CountPackages(XFA_HDOC hDoc) = 0;\r
-    virtual    void                            GetPackageName(XFA_HDOC hDoc, FX_INT32 iPackage, CFX_WideStringC &wsPackage) = 0;\r
+    virtual FX_INT32                   CountPackages(IXFA_Doc* hDoc) = 0;\r
+    virtual    void                            GetPackageName(IXFA_Doc* hDoc, FX_INT32 iPackage, CFX_WideStringC &wsPackage) = 0;\r
 \r
-    virtual FX_BOOL                            SavePackage(XFA_HDOC hDoc, FX_WSTR wsPackage, IFX_FileWrite* pFile, IXFA_ChecksumContext *pCSContext = NULL) = 0;\r
-    virtual FX_BOOL                            CloseDoc(XFA_HDOC hDoc) = 0;\r
+    virtual FX_BOOL                            SavePackage(IXFA_Doc* hDoc, FX_WSTR wsPackage, IFX_FileWrite* pFile, IXFA_ChecksumContext *pCSContext = NULL) = 0;\r
+    virtual FX_BOOL                            CloseDoc(IXFA_Doc* hDoc) = 0;\r
 \r
-    virtual FX_BOOL                            ImportData(XFA_HDOC hDoc, IFX_FileRead* pStream, FX_BOOL bXDP = TRUE) = 0;\r
-    virtual    void                            SetJSERuntime(XFA_HDOC hDoc, FXJSE_HRUNTIME hRuntime) = 0;\r
-    virtual FXJSE_HVALUE               GetXFAScriptObject(XFA_HDOC hDoc) = 0;\r
-    virtual XFA_ATTRIBUTEENUM  GetRestoreState(XFA_HDOC hDoc) = 0;\r
-    virtual FX_BOOL                            RunDocScript(XFA_HDOC hDoc, XFA_SCRIPTTYPE eScriptType, FX_WSTR wsScript, FXJSE_HVALUE hRetValue, FXJSE_HVALUE hThisObject) = 0;\r
+    virtual FX_BOOL                            ImportData(IXFA_Doc* hDoc, IFX_FileRead* pStream, FX_BOOL bXDP = TRUE) = 0;\r
+    virtual    void                            SetJSERuntime(IXFA_Doc* hDoc, FXJSE_HRUNTIME hRuntime) = 0;\r
+    virtual FXJSE_HVALUE               GetXFAScriptObject(IXFA_Doc* hDoc) = 0;\r
+    virtual XFA_ATTRIBUTEENUM  GetRestoreState(IXFA_Doc* hDoc) = 0;\r
+    virtual FX_BOOL                            RunDocScript(IXFA_Doc* hDoc, XFA_SCRIPTTYPE eScriptType, FX_WSTR wsScript, FXJSE_HVALUE hRetValue, FXJSE_HVALUE hThisObject) = 0;\r
 };\r
 enum XFA_EVENTTYPE {\r
     XFA_EVENT_Click,\r
@@ -517,7 +522,7 @@ class IXFA_DocView
 public:\r
     virtual ~IXFA_DocView() { }\r
 \r
-    virtual XFA_HDOC                   GetDoc() = 0;\r
+    virtual IXFA_Doc*                  GetDoc() = 0;\r
     virtual    FX_INT32                        StartLayout(FX_INT32 iStartPage = 0) = 0;\r
     virtual FX_INT32                   DoLayout(IFX_Pause *pPause = NULL) = 0;\r
     virtual void                               StopLayout() = 0;\r
index abd0246..ea51369 100644 (file)
@@ -212,7 +212,7 @@ IXFA_DocHandler* CXFA_FFApp::GetDocHandler()
     }\r
     return m_pDocHandler;\r
 }\r
-XFA_HDOC CXFA_FFApp::CreateDoc(IXFA_DocProvider* pProvider, IFX_FileRead* pStream, FX_BOOL bTakeOverFile)\r
+IXFA_Doc* CXFA_FFApp::CreateDoc(IXFA_DocProvider* pProvider, IFX_FileRead* pStream, FX_BOOL bTakeOverFile)\r
 {\r
     CXFA_FFDoc* pDoc = FX_NEW CXFA_FFDoc(this, pProvider);\r
     if (!pDoc) {\r
@@ -223,9 +223,9 @@ XFA_HDOC CXFA_FFApp::CreateDoc(IXFA_DocProvider* pProvider, IFX_FileRead* pStrea
         delete pDoc;\r
         pDoc = NULL;\r
     }\r
-    return (XFA_HDOC)pDoc;\r
+    return pDoc;\r
 }\r
-XFA_HDOC CXFA_FFApp::CreateDoc(IXFA_DocProvider* pProvider, CPDF_Document *pPDFDoc)\r
+IXFA_Doc* CXFA_FFApp::CreateDoc(IXFA_DocProvider* pProvider, CPDF_Document *pPDFDoc)\r
 {\r
     if (pPDFDoc == NULL) {\r
         return NULL;\r
@@ -239,7 +239,7 @@ XFA_HDOC CXFA_FFApp::CreateDoc(IXFA_DocProvider* pProvider, CPDF_Document *pPDFD
         delete pDoc;\r
         pDoc = NULL;\r
     }\r
-    return (XFA_HDOC)pDoc;\r
+    return pDoc;\r
 }\r
 \r
 void CXFA_FFApp::SetDefaultFontMgr(IXFA_FontMgr* pFontMgr)\r
index b99f1fe..19eb347 100644 (file)
@@ -4,8 +4,9 @@
 \r
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com\r
 \r
-#ifndef _FXFA_FORMFILLER_APP_IMP_H\r
-#define _FXFA_FORMFILLER_APP_IMP_H\r
+#ifndef XFA_FFAPP_H_\r
+#define XFA_FFAPP_H_\r
+\r
 class CXFA_FileRead : public IFX_FileRead\r
 {\r
 public:\r
@@ -50,8 +51,8 @@ public:
     ~CXFA_FFApp() override;\r
 \r
     virtual IXFA_DocHandler*   GetDocHandler();\r
-    virtual XFA_HDOC                   CreateDoc(IXFA_DocProvider* pProvider, IFX_FileRead* pStream, FX_BOOL bTakeOverFile);\r
-    virtual XFA_HDOC                   CreateDoc(IXFA_DocProvider* pProvider, CPDF_Document* pPDFDoc);\r
+    virtual IXFA_Doc*                  CreateDoc(IXFA_DocProvider* pProvider, IFX_FileRead* pStream, FX_BOOL bTakeOverFile);\r
+    virtual IXFA_Doc*                  CreateDoc(IXFA_DocProvider* pProvider, CPDF_Document* pPDFDoc);\r
     virtual    IXFA_AppProvider*       GetAppProvider()\r
     {\r
         return m_pProvider;\r
@@ -86,4 +87,5 @@ protected:
     CXFA_FFMenuHandler*                m_pMenuHandler;\r
     CFWL_SDAdapterThreadMgr* m_pAdapterThreadMgr;\r
 };\r
-#endif\r
+\r
+#endif  // XFA_FFAPP_H_\r
index 92eb0ec..4ca1007 100644 (file)
@@ -126,13 +126,13 @@ FX_INT32 CXFA_FFDoc::DoLoad(IFX_Pause *pPause )
             CFX_WideString wsHref;\r
             ((IFDE_XMLElement*)pPDFXML)->GetString(L"href", wsHref);\r
             if (!wsHref.IsEmpty()) {\r
-                pXFAReader = GetDocProvider()->OpenLinkedFile((XFA_HDOC)this, wsHref);\r
+                pXFAReader = GetDocProvider()->OpenLinkedFile(this, wsHref);\r
             }\r
         }\r
         if (!pXFAReader) {\r
             return XFA_PARSESTATUS_SyntaxErr;\r
         }\r
-        CPDF_Document* pPDFDocument = GetDocProvider()->OpenPDF(reinterpret_cast<XFA_HDOC>(this), pXFAReader, TRUE);\r
+        CPDF_Document* pPDFDocument = GetDocProvider()->OpenPDF(this, pXFAReader, TRUE);\r
         FXSYS_assert(!m_pPDFDoc);\r
         if (!OpenDoc(pPDFDocument)) {\r
             return XFA_PARSESTATUS_SyntaxErr;\r
@@ -158,7 +158,7 @@ FX_INT32 CXFA_FFDoc::DoLoad(IFX_Pause *pPause )
 }\r
 void CXFA_FFDoc::StopLoad()\r
 {\r
-    m_pApp->GetXFAFontMgr()->LoadDocFonts((XFA_HDOC)this);\r
+    m_pApp->GetXFAFontMgr()->LoadDocFonts(this);\r
     m_dwDocType = XFA_DOCTYPE_Static;\r
     CXFA_Node* pConfig = (CXFA_Node*)m_pDocument->GetXFANode(XFA_HASHCODE_Config);\r
     if (!pConfig) {\r
@@ -296,7 +296,7 @@ FX_BOOL CXFA_FFDoc::CloseDoc()
         delete m_pNotify;\r
         m_pNotify = NULL;\r
     }\r
-    m_pApp->GetXFAFontMgr()->ReleaseDocFonts((XFA_HDOC)this);\r
+    m_pApp->GetXFAFontMgr()->ReleaseDocFonts(this);\r
     if (m_dwDocType != XFA_DOCTYPE_XDP && m_pStream && m_bOwnStream) {\r
         m_pStream->Release();\r
         m_pStream = NULL;\r
index 0f95d0b..964573f 100644 (file)
@@ -4,18 +4,23 @@
 \r
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com\r
 \r
-#ifndef _FXFA_FORMFILLER_DOC_IMP_H\r
-#define _FXFA_FORMFILLER_DOC_IMP_H\r
+#ifndef FXFA_SRC_APP_XFA_FFDOC_H_\r
+#define FXFA_SRC_APP_XFA_FFDOC_H_\r
+\r
+#include "../../../../include/fxfa/fxfa.h"\r
+\r
 class CXFA_FFApp;\r
 class CXFA_FFNotify;\r
 class CXFA_FFDocView;\r
 class IXFA_Locale;\r
+\r
 typedef struct _FX_IMAGEDIB_AND_DPI {\r
     CFX_DIBSource* pDibSource;\r
     FX_INT32      iImageXDpi;\r
     FX_INT32      iImageYDpi;\r
 } FX_IMAGEDIB_AND_DPI;\r
-class CXFA_FFDoc\r
+\r
+class CXFA_FFDoc : public IXFA_Doc\r
 {\r
 public:\r
     CXFA_FFDoc(CXFA_FFApp* pApp, IXFA_DocProvider* pDocProvider);\r
@@ -60,4 +65,5 @@ protected:
     FX_DWORD                           m_dwDocType;\r
     FX_BOOL                                    m_bOwnStream;\r
 };\r
-#endif\r
+\r
+#endif  // FXFA_SRC_APP_XFA_FFDOC_H_\r
index 426a455..9d76ca1 100644 (file)
@@ -14,66 +14,66 @@ CXFA_FFDocHandler::CXFA_FFDocHandler()
 CXFA_FFDocHandler::~CXFA_FFDocHandler()\r
 {\r
 }\r
-void CXFA_FFDocHandler::ReleaseDoc(XFA_HDOC hDoc)\r
+void CXFA_FFDocHandler::ReleaseDoc(IXFA_Doc* hDoc)\r
 {\r
-    delete (CXFA_FFDoc*)hDoc;\r
+    delete hDoc;  // virtual dtor.\r
 }\r
-IXFA_DocProvider* CXFA_FFDocHandler::GetDocProvider(XFA_HDOC hDoc)\r
+IXFA_DocProvider* CXFA_FFDocHandler::GetDocProvider(IXFA_Doc* hDoc)\r
 {\r
-    return ((CXFA_FFDoc*)hDoc)->GetDocProvider();\r
+    return static_cast<CXFA_FFDoc*>(hDoc)->GetDocProvider();\r
 }\r
-FX_DWORD CXFA_FFDocHandler::GetDocType(XFA_HDOC hDoc)\r
+FX_DWORD CXFA_FFDocHandler::GetDocType(IXFA_Doc* hDoc)\r
 {\r
-    return ((CXFA_FFDoc*)hDoc)->GetDocType();\r
+    return static_cast<CXFA_FFDoc*>(hDoc)->GetDocType();\r
 }\r
-FX_INT32 CXFA_FFDocHandler::StartLoad(XFA_HDOC hDoc)\r
+FX_INT32 CXFA_FFDocHandler::StartLoad(IXFA_Doc* hDoc)\r
 {\r
-    return ((CXFA_FFDoc*)hDoc)->StartLoad();\r
+    return static_cast<CXFA_FFDoc*>(hDoc)->StartLoad();\r
 }\r
-FX_INT32 CXFA_FFDocHandler::DoLoad(XFA_HDOC hDoc, IFX_Pause *pPause )\r
+FX_INT32 CXFA_FFDocHandler::DoLoad(IXFA_Doc* hDoc, IFX_Pause *pPause )\r
 {\r
-    return ((CXFA_FFDoc*)hDoc)->DoLoad(pPause);\r
+    return static_cast<CXFA_FFDoc*>(hDoc)->DoLoad(pPause);\r
 }\r
-void CXFA_FFDocHandler::StopLoad(XFA_HDOC hDoc)\r
+void CXFA_FFDocHandler::StopLoad(IXFA_Doc* hDoc)\r
 {\r
-    ((CXFA_FFDoc*)hDoc)->StopLoad();\r
+    static_cast<CXFA_FFDoc*>(hDoc)->StopLoad();\r
 }\r
 \r
-IXFA_DocView* CXFA_FFDocHandler::CreateDocView(XFA_HDOC hDoc, FX_DWORD dwView )\r
+IXFA_DocView* CXFA_FFDocHandler::CreateDocView(IXFA_Doc* hDoc, FX_DWORD dwView )\r
 {\r
-    return ((CXFA_FFDoc*)hDoc)->CreateDocView(dwView);\r
+    return static_cast<CXFA_FFDoc*>(hDoc)->CreateDocView(dwView);\r
 }\r
-FX_INT32 CXFA_FFDocHandler::CountPackages(XFA_HDOC hDoc)\r
+FX_INT32 CXFA_FFDocHandler::CountPackages(IXFA_Doc* hDoc)\r
 {\r
     return 0;\r
 }\r
-void CXFA_FFDocHandler::GetPackageName(XFA_HDOC hDoc, FX_INT32 iPackage, CFX_WideStringC &wsPackage)\r
+void CXFA_FFDocHandler::GetPackageName(IXFA_Doc* hDoc, FX_INT32 iPackage, CFX_WideStringC &wsPackage)\r
 {\r
 }\r
-IFDE_XMLElement* CXFA_FFDocHandler::GetPackageData(XFA_HDOC hDoc, FX_WSTR wsPackage)\r
+IFDE_XMLElement* CXFA_FFDocHandler::GetPackageData(IXFA_Doc* hDoc, FX_WSTR wsPackage)\r
 {\r
-    return ((CXFA_FFDoc*)hDoc)->GetPackageData(wsPackage);\r
+    return static_cast<CXFA_FFDoc*>(hDoc)->GetPackageData(wsPackage);\r
 }\r
-FX_BOOL CXFA_FFDocHandler::SavePackage(XFA_HDOC hDoc, FX_WSTR wsPackage, IFX_FileWrite* pFile, IXFA_ChecksumContext *pCSContext )\r
+FX_BOOL CXFA_FFDocHandler::SavePackage(IXFA_Doc* hDoc, FX_WSTR wsPackage, IFX_FileWrite* pFile, IXFA_ChecksumContext *pCSContext )\r
 {\r
-    return ((CXFA_FFDoc*)hDoc)->SavePackage(wsPackage, pFile, pCSContext);\r
+    return static_cast<CXFA_FFDoc*>(hDoc)->SavePackage(wsPackage, pFile, pCSContext);\r
 }\r
-FX_BOOL CXFA_FFDocHandler::CloseDoc(XFA_HDOC hDoc)\r
+FX_BOOL CXFA_FFDocHandler::CloseDoc(IXFA_Doc* hDoc)\r
 {\r
-    return ((CXFA_FFDoc*)hDoc)->CloseDoc();\r
+    return static_cast<CXFA_FFDoc*>(hDoc)->CloseDoc();\r
 }\r
 \r
-FX_BOOL CXFA_FFDocHandler::ImportData(XFA_HDOC hDoc, IFX_FileRead* pStream, FX_BOOL bXDP )\r
+FX_BOOL CXFA_FFDocHandler::ImportData(IXFA_Doc* hDoc, IFX_FileRead* pStream, FX_BOOL bXDP )\r
 {\r
-    return ((CXFA_FFDoc*)hDoc)->ImportData(pStream, bXDP);\r
+    return static_cast<CXFA_FFDoc*>(hDoc)->ImportData(pStream, bXDP);\r
 }\r
-void CXFA_FFDocHandler::SetJSERuntime(XFA_HDOC hDoc, FXJSE_HRUNTIME hRuntime)\r
+void CXFA_FFDocHandler::SetJSERuntime(IXFA_Doc* hDoc, FXJSE_HRUNTIME hRuntime)\r
 {\r
-    ((CXFA_FFDoc*)hDoc)->GetXFADoc()->InitScriptContext(hRuntime);\r
+    static_cast<CXFA_FFDoc*>(hDoc)->GetXFADoc()->InitScriptContext(hRuntime);\r
 }\r
-FXJSE_HVALUE CXFA_FFDocHandler::GetXFAScriptObject(XFA_HDOC hDoc)\r
+FXJSE_HVALUE CXFA_FFDocHandler::GetXFAScriptObject(IXFA_Doc* hDoc)\r
 {\r
-    CXFA_Document* pXFADoc = ((CXFA_FFDoc*)hDoc)->GetXFADoc();\r
+    CXFA_Document* pXFADoc = static_cast<CXFA_FFDoc*>(hDoc)->GetXFADoc();\r
     if (!pXFADoc) {\r
         return NULL;\r
     }\r
@@ -83,9 +83,9 @@ FXJSE_HVALUE CXFA_FFDocHandler::GetXFAScriptObject(XFA_HDOC hDoc)
     }\r
     return pScriptContext->GetJSValueFromMap(pXFADoc->GetRoot());\r
 }\r
-XFA_ATTRIBUTEENUM CXFA_FFDocHandler::GetRestoreState(XFA_HDOC hDoc)\r
+XFA_ATTRIBUTEENUM CXFA_FFDocHandler::GetRestoreState(IXFA_Doc* hDoc)\r
 {\r
-    CXFA_Document* pXFADoc = ((CXFA_FFDoc*)hDoc)->GetXFADoc();\r
+    CXFA_Document* pXFADoc = static_cast<CXFA_FFDoc*>(hDoc)->GetXFADoc();\r
     if (!pXFADoc) {\r
         return XFA_ATTRIBUTEENUM_Unknown;\r
     }\r
@@ -99,9 +99,9 @@ XFA_ATTRIBUTEENUM CXFA_FFDocHandler::GetRestoreState(XFA_HDOC hDoc)
     }\r
     return pSubForm->GetEnum(XFA_ATTRIBUTE_RestoreState);\r
 }\r
-FX_BOOL        CXFA_FFDocHandler::RunDocScript(XFA_HDOC hDoc, XFA_SCRIPTTYPE eScriptType, FX_WSTR wsScript, FXJSE_HVALUE hRetValue, FXJSE_HVALUE hThisObject)\r
+FX_BOOL        CXFA_FFDocHandler::RunDocScript(IXFA_Doc* hDoc, XFA_SCRIPTTYPE eScriptType, FX_WSTR wsScript, FXJSE_HVALUE hRetValue, FXJSE_HVALUE hThisObject)\r
 {\r
-    CXFA_Document* pXFADoc = ((CXFA_FFDoc*)hDoc)->GetXFADoc();\r
+    CXFA_Document* pXFADoc = static_cast<CXFA_FFDoc*>(hDoc)->GetXFADoc();\r
     if (!pXFADoc) {\r
         return FALSE;\r
     }\r
index 27b5b92..95abc6a 100644 (file)
@@ -4,31 +4,33 @@
 \r
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com\r
 \r
-#ifndef _FXFA_FORMFILLER_DOCHANDLER_IMP_H\r
-#define _FXFA_FORMFILLER_DOCHANDLER_IMP_H\r
+#ifndef XFA_FFDOCHANDLER_H_\r
+#define XFA_FFDOCHANDLER_H_\r
+\r
 class CXFA_FFDocHandler : public IXFA_DocHandler\r
 {\r
 public:\r
     CXFA_FFDocHandler();\r
     ~CXFA_FFDocHandler();\r
-    virtual void                               ReleaseDoc(XFA_HDOC hDoc);\r
-    virtual IXFA_DocProvider*  GetDocProvider(XFA_HDOC hDoc);\r
-    virtual FX_DWORD           GetDocType(XFA_HDOC hDoc);\r
-    virtual    FX_INT32                StartLoad(XFA_HDOC hDoc);\r
-    virtual FX_INT32           DoLoad(XFA_HDOC hDoc, IFX_Pause *pPause = NULL);\r
-    virtual void                       StopLoad(XFA_HDOC hDoc);\r
+    virtual void                               ReleaseDoc(IXFA_Doc* hDoc);\r
+    virtual IXFA_DocProvider*  GetDocProvider(IXFA_Doc* hDoc);\r
+    virtual FX_DWORD           GetDocType(IXFA_Doc* hDoc);\r
+    virtual    FX_INT32                StartLoad(IXFA_Doc* hDoc);\r
+    virtual FX_INT32           DoLoad(IXFA_Doc* hDoc, IFX_Pause *pPause = NULL);\r
+    virtual void                       StopLoad(IXFA_Doc* hDoc);\r
 \r
-    virtual IXFA_DocView*      CreateDocView(XFA_HDOC hDoc, FX_DWORD dwView = 0);\r
-    virtual FX_INT32                   CountPackages(XFA_HDOC hDoc);\r
-    virtual    void                            GetPackageName(XFA_HDOC hDoc, FX_INT32 iPackage, CFX_WideStringC &wsPackage);\r
-    virtual IFDE_XMLElement*   GetPackageData(XFA_HDOC hDoc, FX_WSTR wsPackage);\r
-    virtual FX_BOOL                    SavePackage(XFA_HDOC hDoc, FX_WSTR wsPackage, IFX_FileWrite* pFile, IXFA_ChecksumContext *pCSContext = NULL);\r
-    virtual FX_BOOL                    CloseDoc(XFA_HDOC hDoc);\r
-    virtual FX_BOOL                    ImportData(XFA_HDOC hDoc, IFX_FileRead* pStream, FX_BOOL bXDP = TRUE);\r
-    virtual    void                    SetJSERuntime(XFA_HDOC hDoc, FXJSE_HRUNTIME hRuntime);\r
-    virtual FXJSE_HVALUE               GetXFAScriptObject(XFA_HDOC hDoc);\r
-    virtual XFA_ATTRIBUTEENUM  GetRestoreState(XFA_HDOC hDoc);\r
-    virtual FX_BOOL                    RunDocScript(XFA_HDOC hDoc, XFA_SCRIPTTYPE eScriptType, FX_WSTR wsScript, FXJSE_HVALUE hRetValue, FXJSE_HVALUE hThisObject);\r
+    virtual IXFA_DocView*      CreateDocView(IXFA_Doc* hDoc, FX_DWORD dwView = 0);\r
+    virtual FX_INT32                   CountPackages(IXFA_Doc* hDoc);\r
+    virtual    void                            GetPackageName(IXFA_Doc* hDoc, FX_INT32 iPackage, CFX_WideStringC &wsPackage);\r
+    virtual IFDE_XMLElement*   GetPackageData(IXFA_Doc* hDoc, FX_WSTR wsPackage);\r
+    virtual FX_BOOL                    SavePackage(IXFA_Doc* hDoc, FX_WSTR wsPackage, IFX_FileWrite* pFile, IXFA_ChecksumContext *pCSContext = NULL);\r
+    virtual FX_BOOL                    CloseDoc(IXFA_Doc* hDoc);\r
+    virtual FX_BOOL                    ImportData(IXFA_Doc* hDoc, IFX_FileRead* pStream, FX_BOOL bXDP = TRUE);\r
+    virtual    void                    SetJSERuntime(IXFA_Doc* hDoc, FXJSE_HRUNTIME hRuntime);\r
+    virtual FXJSE_HVALUE               GetXFAScriptObject(IXFA_Doc* hDoc);\r
+    virtual XFA_ATTRIBUTEENUM  GetRestoreState(IXFA_Doc* hDoc);\r
+    virtual FX_BOOL                    RunDocScript(IXFA_Doc* hDoc, XFA_SCRIPTTYPE eScriptType, FX_WSTR wsScript, FXJSE_HVALUE hRetValue, FXJSE_HVALUE hThisObject);\r
 protected:\r
 };\r
-#endif\r
+\r
+#endif  // XFA_FFDOCHANDLER_H_\r
index bb6a5ce..32d2789 100644 (file)
@@ -277,7 +277,7 @@ void CXFA_FFDocView::ResetWidgetData(CXFA_WidgetAcc* pWidgetAcc )
         }\r
     }\r
     if (bChanged) {\r
-        m_pDoc->GetDocProvider()->SetChangeMark((XFA_HDOC)m_pDoc);\r
+        m_pDoc->GetDocProvider()->SetChangeMark(m_pDoc);\r
     }\r
 }\r
 FX_INT32 CXFA_FFDocView::ProcessWidgetEvent(CXFA_EventParam* pParam, CXFA_WidgetAcc* pWidgetAcc )\r
@@ -419,7 +419,7 @@ void CXFA_FFDocView::SetFocusWidgetAcc(CXFA_WidgetAcc* pWidgetAcc)
     if (SetFocus((XFA_HWIDGET)pNewFocus)) {\r
         m_pFocusAcc = pWidgetAcc;\r
         if (m_iStatus >= XFA_DOCVIEW_LAYOUTSTATUS_End) {\r
-            m_pDoc->GetDocProvider()->SetFocusWidget((XFA_HDOC)m_pDoc, (XFA_HWIDGET)m_pFocusWidget);\r
+            m_pDoc->GetDocProvider()->SetFocusWidget(m_pDoc, (XFA_HWIDGET)m_pFocusWidget);\r
         }\r
     }\r
 }\r
@@ -709,8 +709,8 @@ void CXFA_FFDocView::RunCalculateRecursive(FX_INT32& iIndex)
 }\r
 FX_INT32 CXFA_FFDocView::RunCalculateWidgets()\r
 {\r
-    if (!m_pDoc->GetDocProvider()->IsCalculationsEnabled((XFA_HDOC)m_pDoc)) {\r
-        return  XFA_EVENTERROR_Disabled;\r
+    if (!m_pDoc->GetDocProvider()->IsCalculationsEnabled(m_pDoc)) {\r
+        return XFA_EVENTERROR_Disabled;\r
     }\r
     FX_INT32 iCounts = m_CalculateAccs.GetSize();\r
     FX_INT32 iIndex = 0;\r
@@ -737,7 +737,7 @@ FX_BOOL CXFA_FFDocView::InitCalculate(CXFA_Node* pNode)
 }\r
 FX_BOOL CXFA_FFDocView::InitValidate(CXFA_Node* pNode)\r
 {\r
-    if (!m_pDoc->GetDocProvider()->IsValidationsEnabled((XFA_HDOC)m_pDoc)) {\r
+    if (!m_pDoc->GetDocProvider()->IsValidationsEnabled(m_pDoc)) {\r
         return FALSE;\r
     }\r
     ExecEventActivityByDeepFirst(pNode, XFA_EVENT_Validate);\r
@@ -746,7 +746,7 @@ FX_BOOL CXFA_FFDocView::InitValidate(CXFA_Node* pNode)
 }\r
 FX_BOOL CXFA_FFDocView::RunValidate()\r
 {\r
-    if (!m_pDoc->GetDocProvider()->IsValidationsEnabled((XFA_HDOC)m_pDoc)) {\r
+    if (!m_pDoc->GetDocProvider()->IsValidationsEnabled(m_pDoc)) {\r
         return FALSE;\r
     }\r
     FX_INT32 iCounts = m_ValidateAccs.GetSize();\r
@@ -841,7 +841,7 @@ void CXFA_FFDocView::SetChangeMark()
     if (m_iStatus < XFA_DOCVIEW_LAYOUTSTATUS_End) {\r
         return;\r
     }\r
-    m_pDoc->GetDocProvider()->SetChangeMark((XFA_HDOC)m_pDoc);\r
+    m_pDoc->GetDocProvider()->SetChangeMark(m_pDoc);\r
 }\r
 CXFA_Node* CXFA_FFDocView::GetRootSubform()\r
 {\r
index 2f7919b..79a3008 100644 (file)
@@ -4,8 +4,11 @@
 \r
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com\r
 \r
-#ifndef _FXFA_FORMFILLER_DOCVIEW_IMP_H\r
-#define _FXFA_FORMFILLER_DOCVIEW_IMP_H\r
+#ifndef FXFA_SRC_APP_XFA_FFDOCVIEW_H_\r
+#define FXFA_SRC_APP_XFA_FFDOCVIEW_H_\r
+\r
+#include "xfa_ffdoc.h"\r
+\r
 class CXFA_FFPageView;\r
 class CXFA_FFWidgetHandler;\r
 class CXFA_FFDoc;\r
@@ -33,10 +36,8 @@ class CXFA_FFDocView : public IXFA_DocView
 public:\r
     CXFA_FFDocView(CXFA_FFDoc* pDoc);\r
     ~CXFA_FFDocView();\r
-    virtual XFA_HDOC           GetDoc()\r
-    {\r
-        return (XFA_HDOC)m_pDoc;\r
-    }\r
+\r
+    virtual IXFA_Doc* GetDoc() { return m_pDoc; }\r
     virtual    FX_INT32                StartLayout(FX_INT32 iStartPage = 0);\r
     virtual FX_INT32           DoLayout(IFX_Pause *pPause = NULL);\r
     virtual void                       StopLayout();\r
@@ -161,4 +162,5 @@ protected:
     CXFA_FFDocView*                            m_pDocView;\r
     CXFA_WidgetAcc*                            m_pCurWidgetAcc;\r
 };\r
-#endif\r
+\r
+#endif  // FXFA_SRC_APP_XFA_FFDOCVIEW_H_\r
index 5f32db5..34b73b5 100644 (file)
@@ -82,7 +82,7 @@ void CXFA_FFField::DrawHighlight(CFX_Graphics* pGS, CFX_Matrix* pMatrix, FX_DWOR
     }\r
     if ((dwStatus & XFA_WIDGETSTATUS_Highlight) && m_pDataAcc->GetAccess() == XFA_ATTRIBUTEENUM_Open) {\r
         CXFA_FFDoc* pDoc = GetDoc();\r
-        CFX_Color crHighlight(pDoc->GetDocProvider()->GetHighlightColor((XFA_HDOC)pDoc));\r
+        CFX_Color crHighlight(pDoc->GetDocProvider()->GetHighlightColor(pDoc));\r
         pGS->SetFillColor(&crHighlight);\r
         CFX_Path path;\r
         path.Create();\r
index fec25b5..2d6cc75 100644 (file)
@@ -298,9 +298,9 @@ void CXFA_FFNotify::AddCalcValidate(CXFA_Node* pNode)
     pDocView->AddCalculateWidgetAcc(pWidgetAcc);\r
     pDocView->AddValidateWidget(pWidgetAcc);\r
 }\r
-XFA_HDOC CXFA_FFNotify::GetHDOC()\r
+IXFA_Doc* CXFA_FFNotify::GetHDOC()\r
 {\r
-    return (XFA_HDOC)m_pDoc;\r
+    return m_pDoc;\r
 }\r
 IXFA_DocProvider* CXFA_FFNotify::GetDocProvider()\r
 {\r
@@ -529,7 +529,7 @@ void CXFA_FFNotify::OnChildAdded(CXFA_Node *pSender, FX_LPVOID pParam, FX_LPVOID
     }\r
     FX_BOOL bLayoutReady = !(pDocView->m_bInLayoutStatus) && (pDocView->GetLayoutStatus() >= XFA_DOCVIEW_LAYOUTSTATUS_End);\r
     if (bLayoutReady) {\r
-        m_pDoc->GetDocProvider()->SetChangeMark((XFA_HDOC)m_pDoc);\r
+        m_pDoc->GetDocProvider()->SetChangeMark(m_pDoc);\r
     }\r
 }\r
 void CXFA_FFNotify::OnChildRemoved(CXFA_Node *pSender, FX_LPVOID pParam, FX_LPVOID pParam2)\r
@@ -537,7 +537,7 @@ void CXFA_FFNotify::OnChildRemoved(CXFA_Node *pSender, FX_LPVOID pParam, FX_LPVO
     if (CXFA_FFDocView* pDocView = m_pDoc->GetDocView()) {\r
         FX_BOOL bLayoutReady = !(pDocView->m_bInLayoutStatus) && (pDocView->GetLayoutStatus() >= XFA_DOCVIEW_LAYOUTSTATUS_End);\r
         if (bLayoutReady) {\r
-            m_pDoc->GetDocProvider()->SetChangeMark((XFA_HDOC)m_pDoc);\r
+            m_pDoc->GetDocProvider()->SetChangeMark(m_pDoc);\r
         }\r
     }\r
 }\r
index a0f0820..739f253 100644 (file)
@@ -24,7 +24,7 @@ public:
     virtual FX_BOOL                            RunScript(CXFA_Node* pScript, CXFA_Node* pFormItem);\r
     virtual    FX_INT32                        ExecEventByDeepFirst(CXFA_Node* pFormNode, XFA_EVENTTYPE eEventType, FX_BOOL bIsFormReady = FALSE, FX_BOOL bRecursive = TRUE, CXFA_WidgetAcc    * pExclude = NULL);\r
     virtual void                               AddCalcValidate(CXFA_Node* pNode);\r
-    virtual XFA_HDOC                   GetHDOC();\r
+    virtual IXFA_Doc*                  GetHDOC();\r
     virtual IXFA_DocProvider*  GetDocProvider();\r
     virtual IXFA_AppProvider*  GetAppProvider();\r
     virtual IXFA_WidgetHandler*        GetWidgetHandler();\r
index eed50b5..1d121a3 100644 (file)
@@ -141,7 +141,7 @@ FX_BOOL CXFA_FFText::OnLButtonUp(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy)
         return FALSE;\r
     }\r
     CXFA_FFDoc* pDoc = GetDoc();\r
-    pDoc->GetDocProvider()->GotoURL((XFA_HDOC)pDoc, CFX_WideStringC(wsURLContent), FALSE);\r
+    pDoc->GetDocProvider()->GotoURL(pDoc, CFX_WideStringC(wsURLContent), FALSE);\r
     return TRUE;\r
 }\r
 FX_DWORD CXFA_FFText::OnHitTest(FX_FLOAT fx, FX_FLOAT fy)\r
index b2e5299..4178910 100644 (file)
@@ -395,14 +395,14 @@ FX_BOOL CXFA_FFTextEdit::CheckWord(FX_BSTR sWord)
     if (sWord.IsEmpty() || m_pDataAcc->GetUIType() != XFA_ELEMENT_TextEdit) {\r
         return TRUE;\r
     }\r
-    return GetDoc()->GetDocProvider()->CheckWord((XFA_HDOC)GetDoc(), sWord);\r
+    return GetDoc()->GetDocProvider()->CheckWord(GetDoc(), sWord);\r
 }\r
 FX_BOOL CXFA_FFTextEdit::GetSuggestWords(FX_BSTR sWord, CFX_ByteStringArray &sSuggest)\r
 {\r
     if (m_pDataAcc->GetUIType() != XFA_ELEMENT_TextEdit) {\r
         return FALSE;\r
     }\r
-    return GetDoc()->GetDocProvider()->GetSuggestWords((XFA_HDOC)GetDoc(), sWord, sSuggest);\r
+    return GetDoc()->GetDocProvider()->GetSuggestWords(GetDoc(), sWord, sSuggest);\r
 }\r
 FX_INT32 CXFA_FFTextEdit::OnProcessMessage(CFWL_Message *pMessage)\r
 {\r
@@ -829,7 +829,7 @@ void CXFA_FFDateTimeEdit::OnSelectChanged(IFWL_Widget *pWidget, FX_INT32 iYear,
     CFWL_DateTimePicker* pDateTime = (CFWL_DateTimePicker*)m_pNormalWidget;\r
     pDateTime->SetEditText(wsDate);\r
     pDateTime->Update();\r
-    GetDoc()->GetDocProvider()->SetFocusWidget((XFA_HDOC)GetDoc(), NULL);\r
+    GetDoc()->GetDocProvider()->SetFocusWidget(GetDoc(), NULL);\r
     CXFA_EventParam eParam;\r
     eParam.m_eType = XFA_EVENT_Change;\r
     eParam.m_pTarget = m_pDataAcc;\r
index 46e1d94..0967da1 100644 (file)
@@ -997,7 +997,7 @@ CFX_DIBitmap* XFA_LoadImageData(CXFA_FFDoc *pDoc, CXFA_Image *pImage, FX_BOOL &b
                 return pBitmap;\r
             }\r
         }\r
-        pImageFileRead = pDoc->GetDocProvider()->OpenLinkedFile((XFA_HDOC)pDoc, wsURL);\r
+        pImageFileRead = pDoc->GetDocProvider()->OpenLinkedFile(pDoc, wsURL);\r
     }\r
     if (!pImageFileRead) {\r
         if (pImageBuffer) {\r
index d51b1fa..d953e2b 100644 (file)
@@ -382,7 +382,7 @@ FX_INT32 CXFA_WidgetAcc::ProcessEvent(CXFA_Event& event, CXFA_EventParam* pEvent
             break;\r
         case XFA_ELEMENT_Submit: {\r
                 CXFA_Submit submit = event.GetSubmit();\r
-                return GetDoc()->GetDocProvider()->SubmitData((XFA_HDOC)GetDoc(), submit);\r
+                return GetDoc()->GetDocProvider()->SubmitData(GetDoc(), submit);\r
             }\r
         default:\r
             break;\r
@@ -1549,7 +1549,7 @@ IFX_Font* CXFA_WidgetAcc::GetFDEFont()
         font.GetTypeface(wsFontName);\r
     }\r
     CXFA_FFDoc* pDoc = GetDoc();\r
-    return pDoc->GetApp()->GetXFAFontMgr()->GetFont((XFA_HDOC)pDoc, wsFontName, dwFontStyle);\r
+    return pDoc->GetApp()->GetXFAFontMgr()->GetFont(pDoc, wsFontName, dwFontStyle);\r
 }\r
 FX_FLOAT CXFA_WidgetAcc::GetFontSize()\r
 {\r
index 12df3a0..9790b4b 100644 (file)
@@ -78,7 +78,7 @@ FX_BOOL       CXFA_FFWidgetHandler::OnLButtonDown(XFA_HWIDGET hWidget, FX_DWORD dwFlag
     ((CXFA_FFWidget*)hWidget)->Rotate2Normal(fx, fy);\r
     FX_BOOL bRet =  ((CXFA_FFWidget*)hWidget)->OnLButtonDown(dwFlags, fx, fy);\r
     if (bRet && m_pDocView->SetFocus(hWidget)) {\r
-        ((CXFA_FFDoc*)m_pDocView->GetDoc())->GetDocProvider()->SetFocusWidget((XFA_HDOC)m_pDocView->GetDoc(), (XFA_HWIDGET)hWidget);\r
+        ((CXFA_FFDoc*)m_pDocView->GetDoc())->GetDocProvider()->SetFocusWidget(m_pDocView->GetDoc(), (XFA_HWIDGET)hWidget);\r
     }\r
     m_pDocView->UnlockUpdate();\r
     m_pDocView->UpdateDocView();\r
@@ -120,7 +120,7 @@ FX_BOOL     CXFA_FFWidgetHandler::OnRButtonDown(XFA_HWIDGET hWidget, FX_DWORD dwFlag
     ((CXFA_FFWidget*)hWidget)->Rotate2Normal(fx, fy);\r
     FX_BOOL bRet = ((CXFA_FFWidget*)hWidget)->OnRButtonDown(dwFlags, fx, fy);\r
     if (bRet && m_pDocView->SetFocus(hWidget)) {\r
-        ((CXFA_FFDoc*)m_pDocView->GetDoc())->GetDocProvider()->SetFocusWidget((XFA_HDOC)m_pDocView->GetDoc(), (XFA_HWIDGET)hWidget);\r
+        ((CXFA_FFDoc*)m_pDocView->GetDoc())->GetDocProvider()->SetFocusWidget(m_pDocView->GetDoc(), (XFA_HWIDGET)hWidget);\r
     }\r
     m_pDocView->RunInvalidate();\r
     return bRet;\r
index 8138e58..5cacacf 100644 (file)
@@ -1028,7 +1028,7 @@ CXFA_DefFontMgr::~CXFA_DefFontMgr()
     m_CacheFonts.RemoveAll();\r
 }\r
 #define _FXFA_USEGASFONTMGR_\r
-IFX_Font* CXFA_DefFontMgr::GetFont(XFA_HDOC hDoc, FX_WSTR wsFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage )\r
+IFX_Font* CXFA_DefFontMgr::GetFont(IXFA_Doc* hDoc, FX_WSTR wsFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage )\r
 {\r
     CFX_WideString wsFontName = wsFontFamily;\r
     IFX_FontMgr* pFDEFontMgr = ((CXFA_FFDoc*)hDoc)->GetApp()->GetFDEFontMgr();\r
@@ -1081,7 +1081,7 @@ IFX_Font* CXFA_DefFontMgr::GetFont(XFA_HDOC hDoc, FX_WSTR wsFontFamily, FX_DWORD
     }\r
     return pFont;\r
 }\r
-IFX_Font* CXFA_DefFontMgr::GetDefaultFont(XFA_HDOC hDoc, FX_WSTR wsFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage)\r
+IFX_Font* CXFA_DefFontMgr::GetDefaultFont(IXFA_Doc* hDoc, FX_WSTR wsFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage)\r
 {\r
     IFX_FontMgr* pFDEFontMgr = ((CXFA_FFDoc*)hDoc)->GetApp()->GetFDEFontMgr();\r
 #ifdef _FXFA_USEGASFONTMGR_\r
@@ -1305,7 +1305,7 @@ CXFA_FontMgr::~CXFA_FontMgr()
 {\r
     DelAllMgrMap();\r
 }\r
-IFX_Font* CXFA_FontMgr::GetFont(XFA_HDOC hDoc, FX_WSTR wsFontFamily, FX_DWORD dwFontStyles,\r
+IFX_Font* CXFA_FontMgr::GetFont(IXFA_Doc* hDoc, FX_WSTR wsFontFamily, FX_DWORD dwFontStyles,\r
                                 FX_WORD wCodePage )\r
 {\r
     FX_DWORD dwHash = FX_HashCode_String_GetW(wsFontFamily.GetPtr(), wsFontFamily.GetLength(), FALSE);\r
@@ -1348,13 +1348,13 @@ IFX_Font* CXFA_FontMgr::GetFont(XFA_HDOC hDoc, FX_WSTR wsFontFamily, FX_DWORD dw
     }\r
     return pFont;\r
 }\r
-void CXFA_FontMgr::LoadDocFonts(XFA_HDOC hDoc)\r
+void CXFA_FontMgr::LoadDocFonts(IXFA_Doc* hDoc)\r
 {\r
     if (!m_PDFFontMgrArray.GetValueAt(hDoc)) {\r
         m_PDFFontMgrArray.SetAt(hDoc, FX_NEW CXFA_PDFFontMgr((CXFA_FFDoc*)hDoc));\r
     }\r
 }\r
-void CXFA_FontMgr::ReleaseDocFonts(XFA_HDOC hDoc)\r
+void CXFA_FontMgr::ReleaseDocFonts(IXFA_Doc* hDoc)\r
 {\r
     CXFA_PDFFontMgr* pMgr = NULL;\r
     if (m_PDFFontMgrArray.Lookup(hDoc, (void*&)pMgr)) {\r
@@ -1368,7 +1368,7 @@ void CXFA_FontMgr::DelAllMgrMap()
 {\r
     FX_POSITION ps = m_PDFFontMgrArray.GetStartPosition();\r
     while (ps) {\r
-        XFA_HDOC hDoc = NULL;\r
+        IXFA_Doc* hDoc = NULL;\r
         CXFA_PDFFontMgr* pMgr = NULL;\r
         m_PDFFontMgrArray.GetNextAssoc(ps, (void*&)hDoc, (void*&)pMgr);\r
         if (pMgr != NULL) {\r
index fd65570..9de1348 100644 (file)
@@ -18,8 +18,8 @@ class CXFA_DefFontMgr : public IXFA_FontMgr
 public:\r
     CXFA_DefFontMgr() {}\r
     ~CXFA_DefFontMgr() override;\r
-    virtual IFX_Font*          GetFont(XFA_HDOC hDoc, FX_WSTR wsFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage = 0xFFFF);\r
-    virtual IFX_Font*          GetDefaultFont(XFA_HDOC hDoc, FX_WSTR wsFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage = 0xFFFF);\r
+    virtual IFX_Font*          GetFont(IXFA_Doc* hDoc, FX_WSTR wsFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage = 0xFFFF);\r
+    virtual IFX_Font*          GetDefaultFont(IXFA_Doc* hDoc, FX_WSTR wsFontFamily, FX_DWORD dwFontStyles, FX_WORD wCodePage = 0xFFFF);\r
 protected:\r
     CFX_PtrArray                       m_CacheFonts;\r
 };\r
@@ -43,10 +43,10 @@ class CXFA_FontMgr
 public:\r
     CXFA_FontMgr();\r
     ~CXFA_FontMgr();\r
-    IFX_Font*          GetFont(XFA_HDOC hDoc, FX_WSTR wsFontFamily, FX_DWORD dwFontStyles,\r
+    IFX_Font*          GetFont(IXFA_Doc* hDoc, FX_WSTR wsFontFamily, FX_DWORD dwFontStyles,\r
                             FX_WORD wCodePage = 0xFFFF);\r
-    void                       LoadDocFonts(XFA_HDOC hDoc);\r
-    void                       ReleaseDocFonts(XFA_HDOC hDoc);\r
+    void                       LoadDocFonts(IXFA_Doc* hDoc);\r
+    void                       ReleaseDocFonts(IXFA_Doc* hDoc);\r
 \r
     void                       SetDefFontMgr(IXFA_FontMgr* pFontMgr);\r
 protected:\r
index c577042..510b627 100644 (file)
@@ -378,7 +378,7 @@ IFX_Font* CXFA_TextParser::GetFont(IXFA_TextProvider *pTextProvider, IFDE_CSSCom
     CXFA_FFDoc *pDoc = pTextProvider->GetDocNode();\r
     FXSYS_assert(pDoc != NULL);\r
     CXFA_FontMgr *pFontMgr = pDoc->GetApp()->GetXFAFontMgr();\r
-    return pFontMgr->GetFont((XFA_HDOC)pDoc, wsFamily, dwStyle);\r
+    return pFontMgr->GetFont(pDoc, wsFamily, dwStyle);\r
 }\r
 FX_FLOAT CXFA_TextParser::GetFontSize(IXFA_TextProvider *pTextProvider, IFDE_CSSComputedStyle *pStyle) const\r
 {\r
index e935940..9e985e2 100644 (file)
@@ -76,7 +76,7 @@ public:
     virtual FX_BOOL                            RunScript(CXFA_Node* pScript, CXFA_Node* pFormItem) = 0;\r
     virtual    FX_INT32                        ExecEventByDeepFirst(CXFA_Node* pFormNode, XFA_EVENTTYPE eEventType, FX_BOOL bIsFormReady = FALSE, FX_BOOL bRecursive = TRUE, CXFA_WidgetAcc* pExclude = NULL) = 0;\r
     virtual void                               AddCalcValidate(CXFA_Node* pNode) = 0;\r
-    virtual XFA_HDOC                   GetHDOC() = 0;\r
+    virtual IXFA_Doc*                  GetHDOC() = 0;\r
     virtual IXFA_DocProvider*  GetDocProvider() = 0;\r
     virtual IXFA_AppProvider*  GetAppProvider() = 0;\r
     virtual IXFA_WidgetHandler*        GetWidgetHandler() = 0;\r
index fbf69a3..0189e5e 100644 (file)
@@ -65,7 +65,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_CalculationsEnabled(FXJSE_H
     if (!pNotify) {\r
         return;\r
     }\r
-    XFA_HDOC hDoc = pNotify->GetHDOC();\r
+    IXFA_Doc* hDoc = pNotify->GetHDOC();\r
     if (bSetting) {\r
         pNotify->GetDocProvider()->SetCalculationsEnabled(hDoc, FXJSE_Value_ToBoolean(hValue));\r
         return;\r
@@ -79,7 +79,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_CurrentPage(FXJSE_HVALUE hV
     if (!pNotify) {\r
         return;\r
     }\r
-    XFA_HDOC hDoc = pNotify->GetHDOC();\r
+    IXFA_Doc* hDoc = pNotify->GetHDOC();\r
     if (bSetting) {\r
         pNotify->GetDocProvider()->SetCurrentPage(hDoc, FXJSE_Value_ToInteger(hValue));\r
         return;\r
@@ -107,7 +107,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_NumPages(FXJSE_HVALUE hValu
     if (!pNotify) {\r
         return;\r
     }\r
-    XFA_HDOC hDoc = pNotify->GetHDOC();\r
+    IXFA_Doc* hDoc = pNotify->GetHDOC();\r
     if (bSetting) {\r
         ThrowScriptErrorMessage(XFA_IDS_UNABLE_SET_NUMPAGES);\r
         return;\r
@@ -138,7 +138,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_Title(FXJSE_HVALUE hValue,
     if (!pNotify) {\r
         return;\r
     }\r
-    XFA_HDOC hDoc = pNotify->GetHDOC();\r
+    IXFA_Doc* hDoc = pNotify->GetHDOC();\r
     if (bSetting) {\r
         CFX_ByteString bsValue;\r
         FXJSE_Value_ToUTF8String(hValue, bsValue);\r
@@ -155,7 +155,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_ValidationsEnabled(FXJSE_HV
     if (!pNotify) {\r
         return;\r
     }\r
-    XFA_HDOC hDoc = pNotify->GetHDOC();\r
+    IXFA_Doc* hDoc = pNotify->GetHDOC();\r
     if (bSetting) {\r
         pNotify->GetDocProvider()->SetValidationsEnabled(hDoc, FXJSE_Value_ToBoolean(hValue));\r
         return;\r
@@ -250,7 +250,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_GotoURL(CFXJSE_Arguments* p
     if (!pNotify) {\r
         return;\r
     }\r
-    XFA_HDOC hDoc = pNotify->GetHDOC();\r
+    IXFA_Doc* hDoc = pNotify->GetHDOC();\r
     CFX_WideString wsURL;\r
     if (iLength >= 1) {\r
         CFX_ByteString bsURL = pArguments->GetUTF8String(0);\r
@@ -466,7 +466,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_SetFocus(CFXJSE_Arguments*
     if (!pNotify) {\r
         return;\r
     }\r
-    XFA_HDOC hDoc = pNotify->GetHDOC();\r
+    IXFA_Doc* hDoc = pNotify->GetHDOC();\r
     CXFA_Node* pNode = NULL;\r
     if (iLength >= 1) {\r
         FXJSE_HVALUE hValue = pArguments->GetValue(0);\r
@@ -608,7 +608,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_Print(CFXJSE_Arguments* pAr
     if (!pNotify) {\r
         return;\r
     }\r
-    XFA_HDOC hDoc = pNotify->GetHDOC();\r
+    IXFA_Doc* hDoc = pNotify->GetHDOC();\r
     FX_DWORD dwOptions = 0;\r
     FX_BOOL bShowDialog = TRUE;\r
     if (iLength >= 1) {\r
@@ -679,7 +679,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_ImportData(CFXJSE_Arguments
         CFX_ByteString bsFilePath = pArguments->GetUTF8String(0);\r
         wsFilePath = CFX_WideString::FromUTF8(bsFilePath, bsFilePath.GetLength());\r
     }\r
-    XFA_HDOC hDoc = pNotify->GetHDOC();\r
+    IXFA_Doc* hDoc = pNotify->GetHDOC();\r
     pNotify->GetDocProvider()->ImportData(hDoc, wsFilePath);\r
 }\r
 void CScript_HostPseudoModel::Script_HostPseudoModel_ExportData(CFXJSE_Arguments* pArguments)\r
@@ -693,7 +693,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_ExportData(CFXJSE_Arguments
     if (!pNotify) {\r
         return;\r
     }\r
-    XFA_HDOC hDoc = pNotify->GetHDOC();\r
+    IXFA_Doc* hDoc = pNotify->GetHDOC();\r
     CFX_WideString wsFilePath;\r
     FX_BOOL bXDP = TRUE;\r
     if (iLength >= 1) {\r
@@ -711,7 +711,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_PageUp(CFXJSE_Arguments* pA
     if (!pNotify) {\r
         return;\r
     }\r
-    XFA_HDOC hDoc = pNotify->GetHDOC();\r
+    IXFA_Doc* hDoc = pNotify->GetHDOC();\r
     FX_INT32 nCurPage = pNotify->GetDocProvider()->GetCurrentPage(hDoc);\r
     FX_INT32 nNewPage = 0;\r
     if (nCurPage <= 1) {\r
@@ -726,7 +726,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_PageDown(CFXJSE_Arguments*
     if (!pNotify) {\r
         return;\r
     }\r
-    XFA_HDOC hDoc = pNotify->GetHDOC();\r
+    IXFA_Doc* hDoc = pNotify->GetHDOC();\r
     FX_INT32 nCurPage = pNotify->GetDocProvider()->GetCurrentPage(hDoc);\r
     FX_INT32 nPageCount = pNotify->GetDocProvider()->CountPages(hDoc);\r
     if (!nPageCount || nCurPage == nPageCount) {\r
index a1eee3c..b2354b6 100644 (file)
@@ -33,7 +33,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_Ready(FXJSE_HVALUE hVal
     if (!pNotify) {\r
         return;\r
     }\r
-    XFA_HDOC hDoc = pNotify->GetHDOC();\r
+    IXFA_Doc* hDoc = pNotify->GetHDOC();\r
     if (bSetting) {\r
         ThrowScriptErrorMessage(XFA_IDS_UNABLE_SET_READY);\r
         return;\r
@@ -369,7 +369,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_AbsPageCountInBatch(CFX
     if (!pNotify) {\r
         return;\r
     }\r
-    XFA_HDOC hDoc = pNotify->GetHDOC();\r
+    IXFA_Doc* hDoc = pNotify->GetHDOC();\r
     FX_INT32 iPageCount = pNotify->GetDocProvider()->AbsPageCountInBatch(hDoc);\r
     FXJSE_HVALUE hValue =  pArguments->GetReturnValue();\r
     if (hValue) {\r
@@ -382,7 +382,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_SheetCountInBatch(CFXJS
     if (!pNotify) {\r
         return;\r
     }\r
-    XFA_HDOC hDoc = pNotify->GetHDOC();\r
+    IXFA_Doc* hDoc = pNotify->GetHDOC();\r
     FX_INT32 iPageCount = pNotify->GetDocProvider()->SheetCountInBatch(hDoc);\r
     FXJSE_HVALUE hValue =  pArguments->GetReturnValue();\r
     if (hValue) {\r
@@ -431,7 +431,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_AbsPageInBatch(CFXJSE_A
     if (!hWidget) {\r
         return;\r
     }\r
-    XFA_HDOC hDoc = pNotify->GetHDOC();\r
+    IXFA_Doc* hDoc = pNotify->GetHDOC();\r
     FX_INT32 iPageCount = pNotify->GetDocProvider()->AbsPageInBatch(hDoc, hWidget);\r
     FXJSE_HVALUE hValue =  pArguments->GetReturnValue();\r
     if (hValue) {\r
@@ -464,7 +464,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_SheetInBatch(CFXJSE_Arg
     if (!hWidget) {\r
         return;\r
     }\r
-    XFA_HDOC hDoc = pNotify->GetHDOC();\r
+    IXFA_Doc* hDoc = pNotify->GetHDOC();\r
     FX_INT32 iPageCount = pNotify->GetDocProvider()->SheetInBatch(hDoc, hWidget);\r
     FXJSE_HVALUE hValue =  pArguments->GetReturnValue();\r
     if (hValue) {\r
index d376533..6e94791 100644 (file)
@@ -36,7 +36,7 @@ void CScript_SignaturePseudoModel::Script_SignaturePseudoModel_Verify(CFXJSE_Arg
     if (!pNotify) {\r
         return;\r
     }\r
-    XFA_HDOC hDoc = pNotify->GetHDOC();\r
+    IXFA_Doc* hDoc = pNotify->GetHDOC();\r
     CXFA_Node* pNode = NULL;\r
     if (iLength >= 1) {\r
         pNode = (CXFA_Node*)pArguments->GetObject(0);\r
@@ -58,7 +58,7 @@ void CScript_SignaturePseudoModel::Script_SignaturePseudoModel_Sign(CFXJSE_Argum
     if (!pNotify) {\r
         return;\r
     }\r
-    XFA_HDOC hDoc = pNotify->GetHDOC();\r
+    IXFA_Doc* hDoc = pNotify->GetHDOC();\r
     CXFA_NodeList* pNodeList = NULL;\r
     CFX_WideString wsExpression;\r
     CFX_WideString wsXMLIdent;\r
@@ -90,7 +90,7 @@ void CScript_SignaturePseudoModel::Script_SignaturePseudoModel_Enumerate(CFXJSE_
     if (!pNotify) {\r
         return;\r
     }\r
-    XFA_HDOC hDoc = pNotify->GetHDOC();\r
+    IXFA_Doc* hDoc = pNotify->GetHDOC();\r
     CXFA_NodeList *pList =  pNotify->GetDocProvider()->Enumerate(hDoc);\r
     FXJSE_Value_Set(pArguments->GetReturnValue(), m_pDocument->GetScriptContext()->GetJSValueFromMap(pList));\r
 }\r
@@ -105,7 +105,7 @@ void CScript_SignaturePseudoModel::Script_SignaturePseudoModel_Clear(CFXJSE_Argu
     if (!pNotify) {\r
         return;\r
     }\r
-    XFA_HDOC hDoc = pNotify->GetHDOC();\r
+    IXFA_Doc* hDoc = pNotify->GetHDOC();\r
     CXFA_Node* pNode = NULL;\r
     FX_BOOL bClear = TRUE;\r
     if (iLength >= 1) {\r