diff options
author | dsinclair <dsinclair@chromium.org> | 2016-03-31 20:34:43 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-31 20:34:43 -0700 |
commit | df4bc596c64fb848647c670be66a29ea0861b4f4 (patch) | |
tree | 096f18bc5903e45982291daf81424d0d4954d158 /fpdfsdk/include | |
parent | 64376be4aac4710848b36b823fd98aae75095336 (diff) | |
download | pdfium-df4bc596c64fb848647c670be66a29ea0861b4f4.tar.xz |
Remove IXFA_* interfaces.
This CL removes the IXFA_* interfaces which are:
- Implemented once.
- Not implemented by an fpdfsdk class.
This requires making a few classes visible to fpdfsdk so we can have the
correct instances available instead of the IXFA types.
Review URL: https://codereview.chromium.org/1846993002
Diffstat (limited to 'fpdfsdk/include')
-rw-r--r-- | fpdfsdk/include/fpdfxfa/fpdfxfa_app.h | 5 | ||||
-rw-r--r-- | fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h | 101 | ||||
-rw-r--r-- | fpdfsdk/include/fpdfxfa/fpdfxfa_page.h | 10 | ||||
-rw-r--r-- | fpdfsdk/include/fsdk_annothandler.h | 14 | ||||
-rw-r--r-- | fpdfsdk/include/fsdk_baseannot.h | 2 | ||||
-rw-r--r-- | fpdfsdk/include/fsdk_baseform.h | 36 | ||||
-rw-r--r-- | fpdfsdk/include/fsdk_mgr.h | 4 |
7 files changed, 91 insertions, 81 deletions
diff --git a/fpdfsdk/include/fpdfxfa/fpdfxfa_app.h b/fpdfsdk/include/fpdfxfa/fpdfxfa_app.h index f96ed3b177..ed626716f7 100644 --- a/fpdfsdk/include/fpdfxfa/fpdfxfa_app.h +++ b/fpdfsdk/include/fpdfxfa/fpdfxfa_app.h @@ -21,7 +21,7 @@ class CPDFXFA_App : public IXFA_AppProvider { ~CPDFXFA_App() override; FX_BOOL Initialize(FXJSE_HRUNTIME hRuntime); - IXFA_App* GetXFAApp() { return m_pXFAApp; } + CXFA_FFApp* GetXFAApp() { return m_pXFAApp; } FX_BOOL AddFormFillEnv(CPDFDoc_Environment* pEnv); FX_BOOL RemoveFormFillEnv(CPDFDoc_Environment* pEnv); @@ -88,8 +88,7 @@ class CPDFXFA_App : public IXFA_AppProvider { static CPDFXFA_App* g_pApp; FX_BOOL m_bJavaScriptInitialized; - IXFA_App* m_pXFAApp; - IXFA_FontMgr* m_pFontMgr; + CXFA_FFApp* m_pXFAApp; FXJSE_HRUNTIME m_hJSERuntime; IFXJS_Runtime* m_pJSRuntime; CFX_WideString m_csAppType; diff --git a/fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h b/fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h index 98ed6fdbe4..6d501317d6 100644 --- a/fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h +++ b/fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h @@ -11,6 +11,7 @@ #include "public/fpdfview.h" #include "xfa/include/fxfa/fxfa.h" +#include "xfa/include/fxfa/xfa_ffdochandler.h" class CPDFXFA_App; class CPDFXFA_Document; @@ -19,7 +20,7 @@ class CPDFSDK_Document; class CPDFDoc_Environment; class IJS_Runtime; class IJS_Context; -class IXFA_DocHandler; +class CXFA_FFDocHandler; class CPDFXFA_Document : public IXFA_DocProvider { public: @@ -29,12 +30,12 @@ class CPDFXFA_Document : public IXFA_DocProvider { FX_BOOL LoadXFADoc(); CPDFXFA_App* GetApp() { return m_pApp; } CPDF_Document* GetPDFDoc() { return m_pPDFDoc; } - IXFA_Doc* GetXFADoc() { return m_pXFADoc; } - IXFA_DocView* GetXFADocView() { return m_pXFADocView; } + CXFA_FFDoc* GetXFADoc() { return m_pXFADoc; } + CXFA_FFDocView* GetXFADocView() { return m_pXFADocView; } int GetPageCount(); CPDFXFA_Page* GetPage(int page_index); - CPDFXFA_Page* GetPage(IXFA_PageView* pPage); + CPDFXFA_Page* GetPage(CXFA_FFPageView* pPage); void DeletePage(int page_index); void RemovePage(CPDFXFA_Page* page); @@ -44,39 +45,39 @@ class CPDFXFA_Document : public IXFA_DocProvider { void FXRect2PDFRect(const CFX_RectF& fxRectF, CFX_FloatRect& pdfRect); - virtual void SetChangeMark(IXFA_Doc* hDoc); - virtual FX_BOOL GetChangeMark(IXFA_Doc* hDoc); + virtual void SetChangeMark(CXFA_FFDoc* hDoc); + virtual FX_BOOL GetChangeMark(CXFA_FFDoc* hDoc); // used in dynamic xfa, dwFlags refer to XFA_INVALIDATE_XXX macros. - virtual void InvalidateRect(IXFA_PageView* pPageView, + virtual void InvalidateRect(CXFA_FFPageView* pPageView, const CFX_RectF& rt, uint32_t dwFlags = 0); // used in static xfa, dwFlags refer to XFA_INVALIDATE_XXX macros. - virtual void InvalidateRect(IXFA_Widget* hWidget, uint32_t dwFlags = 0); + virtual void InvalidateRect(CXFA_FFWidget* hWidget, uint32_t dwFlags = 0); // show or hide caret - virtual void DisplayCaret(IXFA_Widget* hWidget, + virtual void DisplayCaret(CXFA_FFWidget* hWidget, FX_BOOL bVisible, const CFX_RectF* pRtAnchor); // dwPos: (0:bottom 1:top) - virtual FX_BOOL GetPopupPos(IXFA_Widget* hWidget, + virtual FX_BOOL GetPopupPos(CXFA_FFWidget* hWidget, FX_FLOAT fMinPopup, FX_FLOAT fMaxPopup, const CFX_RectF& rtAnchor, CFX_RectF& rtPopup); - virtual FX_BOOL PopupMenu(IXFA_Widget* hWidget, + virtual FX_BOOL PopupMenu(CXFA_FFWidget* hWidget, CFX_PointF ptPopup, const CFX_RectF* pRectExclude = NULL); // dwFlags XFA_PAGEVIEWEVENT_Added, XFA_PAGEVIEWEVENT_Removing - virtual void PageViewEvent(IXFA_PageView* pPageView, uint32_t dwFlags); + virtual void PageViewEvent(CXFA_FFPageView* pPageView, uint32_t dwFlags); // dwEvent refer to XFA_WIDGETEVENT_XXX - virtual void WidgetEvent(IXFA_Widget* hWidget, + virtual void WidgetEvent(CXFA_FFWidget* hWidget, CXFA_WidgetAcc* pWidgetData, uint32_t dwEvent, void* pParam = NULL, void* pAdditional = NULL); // return true if render it. - virtual FX_BOOL RenderCustomWidget(IXFA_Widget* hWidget, + virtual FX_BOOL RenderCustomWidget(CXFA_FFWidget* hWidget, CFX_Graphics* pGS, CFX_Matrix* pMatrix, const CFX_RectF& rtUI) { @@ -84,44 +85,44 @@ class CPDFXFA_Document : public IXFA_DocProvider { } // host method - virtual int32_t CountPages(IXFA_Doc* hDoc); - virtual int32_t GetCurrentPage(IXFA_Doc* hDoc); - virtual void SetCurrentPage(IXFA_Doc* hDoc, int32_t 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, const CFX_WideStringC& wsTitle); - virtual void ExportData(IXFA_Doc* hDoc, + virtual int32_t CountPages(CXFA_FFDoc* hDoc); + virtual int32_t GetCurrentPage(CXFA_FFDoc* hDoc); + virtual void SetCurrentPage(CXFA_FFDoc* hDoc, int32_t iCurPage); + virtual FX_BOOL IsCalculationsEnabled(CXFA_FFDoc* hDoc); + virtual void SetCalculationsEnabled(CXFA_FFDoc* hDoc, FX_BOOL bEnabled); + virtual void GetTitle(CXFA_FFDoc* hDoc, CFX_WideString& wsTitle); + virtual void SetTitle(CXFA_FFDoc* hDoc, const CFX_WideStringC& wsTitle); + virtual void ExportData(CXFA_FFDoc* hDoc, const CFX_WideStringC& wsFilePath, FX_BOOL bXDP = TRUE); - virtual void ImportData(IXFA_Doc* hDoc, const CFX_WideStringC& wsFilePath); - virtual void GotoURL(IXFA_Doc* hDoc, + virtual void ImportData(CXFA_FFDoc* hDoc, const CFX_WideStringC& wsFilePath); + virtual void GotoURL(CXFA_FFDoc* hDoc, const CFX_WideStringC& 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, IXFA_Widget* hWidget); - virtual void Print(IXFA_Doc* hDoc, + virtual FX_BOOL IsValidationsEnabled(CXFA_FFDoc* hDoc); + virtual void SetValidationsEnabled(CXFA_FFDoc* hDoc, FX_BOOL bEnabled); + virtual void SetFocusWidget(CXFA_FFDoc* hDoc, CXFA_FFWidget* hWidget); + virtual void Print(CXFA_FFDoc* hDoc, int32_t nStartPage, int32_t nEndPage, uint32_t dwOptions); // LayoutPseudo method - virtual int32_t AbsPageCountInBatch(IXFA_Doc* hDoc) { return 0; } - virtual int32_t AbsPageInBatch(IXFA_Doc* hDoc, IXFA_Widget* hWidget) { + virtual int32_t AbsPageCountInBatch(CXFA_FFDoc* hDoc) { return 0; } + virtual int32_t AbsPageInBatch(CXFA_FFDoc* hDoc, CXFA_FFWidget* hWidget) { return 0; } - virtual int32_t SheetCountInBatch(IXFA_Doc* hDoc) { return 0; } - virtual int32_t SheetInBatch(IXFA_Doc* hDoc, IXFA_Widget* hWidget) { + virtual int32_t SheetCountInBatch(CXFA_FFDoc* hDoc) { return 0; } + virtual int32_t SheetInBatch(CXFA_FFDoc* hDoc, CXFA_FFWidget* hWidget) { return 0; } - virtual int32_t Verify(IXFA_Doc* hDoc, + virtual int32_t Verify(CXFA_FFDoc* hDoc, CXFA_Node* pSigNode, FX_BOOL bUsed = TRUE) { return 0; } - virtual FX_BOOL Sign(IXFA_Doc* hDoc, + virtual FX_BOOL Sign(CXFA_FFDoc* hDoc, CXFA_NodeList* pNodeList, const CFX_WideStringC& wsExpression, const CFX_WideStringC& wsXMLIdent, @@ -129,16 +130,16 @@ class CPDFXFA_Document : public IXFA_DocProvider { FX_BOOL bUsed = TRUE) { return 0; } - virtual CXFA_NodeList* Enumerate(IXFA_Doc* hDoc) { return 0; } - virtual FX_BOOL Clear(IXFA_Doc* hDoc, + virtual CXFA_NodeList* Enumerate(CXFA_FFDoc* hDoc) { return 0; } + virtual FX_BOOL Clear(CXFA_FFDoc* hDoc, CXFA_Node* pSigNode, FX_BOOL bCleared = TRUE) { return 0; } // Get document path - virtual void GetURL(IXFA_Doc* hDoc, CFX_WideString& wsDocURL); - virtual FX_ARGB GetHighlightColor(IXFA_Doc* hDoc); + virtual void GetURL(CXFA_FFDoc* hDoc, CFX_WideString& wsDocURL); + virtual FX_ARGB GetHighlightColor(CXFA_FFDoc* hDoc); /** *Submit data to email, http, ftp. @@ -152,35 +153,35 @@ class CPDFXFA_Document : public IXFA_DocProvider { * @param[in] bEmbedPDF, specifies whether PDF is embedded in the submitted *content or not. */ - virtual FX_BOOL SubmitData(IXFA_Doc* hDoc, CXFA_Submit submit); + virtual FX_BOOL SubmitData(CXFA_FFDoc* hDoc, CXFA_Submit submit); - virtual FX_BOOL CheckWord(IXFA_Doc* hDoc, const CFX_ByteStringC& sWord) { + virtual FX_BOOL CheckWord(CXFA_FFDoc* hDoc, const CFX_ByteStringC& sWord) { return FALSE; } - virtual FX_BOOL GetSuggestWords(IXFA_Doc* hDoc, + virtual FX_BOOL GetSuggestWords(CXFA_FFDoc* hDoc, const CFX_ByteStringC& sWord, std::vector<CFX_ByteString>& sSuggest) { return FALSE; } // Get PDF javascript object, set the object to hValue. - virtual FX_BOOL GetPDFScriptObject(IXFA_Doc* hDoc, + virtual FX_BOOL GetPDFScriptObject(CXFA_FFDoc* hDoc, const CFX_ByteStringC& utf8Name, FXJSE_HVALUE hValue); - virtual FX_BOOL GetGlobalProperty(IXFA_Doc* hDoc, + virtual FX_BOOL GetGlobalProperty(CXFA_FFDoc* hDoc, const CFX_ByteStringC& szPropName, FXJSE_HVALUE hValue); - virtual FX_BOOL SetGlobalProperty(IXFA_Doc* hDoc, + virtual FX_BOOL SetGlobalProperty(CXFA_FFDoc* hDoc, const CFX_ByteStringC& szPropName, FXJSE_HVALUE hValue); - virtual CPDF_Document* OpenPDF(IXFA_Doc* hDoc, + virtual CPDF_Document* OpenPDF(CXFA_FFDoc* hDoc, IFX_FileRead* pFile, FX_BOOL bTakeOverFile) { return NULL; } - virtual IFX_FileRead* OpenLinkedFile(IXFA_Doc* hDoc, + virtual IFX_FileRead* OpenLinkedFile(CXFA_FFDoc* hDoc, const CFX_WideString& wsLink); FX_BOOL _GetHValueByName(const CFX_ByteStringC& utf8Name, @@ -189,7 +190,7 @@ class CPDFXFA_Document : public IXFA_DocProvider { FX_BOOL _OnBeforeNotifySumbit(); void _OnAfterNotifySumbit(); FX_BOOL _NotifySubmit(FX_BOOL bPrevOrPost); - FX_BOOL _SubmitData(IXFA_Doc* hDoc, CXFA_Submit submit); + FX_BOOL _SubmitData(CXFA_FFDoc* hDoc, CXFA_Submit submit); FX_BOOL _MailToInfo(CFX_WideString& csURL, CFX_WideString& csToAddress, CFX_WideString& csCCAddress, @@ -211,7 +212,7 @@ class CPDFXFA_Document : public IXFA_DocProvider { FXFA_LOADSTATUS_CLOSING, FXFA_LOADSTATUS_CLOSED }; - void CloseXFADoc(IXFA_DocHandler* pDoc) { + void CloseXFADoc(CXFA_FFDocHandler* pDoc) { if (pDoc) { pDoc->CloseDoc(m_pXFADoc); pDoc->ReleaseDoc(m_pXFADoc); @@ -223,8 +224,8 @@ class CPDFXFA_Document : public IXFA_DocProvider { int m_iDocType; CPDF_Document* m_pPDFDoc; CPDFSDK_Document* m_pSDKDoc; - IXFA_Doc* m_pXFADoc; - IXFA_DocView* m_pXFADocView; + CXFA_FFDoc* m_pXFADoc; + CXFA_FFDocView* m_pXFADocView; CPDFXFA_App* m_pApp; IJS_Context* m_pJSContext; CFX_ArrayTemplate<CPDFXFA_Page*> m_XFAPageList; diff --git a/fpdfsdk/include/fpdfxfa/fpdfxfa_page.h b/fpdfsdk/include/fpdfxfa/fpdfxfa_page.h index d686fe9bae..20da040a23 100644 --- a/fpdfsdk/include/fpdfxfa/fpdfxfa_page.h +++ b/fpdfsdk/include/fpdfxfa/fpdfxfa_page.h @@ -14,7 +14,7 @@ class CPDFXFA_Document; class CPDF_Page; -class IXFA_PageView; +class CXFA_FFPageView; class CPDFXFA_Page { public: @@ -28,8 +28,10 @@ class CPDFXFA_Page { CPDFXFA_Document* GetDocument() { return m_pDocument; } int GetPageIndex() { return m_iPageIndex; } CPDF_Page* GetPDFPage() { return m_pPDFPage; } - IXFA_PageView* GetXFAPageView() { return m_pXFAPageView; } - void SetXFAPageView(IXFA_PageView* pPageView) { m_pXFAPageView = pPageView; } + CXFA_FFPageView* GetXFAPageView() { return m_pXFAPageView; } + void SetXFAPageView(CXFA_FFPageView* pPageView) { + m_pXFAPageView = pPageView; + } FX_FLOAT GetPageWidth(); FX_FLOAT GetPageHeight(); @@ -66,7 +68,7 @@ class CPDFXFA_Page { private: CPDF_Page* m_pPDFPage; - IXFA_PageView* m_pXFAPageView; + CXFA_FFPageView* m_pXFAPageView; int m_iPageIndex; CPDFXFA_Document* m_pDocument; int m_iRef; diff --git a/fpdfsdk/include/fsdk_annothandler.h b/fpdfsdk/include/fsdk_annothandler.h index 637fdfc387..e810a7e504 100644 --- a/fpdfsdk/include/fsdk_annothandler.h +++ b/fpdfsdk/include/fsdk_annothandler.h @@ -15,6 +15,9 @@ #ifdef PDF_ENABLE_XFA #include "xfa/include/fxfa/fxfa.h" +#include "xfa/include/fxfa/xfa_ffdocview.h" +#include "xfa/include/fxfa/xfa_ffpageview.h" +#include "xfa/include/fxfa/xfa_ffwidgethandler.h" #define FSDK_XFAWIDGET_TYPENAME "XFAWidget" #endif // PDF_ENABLE_XFA @@ -42,7 +45,7 @@ class IPDFSDK_AnnotHandler { CPDFSDK_PageView* pPage) = 0; #ifdef PDF_ENABLE_XFA - virtual CPDFSDK_Annot* NewAnnot(IXFA_Widget* hWidget, + virtual CPDFSDK_Annot* NewAnnot(CXFA_FFWidget* hWidget, CPDFSDK_PageView* pPage) = 0; #endif // PDF_ENABLE_XFA @@ -148,7 +151,7 @@ class CPDFSDK_BFAnnotHandler : public IPDFSDK_AnnotHandler { FX_BOOL CanAnswer(CPDFSDK_Annot* pAnnot) override; CPDFSDK_Annot* NewAnnot(CPDF_Annot* pAnnot, CPDFSDK_PageView* pPage) override; #ifdef PDF_ENABLE_XFA - CPDFSDK_Annot* NewAnnot(IXFA_Widget* hWidget, + CPDFSDK_Annot* NewAnnot(CXFA_FFWidget* hWidget, CPDFSDK_PageView* pPage) override; #endif // PDF_ENABLE_XFA void ReleaseAnnot(CPDFSDK_Annot* pAnnot) override; @@ -255,7 +258,8 @@ class CPDFSDK_XFAAnnotHandler : public IPDFSDK_AnnotHandler { return NULL; } - virtual CPDFSDK_Annot* NewAnnot(IXFA_Widget* pAnnot, CPDFSDK_PageView* pPage); + virtual CPDFSDK_Annot* NewAnnot(CXFA_FFWidget* pAnnot, + CPDFSDK_PageView* pPage); virtual void ReleaseAnnot(CPDFSDK_Annot* pAnnot); @@ -345,7 +349,7 @@ class CPDFSDK_XFAAnnotHandler : public IPDFSDK_AnnotHandler { CPDFSDK_Annot* pNewAnnot); private: - IXFA_WidgetHandler* GetXFAWidgetHandler(CPDFSDK_Annot* pAnnot); + CXFA_FFWidgetHandler* GetXFAWidgetHandler(CPDFSDK_Annot* pAnnot); uint32_t GetFWLFlags(uint32_t dwFlag); private: @@ -367,7 +371,7 @@ class CPDFSDK_AnnotHandlerMgr { virtual CPDFSDK_Annot* NewAnnot(CPDF_Annot* pAnnot, CPDFSDK_PageView* pPageView); #ifdef PDF_ENABLE_XFA - virtual CPDFSDK_Annot* NewAnnot(IXFA_Widget* pAnnot, + virtual CPDFSDK_Annot* NewAnnot(CXFA_FFWidget* pAnnot, CPDFSDK_PageView* pPageView); #endif // PDF_ENABLE_XFA virtual void ReleaseAnnot(CPDFSDK_Annot* pAnnot); diff --git a/fpdfsdk/include/fsdk_baseannot.h b/fpdfsdk/include/fsdk_baseannot.h index dc2c1a9691..a8f4a67381 100644 --- a/fpdfsdk/include/fsdk_baseannot.h +++ b/fpdfsdk/include/fsdk_baseannot.h @@ -83,7 +83,7 @@ class CPDFSDK_Annot { virtual CPDF_Annot* GetPDFAnnot() const { return nullptr; } #ifdef PDF_ENABLE_XFA - virtual IXFA_Widget* GetXFAWidget() const { return nullptr; } + virtual CXFA_FFWidget* GetXFAWidget() const { return nullptr; } #endif // PDF_ENABLE_XFA virtual CFX_ByteString GetType() const { return ""; } diff --git a/fpdfsdk/include/fsdk_baseform.h b/fpdfsdk/include/fsdk_baseform.h index aa96215d1c..06f0666c81 100644 --- a/fpdfsdk/include/fsdk_baseform.h +++ b/fpdfsdk/include/fsdk_baseform.h @@ -15,6 +15,10 @@ #include "core/include/fxge/fx_dib.h" #include "fpdfsdk/include/fsdk_baseannot.h" +#ifdef PDF_ENABLE_XFA +#include "xfa/include/fxfa/xfa_ffwidgethandler.h" +#endif // PDF_ENABLE_XFA + #if _FX_OS_ == _FX_ANDROID_ #include "time.h" #else @@ -67,9 +71,9 @@ struct PDFSDK_FieldAction { class CPDFSDK_Widget : public CPDFSDK_BAAnnot { public: #ifdef PDF_ENABLE_XFA - IXFA_Widget* GetMixXFAWidget() const; - IXFA_Widget* GetGroupMixXFAWidget(); - IXFA_WidgetHandler* GetXFAWidgetHandler() const; + CXFA_FFWidget* GetMixXFAWidget() const; + CXFA_FFWidget* GetGroupMixXFAWidget(); + CXFA_FFWidgetHandler* GetXFAWidgetHandler() const; FX_BOOL HasXFAAAction(PDFSDK_XFAAActionType eXFAAAT); FX_BOOL OnXFAAAction(PDFSDK_XFAAActionType eXFAAAT, @@ -80,12 +84,12 @@ class CPDFSDK_Widget : public CPDFSDK_BAAnnot { void SynchronizeXFAValue(); void SynchronizeXFAItems(); - static void SynchronizeXFAValue(IXFA_DocView* pXFADocView, - IXFA_Widget* hWidget, + static void SynchronizeXFAValue(CXFA_FFDocView* pXFADocView, + CXFA_FFWidget* hWidget, CPDF_FormField* pFormField, CPDF_FormControl* pFormControl); - static void SynchronizeXFAItems(IXFA_DocView* pXFADocView, - IXFA_Widget* hWidget, + static void SynchronizeXFAItems(CXFA_FFDocView* pXFADocView, + CXFA_FFWidget* hWidget, CPDF_FormField* pFormField, CPDF_FormControl* pFormControl); #endif // PDF_ENABLE_XFA @@ -214,21 +218,21 @@ class CPDFSDK_Widget : public CPDFSDK_BAAnnot { int32_t m_nValueAge; #ifdef PDF_ENABLE_XFA - mutable IXFA_Widget* m_hMixXFAWidget; - mutable IXFA_WidgetHandler* m_pWidgetHandler; + mutable CXFA_FFWidget* m_hMixXFAWidget; + mutable CXFA_FFWidgetHandler* m_pWidgetHandler; #endif // PDF_ENABLE_XFA }; #ifdef PDF_ENABLE_XFA class CPDFSDK_XFAWidget : public CPDFSDK_Annot { public: - CPDFSDK_XFAWidget(IXFA_Widget* pAnnot, + CPDFSDK_XFAWidget(CXFA_FFWidget* pAnnot, CPDFSDK_PageView* pPageView, CPDFSDK_InterForm* pInterForm); ~CPDFSDK_XFAWidget() override {} FX_BOOL IsXFAField() override; - IXFA_Widget* GetXFAWidget() const override { return m_hXFAWidget; } + CXFA_FFWidget* GetXFAWidget() const override { return m_hXFAWidget; } CFX_ByteString GetType() const override; CFX_ByteString GetSubType() const override { return ""; } CFX_FloatRect GetRect() const override; @@ -237,10 +241,10 @@ class CPDFSDK_XFAWidget : public CPDFSDK_Annot { private: CPDFSDK_InterForm* m_pInterForm; - IXFA_Widget* m_hXFAWidget; + CXFA_FFWidget* m_hXFAWidget; }; #define CPDFSDK_XFAWidgetMap \ - CFX_MapPtrTemplate<IXFA_Widget*, CPDFSDK_XFAWidget*> + CFX_MapPtrTemplate<CXFA_FFWidget*, CPDFSDK_XFAWidget*> #define CPDFSDK_FieldSynchronizeMap CFX_MapPtrTemplate<CPDF_FormField*, int> #endif // PDF_ENABLE_XFA @@ -268,9 +272,9 @@ class CPDFSDK_InterForm : public CPDF_FormNotify { FX_BOOL IsCalculateEnabled() const; #ifdef PDF_ENABLE_XFA - void AddXFAMap(IXFA_Widget* hWidget, CPDFSDK_XFAWidget* pWidget); - void RemoveXFAMap(IXFA_Widget* hWidget); - CPDFSDK_XFAWidget* GetXFAWidget(IXFA_Widget* hWidget); + void AddXFAMap(CXFA_FFWidget* hWidget, CPDFSDK_XFAWidget* pWidget); + void RemoveXFAMap(CXFA_FFWidget* hWidget); + CPDFSDK_XFAWidget* GetXFAWidget(CXFA_FFWidget* hWidget); void XfaEnableCalculate(FX_BOOL bEnabled); FX_BOOL IsXfaCalculateEnabled() const; FX_BOOL IsXfaValidationsEnabled(); diff --git a/fpdfsdk/include/fsdk_mgr.h b/fpdfsdk/include/fsdk_mgr.h index 4bc5a7f916..39edc38f57 100644 --- a/fpdfsdk/include/fsdk_mgr.h +++ b/fpdfsdk/include/fsdk_mgr.h @@ -587,8 +587,8 @@ class CPDFSDK_PageView final { CPDFSDK_Annot* GetAnnotByDict(CPDF_Dictionary* pDict); #ifdef PDF_ENABLE_XFA - CPDFSDK_Annot* AddAnnot(IXFA_Widget* pPDFAnnot); - CPDFSDK_Annot* GetAnnotByXFAWidget(IXFA_Widget* hWidget); + CPDFSDK_Annot* AddAnnot(CXFA_FFWidget* pPDFAnnot); + CPDFSDK_Annot* GetAnnotByXFAWidget(CXFA_FFWidget* hWidget); CPDFXFA_Page* GetPDFXFAPage() { return m_page; } CPDF_Page* GetPDFPage(); #else |