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