summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h20
-rw-r--r--fpdfsdk/include/fsdk_annothandler.h8
-rw-r--r--fpdfsdk/include/fsdk_baseannot.h2
-rw-r--r--fpdfsdk/include/fsdk_baseform.h24
-rw-r--r--fpdfsdk/include/fsdk_mgr.h4
-rw-r--r--fpdfsdk/src/fpdfformfill.cpp18
-rw-r--r--fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp14
-rw-r--r--fpdfsdk/src/fsdk_annothandler.cpp16
-rw-r--r--fpdfsdk/src/fsdk_baseform.cpp40
-rw-r--r--fpdfsdk/src/fsdk_mgr.cpp7
10 files changed, 75 insertions, 78 deletions
diff --git a/fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h b/fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h
index dc15ec42d8..9158b8236a 100644
--- a/fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h
+++ b/fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h
@@ -45,21 +45,21 @@ public:
//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.
- virtual void InvalidateRect(XFA_HWIDGET hWidget, FX_DWORD dwFlags = 0);
+ virtual void InvalidateRect(IXFA_Widget* hWidget, FX_DWORD dwFlags = 0);
//show or hide caret
- virtual void DisplayCaret(XFA_HWIDGET hWidget, FX_BOOL bVisible, const CFX_RectF* pRtAnchor);
+ virtual void DisplayCaret(IXFA_Widget* hWidget, FX_BOOL bVisible, const CFX_RectF* pRtAnchor);
//dwPos: (0:bottom 1:top)
- virtual FX_BOOL GetPopupPos(XFA_HWIDGET hWidget, FX_FLOAT fMinPopup, FX_FLOAT fMaxPopup,
+ virtual FX_BOOL GetPopupPos(IXFA_Widget* hWidget, FX_FLOAT fMinPopup, FX_FLOAT fMaxPopup,
const CFX_RectF &rtAnchor, CFX_RectF &rtPopup);
- virtual FX_BOOL PopupMenu(XFA_HWIDGET hWidget, CFX_PointF ptPopup, const CFX_RectF* pRectExclude = NULL);
+ virtual FX_BOOL PopupMenu(IXFA_Widget* hWidget, CFX_PointF ptPopup, const CFX_RectF* pRectExclude = NULL);
//dwFlags XFA_PAGEVIEWEVENT_Added, XFA_PAGEVIEWEVENT_Removing
virtual void PageViewEvent(IXFA_PageView* pPageView, FX_DWORD dwFlags);
//dwEvent refer to XFA_WIDGETEVENT_XXX
- virtual void WidgetEvent(XFA_HWIDGET hWidget, CXFA_WidgetAcc* pWidgetData, FX_DWORD dwEvent, FX_LPVOID pParam = NULL, FX_LPVOID pAdditional = NULL);
+ virtual void WidgetEvent(IXFA_Widget* hWidget, CXFA_WidgetAcc* pWidgetData, FX_DWORD dwEvent, FX_LPVOID pParam = NULL, FX_LPVOID pAdditional = NULL);
//return true if render it.
- virtual FX_BOOL RenderCustomWidget(XFA_HWIDGET hWidget, CFX_Graphics* pGS, CFX_Matrix* pMatrix, const CFX_RectF& rtUI){return FALSE;}
+ virtual FX_BOOL RenderCustomWidget(IXFA_Widget* hWidget, CFX_Graphics* pGS, CFX_Matrix* pMatrix, const CFX_RectF& rtUI){return FALSE;}
//host method
virtual FX_INT32 CountPages(IXFA_Doc* hDoc);
@@ -74,14 +74,14 @@ public:
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 SetFocusWidget(IXFA_Doc* hDoc, IXFA_Widget* hWidget);
virtual void Print(IXFA_Doc* hDoc, FX_INT32 nStartPage, FX_INT32 nEndPage, FX_DWORD dwOptions);
//LayoutPseudo method
virtual FX_INT32 AbsPageCountInBatch(IXFA_Doc* hDoc){return 0;}
- virtual FX_INT32 AbsPageInBatch(IXFA_Doc* hDoc, XFA_HWIDGET hWidget){return 0;}
+ virtual FX_INT32 AbsPageInBatch(IXFA_Doc* hDoc, IXFA_Widget* hWidget){return 0;}
virtual FX_INT32 SheetCountInBatch(IXFA_Doc* hDoc){return 0;}
- virtual FX_INT32 SheetInBatch(IXFA_Doc* hDoc, XFA_HWIDGET hWidget){return 0;}
+ virtual FX_INT32 SheetInBatch(IXFA_Doc* hDoc, IXFA_Widget* hWidget){return 0;}
//SignaturePseudoModel method
//TODO:
@@ -93,7 +93,7 @@ public:
//Get document path
virtual void GetURL(IXFA_Doc* hDoc, CFX_WideString &wsDocURL);
virtual FX_ARGB GetHighlightColor(IXFA_Doc* hDoc);
- virtual void AddDoRecord(XFA_HWIDGET hWidget);
+ virtual void AddDoRecord(IXFA_Widget* hWidget);
/**
*Submit data to email, http, ftp.
* @param[in] hDoc The document handler.
diff --git a/fpdfsdk/include/fsdk_annothandler.h b/fpdfsdk/include/fsdk_annothandler.h
index fa73cd1795..be7b4650e7 100644
--- a/fpdfsdk/include/fsdk_annothandler.h
+++ b/fpdfsdk/include/fsdk_annothandler.h
@@ -36,7 +36,7 @@ public:
virtual CPDFSDK_Annot* NewAnnot(CPDF_Annot* pAnnot, CPDFSDK_PageView* pPage) = 0;
- virtual CPDFSDK_Annot* NewAnnot(XFA_HWIDGET hWidget, CPDFSDK_PageView* pPage) = 0;
+ virtual CPDFSDK_Annot* NewAnnot(IXFA_Widget* hWidget, CPDFSDK_PageView* pPage) = 0;
virtual void ReleaseAnnot(CPDFSDK_Annot* pAnnot) = 0;
@@ -110,7 +110,7 @@ public:
virtual CPDFSDK_Annot* NewAnnot(CPDF_Annot* pAnnot, CPDFSDK_PageView* pPage);
- virtual CPDFSDK_Annot* NewAnnot(XFA_HWIDGET hWidget, CPDFSDK_PageView* pPage);
+ virtual CPDFSDK_Annot* NewAnnot(IXFA_Widget* hWidget, CPDFSDK_PageView* pPage);
virtual void ReleaseAnnot(CPDFSDK_Annot* pAnnot) ;
@@ -189,7 +189,7 @@ public:
virtual CPDFSDK_Annot* NewAnnot(CPDF_Annot* pAnnot, CPDFSDK_PageView* pPage) { return NULL; }
- virtual CPDFSDK_Annot* NewAnnot(XFA_HWIDGET pAnnot, CPDFSDK_PageView* pPage);
+ virtual CPDFSDK_Annot* NewAnnot(IXFA_Widget* pAnnot, CPDFSDK_PageView* pPage);
virtual void ReleaseAnnot(CPDFSDK_Annot* pAnnot);
@@ -266,7 +266,7 @@ public:
void UnRegisterAnnotHandler(IPDFSDK_AnnotHandler* pAnnotHandler);
virtual CPDFSDK_Annot* NewAnnot(CPDF_Annot * pAnnot, CPDFSDK_PageView *pPageView);
- virtual CPDFSDK_Annot* NewAnnot(XFA_HWIDGET pAnnot, CPDFSDK_PageView* pPageView);
+ virtual CPDFSDK_Annot* NewAnnot(IXFA_Widget* pAnnot, CPDFSDK_PageView* pPageView);
virtual void ReleaseAnnot(CPDFSDK_Annot * pAnnot);
virtual void Annot_OnCreate(CPDFSDK_Annot* pAnnot);
diff --git a/fpdfsdk/include/fsdk_baseannot.h b/fpdfsdk/include/fsdk_baseannot.h
index 250ce7f591..d2ce977a6c 100644
--- a/fpdfsdk/include/fsdk_baseannot.h
+++ b/fpdfsdk/include/fsdk_baseannot.h
@@ -83,7 +83,7 @@ public:
virtual int GetLayoutOrder() const { return 5; }
virtual CPDF_Annot* GetPDFAnnot() { return NULL; }
- virtual XFA_HWIDGET GetXFAWidget() { return NULL; }
+ virtual IXFA_Widget* GetXFAWidget() { return NULL; }
virtual CFX_ByteString GetType() const { return ""; }
virtual CFX_ByteString GetSubType() const { return ""; }
diff --git a/fpdfsdk/include/fsdk_baseform.h b/fpdfsdk/include/fsdk_baseform.h
index 333bb30a78..67c67fc37a 100644
--- a/fpdfsdk/include/fsdk_baseform.h
+++ b/fpdfsdk/include/fsdk_baseform.h
@@ -67,8 +67,8 @@ typedef struct _PDFSDK_FieldAction
class CPDFSDK_Widget:public CPDFSDK_BAAnnot
{
public:
- XFA_HWIDGET GetMixXFAWidget();
- XFA_HWIDGET GetGroupMixXFAWidget();
+ IXFA_Widget* GetMixXFAWidget();
+ IXFA_Widget* GetGroupMixXFAWidget();
IXFA_WidgetHandler* GetXFAWidgetHandler();
FX_BOOL HasXFAAAction(PDFSDK_XFAAActionType eXFAAAT);
@@ -78,9 +78,9 @@ public:
void SynchronizeXFAValue();
void SynchronizeXFAItems();
- static void SynchronizeXFAValue(IXFA_DocView* pXFADocView, XFA_HWIDGET hWidget,
+ static void SynchronizeXFAValue(IXFA_DocView* pXFADocView, IXFA_Widget* hWidget,
CPDF_FormField* pFormField, CPDF_FormControl* pFormControl);
- static void SynchronizeXFAItems(IXFA_DocView* pXFADocView, XFA_HWIDGET hWidget,
+ static void SynchronizeXFAItems(IXFA_DocView* pXFADocView, IXFA_Widget* hWidget,
CPDF_FormField* pFormField, CPDF_FormControl* pFormControl);
public:
@@ -192,19 +192,19 @@ private:
FX_INT32 m_nAppAge;
FX_INT32 m_nValueAge;
- XFA_HWIDGET m_hMixXFAWidget;
+ IXFA_Widget* m_hMixXFAWidget;
IXFA_WidgetHandler* m_pWidgetHandler;
};
class CPDFSDK_XFAWidget : public CPDFSDK_Annot
{
public:
- CPDFSDK_XFAWidget(XFA_HWIDGET pAnnot, CPDFSDK_PageView* pPageView, CPDFSDK_InterForm* pInterForm);
+ CPDFSDK_XFAWidget(IXFA_Widget* pAnnot, CPDFSDK_PageView* pPageView, CPDFSDK_InterForm* pInterForm);
virtual ~CPDFSDK_XFAWidget(){}
public:
virtual FX_BOOL IsXFAField();
- virtual XFA_HWIDGET GetXFAWidget() { return m_hXFAWidget; }
+ virtual IXFA_Widget* GetXFAWidget() { return m_hXFAWidget; }
virtual CFX_ByteString GetType() const ;
virtual CFX_ByteString GetSubType() const { return ""; }
@@ -216,11 +216,11 @@ public:
private:
CPDFSDK_InterForm* m_pInterForm;
- XFA_HWIDGET m_hXFAWidget;
+ IXFA_Widget* m_hXFAWidget;
};
#define CPDFSDK_WidgetMap CFX_MapPtrTemplate<CPDF_FormControl*, CPDFSDK_Widget*>
-#define CPDFSDK_XFAWidgetMap CFX_MapPtrTemplate<XFA_HWIDGET, CPDFSDK_XFAWidget*>
+#define CPDFSDK_XFAWidgetMap CFX_MapPtrTemplate<IXFA_Widget*, CPDFSDK_XFAWidget*>
#define CPDFSDK_FieldSynchronizeMap CFX_MapPtrTemplate<CPDF_FormField*, int>
class CPDFSDK_InterForm : public CPDF_FormNotify
@@ -244,9 +244,9 @@ public:
void AddMap(CPDF_FormControl* pControl, CPDFSDK_Widget* pWidget);
void RemoveMap(CPDF_FormControl* pControl);
- void AddXFAMap(XFA_HWIDGET hWidget, CPDFSDK_XFAWidget* pWidget);
- void RemoveXFAMap(XFA_HWIDGET hWidget);
- CPDFSDK_XFAWidget* GetXFAWidget(XFA_HWIDGET hWidget);
+ void AddXFAMap(IXFA_Widget* hWidget, CPDFSDK_XFAWidget* pWidget);
+ void RemoveXFAMap(IXFA_Widget* hWidget);
+ CPDFSDK_XFAWidget* GetXFAWidget(IXFA_Widget* hWidget);
void EnableCalculate(FX_BOOL bEnabled);
FX_BOOL IsCalculateEnabled() const;
diff --git a/fpdfsdk/include/fsdk_mgr.h b/fpdfsdk/include/fsdk_mgr.h
index abcb24dd91..7f68dd9cca 100644
--- a/fpdfsdk/include/fsdk_mgr.h
+++ b/fpdfsdk/include/fsdk_mgr.h
@@ -782,13 +782,13 @@ public:
CPDFSDK_Annot* AddAnnot(CPDF_Dictionary * pDict);
CPDFSDK_Annot* AddAnnot(FX_LPCSTR lpSubType,CPDF_Dictionary * pDict);
CPDFSDK_Annot* AddAnnot(CPDF_Annot * pPDFAnnot);
- CPDFSDK_Annot* AddAnnot(XFA_HWIDGET pPDFAnnot);
+ CPDFSDK_Annot* AddAnnot(IXFA_Widget* pPDFAnnot);
FX_BOOL DeleteAnnot(CPDFSDK_Annot* pAnnot);
int CountAnnots();
CPDFSDK_Annot* GetAnnot(int nIndex);
CPDFSDK_Annot* GetAnnotByDict(CPDF_Dictionary * pDict);
- CPDFSDK_Annot* GetAnnotByXFAWidget(XFA_HWIDGET hWidget);
+ CPDFSDK_Annot* GetAnnotByXFAWidget(IXFA_Widget* hWidget);
CPDFXFA_Page* GetPDFXFAPage(){return m_page;}
CPDF_Page* GetPDFPage();
CPDF_Document* GetPDFDocument();
diff --git a/fpdfsdk/src/fpdfformfill.cpp b/fpdfsdk/src/fpdfformfill.cpp
index 8cb0de0e6e..0ae2237d29 100644
--- a/fpdfsdk/src/fpdfformfill.cpp
+++ b/fpdfsdk/src/fpdfformfill.cpp
@@ -57,7 +57,7 @@ DLLEXPORT int STDCALL FPDPage_HasFormFieldAtPoint(FPDF_FORMHANDLE hHandle, FPDF_
if (!pWidgetHandler)
return -1;
- XFA_HWIDGET pXFAAnnot = NULL;
+ IXFA_Widget* pXFAAnnot = NULL;
IXFA_WidgetIterator* pWidgetIterator = pPageView->CreateWidgetIterator(XFA_TRAVERSEWAY_Form, XFA_WIDGETFILTER_Viewable|XFA_WIDGETFILTER_AllType);
if (!pWidgetIterator)
return -1;
@@ -352,7 +352,7 @@ DLLEXPORT void STDCALL FPDF_Widget_Undo(FPDF_DOCUMENT document, FPDF_WIDGET hWid
if (pXFAMenuHander == NULL)
return;
- pXFAMenuHander->Undo((XFA_HWIDGET)hWidget);
+ pXFAMenuHander->Undo((IXFA_Widget*)hWidget);
}
DLLEXPORT void STDCALL FPDF_Widget_Redo(FPDF_DOCUMENT document, FPDF_WIDGET hWidget)
@@ -368,7 +368,7 @@ DLLEXPORT void STDCALL FPDF_Widget_Redo(FPDF_DOCUMENT document, FPDF_WIDGET hWid
if (pXFAMenuHander == NULL)
return;
- pXFAMenuHander->Redo((XFA_HWIDGET)hWidget);
+ pXFAMenuHander->Redo((IXFA_Widget*)hWidget);
}
DLLEXPORT void STDCALL FPDF_Widget_SelectAll(FPDF_DOCUMENT document, FPDF_WIDGET hWidget)
@@ -384,7 +384,7 @@ DLLEXPORT void STDCALL FPDF_Widget_SelectAll(FPDF_DOCUMENT document, FPDF_WIDGET
if (pXFAMenuHander == NULL)
return;
- pXFAMenuHander->SelectAll((XFA_HWIDGET)hWidget);
+ pXFAMenuHander->SelectAll((IXFA_Widget*)hWidget);
}
DLLEXPORT void STDCALL FPDF_Widget_Copy(FPDF_DOCUMENT document, FPDF_WIDGET hWidget, FPDF_WIDESTRING wsText, FPDF_DWORD* size)
{
@@ -400,7 +400,7 @@ DLLEXPORT void STDCALL FPDF_Widget_Copy(FPDF_DOCUMENT document, FPDF_WIDGET hWid
return;
CFX_WideString wsCpText;
- pXFAMenuHander->Copy((XFA_HWIDGET)hWidget, wsCpText);
+ pXFAMenuHander->Copy((IXFA_Widget*)hWidget, wsCpText);
CFX_ByteString bsCpText = wsCpText.UTF16LE_Encode();
int len = bsCpText.GetLength()/sizeof(unsigned short);
@@ -430,7 +430,7 @@ DLLEXPORT void STDCALL FPDF_Widget_Cut(FPDF_DOCUMENT document, FPDF_WIDGET hWidg
return;
CFX_WideString wsCpText;
- pXFAMenuHander->Cut((XFA_HWIDGET)hWidget, wsCpText);
+ pXFAMenuHander->Cut((IXFA_Widget*)hWidget, wsCpText);
CFX_ByteString bsCpText = wsCpText.UTF16LE_Encode();
int len = bsCpText.GetLength()/sizeof(unsigned short);
@@ -461,7 +461,7 @@ DLLEXPORT void STDCALL FPDF_Widget_Paste(FPDF_DOCUMENT document, FPDF_WIDGET hWi
return;
CFX_WideString wstr = CFX_WideString::FromUTF16LE(wsText, size);
- pXFAMenuHander->Paste((XFA_HWIDGET)hWidget, wstr);
+ pXFAMenuHander->Paste((IXFA_Widget*)hWidget, wstr);
}
DLLEXPORT void STDCALL FPDF_Widget_ReplaceSpellCheckWord(FPDF_DOCUMENT document, FPDF_WIDGET hWidget, float x, float y, FPDF_BYTESTRING bsText)
@@ -481,7 +481,7 @@ DLLEXPORT void STDCALL FPDF_Widget_ReplaceSpellCheckWord(FPDF_DOCUMENT document,
ptPopup.x = x;
ptPopup.y = y;
CFX_ByteStringC bs(bsText);
- pXFAMenuHander->ReplaceSpellCheckWord((XFA_HWIDGET)hWidget,ptPopup,bs);
+ pXFAMenuHander->ReplaceSpellCheckWord((IXFA_Widget*)hWidget,ptPopup,bs);
}
DLLEXPORT void STDCALL FPDF_Widget_GetSpellCheckWords(FPDF_DOCUMENT document, FPDF_WIDGET hWidget, float x, float y, FPDF_STRINGHANDLE* stringHandle)
@@ -501,7 +501,7 @@ DLLEXPORT void STDCALL FPDF_Widget_GetSpellCheckWords(FPDF_DOCUMENT document, FP
CFX_PointF ptPopup;
ptPopup.x = x;
ptPopup.y = y;
- pXFAMenuHander->GetSuggestWords((XFA_HWIDGET)hWidget, ptPopup, *sSuggestWords);
+ pXFAMenuHander->GetSuggestWords((IXFA_Widget*)hWidget, ptPopup, *sSuggestWords);
*stringHandle = (FPDF_STRINGHANDLE)sSuggestWords;
}
DLLEXPORT int STDCALL FPDF_StringHandleCounts(FPDF_STRINGHANDLE stringHandle)
diff --git a/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp b/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp
index 9ef8d53ee9..e64bde1a2a 100644
--- a/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp
+++ b/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp
@@ -290,7 +290,7 @@ void CPDFXFA_Document::InvalidateRect(IXFA_PageView* pPageView, const CFX_RectF&
pEnv->FFI_Invalidate((FPDF_PAGE)pPage, rcPage.left, rcPage.bottom, rcPage.right, rcPage.top);
}
-void CPDFXFA_Document::InvalidateRect(XFA_HWIDGET hWidget, FX_DWORD dwFlags /* = 0 */)
+void CPDFXFA_Document::InvalidateRect(IXFA_Widget* hWidget, FX_DWORD dwFlags /* = 0 */)
{
if (!hWidget)
return;
@@ -314,7 +314,7 @@ void CPDFXFA_Document::InvalidateRect(XFA_HWIDGET hWidget, FX_DWORD dwFlags /* =
InvalidateRect(pPageView, rect, dwFlags);
}
-void CPDFXFA_Document::DisplayCaret(XFA_HWIDGET hWidget, FX_BOOL bVisible, const CFX_RectF* pRtAnchor)
+void CPDFXFA_Document::DisplayCaret(IXFA_Widget* hWidget, FX_BOOL bVisible, const CFX_RectF* pRtAnchor)
{
if (!hWidget || pRtAnchor == NULL)
return;
@@ -349,7 +349,7 @@ void CPDFXFA_Document::DisplayCaret(XFA_HWIDGET hWidget, FX_BOOL bVisible, const
}
-FX_BOOL CPDFXFA_Document::GetPopupPos(XFA_HWIDGET hWidget, FX_FLOAT fMinPopup, FX_FLOAT fMaxPopup, const CFX_RectF &rtAnchor, CFX_RectF &rtPopup)
+FX_BOOL CPDFXFA_Document::GetPopupPos(IXFA_Widget* hWidget, FX_FLOAT fMinPopup, FX_FLOAT fMaxPopup, const CFX_RectF &rtAnchor, CFX_RectF &rtPopup)
{
if (NULL == hWidget)
{
@@ -510,7 +510,7 @@ FX_BOOL CPDFXFA_Document::GetPopupPos(XFA_HWIDGET hWidget, FX_FLOAT fMinPopup, F
return TRUE;
}
-FX_BOOL CPDFXFA_Document::PopupMenu(XFA_HWIDGET hWidget, CFX_PointF ptPopup, const CFX_RectF* pRectExclude)
+FX_BOOL CPDFXFA_Document::PopupMenu(IXFA_Widget* hWidget, CFX_PointF ptPopup, const CFX_RectF* pRectExclude)
{
if (NULL == hWidget)
{
@@ -573,7 +573,7 @@ void CPDFXFA_Document::PageViewEvent(IXFA_PageView* pPageView, FX_DWORD dwFlags)
}
}
-void CPDFXFA_Document::WidgetEvent(XFA_HWIDGET hWidget, CXFA_WidgetAcc* pWidgetData, FX_DWORD dwEvent, FX_LPVOID pParam, FX_LPVOID pAdditional)
+void CPDFXFA_Document::WidgetEvent(IXFA_Widget* hWidget, CXFA_WidgetAcc* pWidgetData, FX_DWORD dwEvent, FX_LPVOID pParam, FX_LPVOID pAdditional)
{
if (m_iDocType != DOCTYPE_DYNIMIC_XFA || NULL == hWidget)
return;
@@ -873,7 +873,7 @@ void CPDFXFA_Document::SetValidationsEnabled(IXFA_Doc* hDoc, FX_BOOL bEnabled)
if (m_pSDKDoc->GetInterForm())
m_pSDKDoc->GetInterForm()->XfaSetValidationsEnabled(bEnabled);
}
-void CPDFXFA_Document::SetFocusWidget(IXFA_Doc* hDoc, XFA_HWIDGET hWidget)
+void CPDFXFA_Document::SetFocusWidget(IXFA_Doc* hDoc, IXFA_Widget* hWidget)
{
if (hDoc != m_pXFADoc)
return;
@@ -943,7 +943,7 @@ FX_ARGB CPDFXFA_Document::GetHighlightColor(IXFA_Doc* hDoc)
return 0;
}
-void CPDFXFA_Document::AddDoRecord(XFA_HWIDGET hWidget)
+void CPDFXFA_Document::AddDoRecord(IXFA_Widget* hWidget)
{
CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv();
if (pEnv == NULL)
diff --git a/fpdfsdk/src/fsdk_annothandler.cpp b/fpdfsdk/src/fsdk_annothandler.cpp
index a9e21219a1..6b7c60d7af 100644
--- a/fpdfsdk/src/fsdk_annothandler.cpp
+++ b/fpdfsdk/src/fsdk_annothandler.cpp
@@ -74,7 +74,7 @@ CPDFSDK_Annot* CPDFSDK_AnnotHandlerMgr::NewAnnot(CPDF_Annot * pAnnot, CPDFSDK_Pa
return new CPDFSDK_BAAnnot(pAnnot, pPageView);
}
-CPDFSDK_Annot* CPDFSDK_AnnotHandlerMgr::NewAnnot(XFA_HWIDGET pAnnot, CPDFSDK_PageView* pPageView)
+CPDFSDK_Annot* CPDFSDK_AnnotHandlerMgr::NewAnnot(IXFA_Widget* pAnnot, CPDFSDK_PageView* pPageView)
{
ASSERT(pAnnot != NULL);
ASSERT(pPageView != NULL);
@@ -398,7 +398,7 @@ CPDFSDK_Annot* CPDFSDK_AnnotHandlerMgr::GetNextAnnot(CPDFSDK_Annot* pSDKAnnot,FX
return NULL;
if (pWidgetIterator->GetCurrentWidget() != pSDKAnnot->GetXFAWidget())
pWidgetIterator->SetCurrentWidget(pSDKAnnot->GetXFAWidget());
- XFA_HWIDGET hNextFocus = NULL;
+ IXFA_Widget* hNextFocus = NULL;
hNextFocus = bNext?pWidgetIterator->MoveToNext():pWidgetIterator->MoveToPrevious();
if (hNextFocus == NULL && pSDKAnnot != NULL)
hNextFocus = pWidgetIterator->MoveToFirst();
@@ -466,7 +466,7 @@ CPDFSDK_Annot* CPDFSDK_BFAnnotHandler::NewAnnot(CPDF_Annot* pAnnot, CPDFSDK_Pag
return pWidget;
}
-CPDFSDK_Annot* CPDFSDK_BFAnnotHandler::NewAnnot(XFA_HWIDGET hWidget, CPDFSDK_PageView* pPage)
+CPDFSDK_Annot* CPDFSDK_BFAnnotHandler::NewAnnot(IXFA_Widget* hWidget, CPDFSDK_PageView* pPage)
{
return NULL;
}
@@ -837,7 +837,7 @@ CPDFSDK_XFAAnnotHandler::CPDFSDK_XFAAnnotHandler(CPDFDoc_Environment* pApp) :
}
-CPDFSDK_Annot* CPDFSDK_XFAAnnotHandler::NewAnnot(XFA_HWIDGET pAnnot, CPDFSDK_PageView* pPage)
+CPDFSDK_Annot* CPDFSDK_XFAAnnotHandler::NewAnnot(IXFA_Widget* pAnnot, CPDFSDK_PageView* pPage)
{
ASSERT(pPage != NULL);
ASSERT(pAnnot != NULL);
@@ -879,7 +879,7 @@ void CPDFSDK_XFAAnnotHandler::OnDraw(CPDFSDK_PageView *pPageView, CPDFSDK_Annot*
CFX_Matrix mt;
mt = *(CFX_Matrix*)pUser2Device;
- XFA_HWIDGET hWidget = pAnnot->GetXFAWidget();
+ IXFA_Widget* hWidget = pAnnot->GetXFAWidget();
ASSERT(hWidget != NULL);
FX_BOOL bIsHighlight = FALSE;
@@ -1149,10 +1149,8 @@ FX_BOOL CPDFSDK_XFAAnnotHandler::OnXFAChangedFocus(CPDFSDK_Annot* pOldAnnot, CPD
if (pWidgetHandler)
{
- FX_BOOL bRet = TRUE; /*pWidgetHandler->OnFocusChange(pNewAnnot ? pNewAnnot->GetXFAWidget() : NULL,
- pOldAnnot ? pOldAnnot->GetXFAWidget() : NULL); */
-
- XFA_HWIDGET hWidget = pNewAnnot ? pNewAnnot->GetXFAWidget() : NULL;
+ FX_BOOL bRet = TRUE;
+ IXFA_Widget* hWidget = pNewAnnot ? pNewAnnot->GetXFAWidget() : NULL;
if (hWidget)
{
IXFA_PageView* pXFAPageView = pWidgetHandler->GetPageView(hWidget);
diff --git a/fpdfsdk/src/fsdk_baseform.cpp b/fpdfsdk/src/fsdk_baseform.cpp
index afbafb81c3..6fcdeac3af 100644
--- a/fpdfsdk/src/fsdk_baseform.cpp
+++ b/fpdfsdk/src/fsdk_baseform.cpp
@@ -41,7 +41,7 @@ CPDFSDK_Widget::~CPDFSDK_Widget()
}
-XFA_HWIDGET CPDFSDK_Widget::GetMixXFAWidget()
+IXFA_Widget* CPDFSDK_Widget::GetMixXFAWidget()
{
ASSERT(m_pPageView != NULL);
@@ -77,7 +77,7 @@ XFA_HWIDGET CPDFSDK_Widget::GetMixXFAWidget()
return NULL;
}
-XFA_HWIDGET CPDFSDK_Widget::GetGroupMixXFAWidget()
+IXFA_Widget* CPDFSDK_Widget::GetGroupMixXFAWidget()
{
ASSERT(m_pPageView != NULL);
@@ -207,7 +207,7 @@ static XFA_EVENTTYPE GetXFAEventType(CPDF_AAction::AActionType eAAT, FX_BOOL bWi
FX_BOOL CPDFSDK_Widget::HasXFAAAction(PDFSDK_XFAAActionType eXFAAAT)
{
- if (XFA_HWIDGET hWidget = this->GetMixXFAWidget())
+ if (IXFA_Widget* hWidget = this->GetMixXFAWidget())
{
if (IXFA_WidgetHandler* pXFAWidgetHandler = this->GetXFAWidgetHandler())
{
@@ -217,7 +217,7 @@ FX_BOOL CPDFSDK_Widget::HasXFAAAction(PDFSDK_XFAAActionType eXFAAAT)
eEventType == XFA_EVENT_Change) &&
GetFieldType() == FIELDTYPE_RADIOBUTTON)
{
- if (XFA_HWIDGET hGroupWidget = GetGroupMixXFAWidget())
+ if (IXFA_Widget* hGroupWidget = GetGroupMixXFAWidget())
{
CXFA_WidgetAcc* pAcc = pXFAWidgetHandler->GetDataAcc(hGroupWidget);
if (pXFAWidgetHandler->HasEvent(pAcc, eEventType))
@@ -245,7 +245,7 @@ FX_BOOL CPDFSDK_Widget::OnXFAAAction(PDFSDK_XFAAActionType eXFAAAT, PDFSDK_Field
CPDFXFA_Document* pDoc = pSDKDoc->GetDocument();
ASSERT(pDoc != NULL);
- if (XFA_HWIDGET hWidget = this->GetMixXFAWidget())
+ if (IXFA_Widget* hWidget = this->GetMixXFAWidget())
{
XFA_EVENTTYPE eEventType = GetXFAEventType(eXFAAAT);
@@ -274,7 +274,7 @@ FX_BOOL CPDFSDK_Widget::OnXFAAAction(PDFSDK_XFAAActionType eXFAAAT, PDFSDK_Field
eEventType == XFA_EVENT_Change) &&
GetFieldType() == FIELDTYPE_RADIOBUTTON)
{
- if (XFA_HWIDGET hGroupWidget = GetGroupMixXFAWidget())
+ if (IXFA_Widget* hGroupWidget = GetGroupMixXFAWidget())
{
CXFA_WidgetAcc* pAcc = pXFAWidgetHandler->GetDataAcc(hGroupWidget);
param.m_pTarget = pAcc;
@@ -309,7 +309,7 @@ FX_BOOL CPDFSDK_Widget::OnXFAAAction(PDFSDK_XFAAActionType eXFAAAT, PDFSDK_Field
void CPDFSDK_Widget::Synchronize(FX_BOOL bSynchronizeElse)
{
- if (XFA_HWIDGET hWidget = this->GetMixXFAWidget())
+ if (IXFA_Widget* hWidget = this->GetMixXFAWidget())
{
if (IXFA_WidgetHandler* pXFAWidgetHandler = this->GetXFAWidgetHandler())
{
@@ -381,7 +381,7 @@ void CPDFSDK_Widget::SynchronizeXFAValue()
IXFA_DocView* pXFADocView = pDoc->GetXFADocView();
if (!pXFADocView) return;
- if (XFA_HWIDGET hWidget = this->GetMixXFAWidget())
+ if (IXFA_Widget* hWidget = this->GetMixXFAWidget())
{
if (IXFA_WidgetHandler* pXFAWidgetHandler = this->GetXFAWidgetHandler())
{
@@ -409,7 +409,7 @@ void CPDFSDK_Widget::SynchronizeXFAItems()
IXFA_DocView* pXFADocView = pDoc->GetXFADocView();
if (!pXFADocView) return;
- if (XFA_HWIDGET hWidget = this->GetMixXFAWidget())
+ if (IXFA_Widget* hWidget = this->GetMixXFAWidget())
{
if (IXFA_WidgetHandler* pXFAWidgetHandler = this->GetXFAWidgetHandler())
{
@@ -421,7 +421,7 @@ void CPDFSDK_Widget::SynchronizeXFAItems()
}
}
-void CPDFSDK_Widget::SynchronizeXFAValue(IXFA_DocView* pXFADocView, XFA_HWIDGET hWidget,
+void CPDFSDK_Widget::SynchronizeXFAValue(IXFA_DocView* pXFADocView, IXFA_Widget* hWidget,
CPDF_FormField* pFormField, CPDF_FormControl* pFormControl)
{
ASSERT(pXFADocView != NULL);
@@ -510,7 +510,7 @@ void CPDFSDK_Widget::SynchronizeXFAValue(IXFA_DocView* pXFADocView, XFA_HWIDGET
}
}
-void CPDFSDK_Widget::SynchronizeXFAItems(IXFA_DocView* pXFADocView, XFA_HWIDGET hWidget,
+void CPDFSDK_Widget::SynchronizeXFAItems(IXFA_DocView* pXFADocView, IXFA_Widget* hWidget,
CPDF_FormField* pFormField, CPDF_FormControl* pFormControl)
{
ASSERT(pXFADocView != NULL);
@@ -769,7 +769,7 @@ FX_FLOAT CPDFSDK_Widget::GetFontSize() const
int CPDFSDK_Widget::GetSelectedIndex(int nIndex)
{
- if (XFA_HWIDGET hWidget = this->GetMixXFAWidget())
+ if (IXFA_Widget* hWidget = this->GetMixXFAWidget())
{
if (IXFA_WidgetHandler* pXFAWidgetHandler = this->GetXFAWidgetHandler())
{
@@ -789,7 +789,7 @@ int CPDFSDK_Widget::GetSelectedIndex(int nIndex)
CFX_WideString CPDFSDK_Widget::GetValue(FX_BOOL bDisplay)
{
- if (XFA_HWIDGET hWidget = this->GetMixXFAWidget())
+ if (IXFA_Widget* hWidget = this->GetMixXFAWidget())
{
if (IXFA_WidgetHandler* pXFAWidgetHandler = this->GetXFAWidgetHandler())
{
@@ -834,7 +834,7 @@ int CPDFSDK_Widget::CountOptions() const
FX_BOOL CPDFSDK_Widget::IsOptionSelected(int nIndex)
{
- if (XFA_HWIDGET hWidget = this->GetMixXFAWidget())
+ if (IXFA_Widget* hWidget = this->GetMixXFAWidget())
{
if (IXFA_WidgetHandler* pXFAWidgetHandler = this->GetXFAWidgetHandler())
{
@@ -866,7 +866,7 @@ FX_BOOL CPDFSDK_Widget::IsChecked()
{
if (IXFA_WidgetHandler* pXFAWidgetHandler = this->GetXFAWidgetHandler())
{
- if (XFA_HWIDGET hWidget = this->GetMixXFAWidget())
+ if (IXFA_Widget* hWidget = this->GetMixXFAWidget())
{
if (CXFA_WidgetAcc* pWidgetAcc = pXFAWidgetHandler->GetDataAcc(hWidget))
{
@@ -2243,7 +2243,7 @@ FX_BOOL CPDFSDK_Widget::OnAAction(CPDF_AAction::AActionType type, PDFSDK_FieldAc
CPDFDoc_Environment* pEnv = pDocument->GetEnv();
ASSERT(pEnv != NULL);
- if (XFA_HWIDGET hWidget = this->GetMixXFAWidget())
+ if (IXFA_Widget* hWidget = this->GetMixXFAWidget())
{
XFA_EVENTTYPE eEventType = GetXFAEventType(type, data.bWillCommit);
@@ -2368,7 +2368,7 @@ FX_BOOL CPDFSDK_Widget::HitTest(FX_FLOAT pageX, FX_FLOAT pageY)
}
//CPDFSDK_XFAWidget
-CPDFSDK_XFAWidget::CPDFSDK_XFAWidget(XFA_HWIDGET pAnnot, CPDFSDK_PageView* pPageView, CPDFSDK_InterForm* pInterForm) :
+CPDFSDK_XFAWidget::CPDFSDK_XFAWidget(IXFA_Widget* pAnnot, CPDFSDK_PageView* pPageView, CPDFSDK_InterForm* pInterForm) :
CPDFSDK_Annot(pPageView),
m_hXFAWidget(pAnnot),
m_pInterForm(pInterForm)
@@ -2575,17 +2575,17 @@ void CPDFSDK_InterForm::RemoveMap(CPDF_FormControl* pControl)
m_Map.RemoveKey(pControl);
}
-void CPDFSDK_InterForm::AddXFAMap(XFA_HWIDGET hWidget, CPDFSDK_XFAWidget* pWidget)
+void CPDFSDK_InterForm::AddXFAMap(IXFA_Widget* hWidget, CPDFSDK_XFAWidget* pWidget)
{
m_XFAMap.SetAt(hWidget, pWidget);
}
-void CPDFSDK_InterForm::RemoveXFAMap(XFA_HWIDGET hWidget)
+void CPDFSDK_InterForm::RemoveXFAMap(IXFA_Widget* hWidget)
{
m_XFAMap.RemoveKey(hWidget);
}
-CPDFSDK_XFAWidget* CPDFSDK_InterForm::GetXFAWidget(XFA_HWIDGET hWidget)
+CPDFSDK_XFAWidget* CPDFSDK_InterForm::GetXFAWidget(IXFA_Widget* hWidget)
{
CPDFSDK_XFAWidget* pWidget = NULL;
m_XFAMap.Lookup(hWidget, pWidget);
diff --git a/fpdfsdk/src/fsdk_mgr.cpp b/fpdfsdk/src/fsdk_mgr.cpp
index ccb1ab6e34..a1d9453c52 100644
--- a/fpdfsdk/src/fsdk_mgr.cpp
+++ b/fpdfsdk/src/fsdk_mgr.cpp
@@ -805,7 +805,7 @@ CPDFSDK_Annot* CPDFSDK_PageView::AddAnnot(CPDF_Annot * pPDFAnnot)
return pSDKAnnot;
}
-CPDFSDK_Annot* CPDFSDK_PageView::AddAnnot(XFA_HWIDGET pPDFAnnot)
+CPDFSDK_Annot* CPDFSDK_PageView::AddAnnot(IXFA_Widget* pPDFAnnot)
{
if (!pPDFAnnot) return NULL;
@@ -905,7 +905,7 @@ CPDFSDK_Annot* CPDFSDK_PageView::GetAnnotByDict(CPDF_Dictionary * pDict)
}
return NULL;
}
-CPDFSDK_Annot* CPDFSDK_PageView::GetAnnotByXFAWidget(XFA_HWIDGET hWidget)
+CPDFSDK_Annot* CPDFSDK_PageView::GetAnnotByXFAWidget(IXFA_Widget* hWidget)
{
if (hWidget == NULL)
return NULL;
@@ -1118,7 +1118,6 @@ void CPDFSDK_PageView::LoadFXAnnots()
pageView = m_page->GetXFAPageView();
ASSERT(pageView != NULL);
- XFA_HWIDGET pXFAAnnot = NULL;
IXFA_WidgetIterator* pWidgetHander = pageView->CreateWidgetIterator(XFA_TRAVERSEWAY_Form, XFA_WIDGETFILTER_Visible|XFA_WIDGETFILTER_Viewable|XFA_WIDGETFILTER_AllType);
if (!pWidgetHander)
{
@@ -1127,7 +1126,7 @@ void CPDFSDK_PageView::LoadFXAnnots()
return;
}
- pXFAAnnot = pWidgetHander->MoveToNext();
+ IXFA_Widget* pXFAAnnot = pWidgetHander->MoveToNext();
while (pXFAAnnot) {
CPDFSDK_Annot* pAnnot = pAnnotHandlerMgr->NewAnnot(pXFAAnnot, this);
if(!pAnnot) {