diff options
author | jaepark <jaepark@google.com> | 2016-08-30 13:43:05 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-08-30 13:43:06 -0700 |
commit | 8c54182aba447f7fbd6e763a559bec99ab996613 (patch) | |
tree | e51701ce8b879f3a30a5bbf11316c403f8852fdd /fpdfsdk | |
parent | fbda17d61de1e02799f5d77dceb23df3688b764e (diff) | |
download | pdfium-8c54182aba447f7fbd6e763a559bec99ab996613.tar.xz |
Rename CPDFSDK_BFAnnotHandler and CPDFSDK_XFAAnnotHandler.
CPDFSDK_BFAnnotHandler handles CPDFSDK_Widget, so rename it to
CPDFSDK_WidgetHandler. Similarly, CPDFSDK_XFAAnnotHandler handles
CPDFSDK_XFAWidget, so rename it to CPDFSDK_XFAWidgetHandler.
Review-Url: https://codereview.chromium.org/2298443002
Diffstat (limited to 'fpdfsdk')
-rw-r--r-- | fpdfsdk/cpdfsdk_annothandlermgr.cpp | 14 | ||||
-rw-r--r-- | fpdfsdk/cpdfsdk_widgethandler.cpp (renamed from fpdfsdk/cpdfsdk_bfannothandler.cpp) | 170 | ||||
-rw-r--r-- | fpdfsdk/cpdfsdk_xfawidgethandler.cpp (renamed from fpdfsdk/cpdfsdk_xfaannothandler.cpp) | 178 | ||||
-rw-r--r-- | fpdfsdk/include/cpdfsdk_annothandlermgr.h | 8 | ||||
-rw-r--r-- | fpdfsdk/include/cpdfsdk_widgethandler.h (renamed from fpdfsdk/include/cpdfsdk_bfannothandler.h) | 12 | ||||
-rw-r--r-- | fpdfsdk/include/cpdfsdk_xfawidgethandler.h (renamed from fpdfsdk/include/cpdfsdk_xfaannothandler.h) | 12 |
6 files changed, 197 insertions, 197 deletions
diff --git a/fpdfsdk/cpdfsdk_annothandlermgr.cpp b/fpdfsdk/cpdfsdk_annothandlermgr.cpp index 33c1ca95a9..9f5a545d65 100644 --- a/fpdfsdk/cpdfsdk_annothandlermgr.cpp +++ b/fpdfsdk/cpdfsdk_annothandlermgr.cpp @@ -11,12 +11,12 @@ #include "fpdfsdk/include/cpdfsdk_annot.h" #include "fpdfsdk/include/cpdfsdk_baannot.h" #include "fpdfsdk/include/cpdfsdk_baannothandler.h" -#include "fpdfsdk/include/cpdfsdk_bfannothandler.h" #include "fpdfsdk/include/cpdfsdk_datetime.h" +#include "fpdfsdk/include/cpdfsdk_widgethandler.h" #include "fpdfsdk/include/fsdk_mgr.h" #ifdef PDF_ENABLE_XFA -#include "fpdfsdk/include/cpdfsdk_xfaannothandler.h" +#include "fpdfsdk/include/cpdfsdk_xfawidgethandler.h" #include "fpdfsdk/fpdfxfa/include/fpdfxfa_page.h" #include "xfa/fxfa/include/xfa_ffpageview.h" #include "xfa/fxfa/include/xfa_ffwidget.h" @@ -24,12 +24,12 @@ CPDFSDK_AnnotHandlerMgr::CPDFSDK_AnnotHandlerMgr(CPDFDoc_Environment* pApp) : m_pBAAnnotHandler(new CPDFSDK_BAAnnotHandler()), - m_pBFAnnotHandler(new CPDFSDK_BFAnnotHandler(pApp)), + m_pWidgetHandler(new CPDFSDK_WidgetHandler(pApp)), #ifdef PDF_ENABLE_XFA - m_pXFAAnnotHandler(new CPDFSDK_XFAAnnotHandler(pApp)), + m_pXFAWidgetHandler(new CPDFSDK_XFAWidgetHandler(pApp)), #endif // PDF_ENABLE_XFA m_pApp(pApp) { - m_pBFAnnotHandler->SetFormFiller(m_pApp->GetIFormFiller()); + m_pWidgetHandler->SetFormFiller(m_pApp->GetIFormFiller()); } CPDFSDK_AnnotHandlerMgr::~CPDFSDK_AnnotHandlerMgr() {} @@ -79,11 +79,11 @@ IPDFSDK_AnnotHandler* CPDFSDK_AnnotHandlerMgr::GetAnnotHandler( IPDFSDK_AnnotHandler* CPDFSDK_AnnotHandlerMgr::GetAnnotHandler( const CFX_ByteString& sType) const { if (sType == "Widget") - return m_pBFAnnotHandler.get(); + return m_pWidgetHandler.get(); #ifdef PDF_ENABLE_XFA if (sType == FSDK_XFAWIDGET_TYPENAME) - return m_pXFAAnnotHandler.get(); + return m_pXFAWidgetHandler.get(); #endif // PDF_ENABLE_XFA return m_pBAAnnotHandler.get(); diff --git a/fpdfsdk/cpdfsdk_bfannothandler.cpp b/fpdfsdk/cpdfsdk_widgethandler.cpp index ff0c26404c..0fb64dfaec 100644 --- a/fpdfsdk/cpdfsdk_bfannothandler.cpp +++ b/fpdfsdk/cpdfsdk_widgethandler.cpp @@ -4,7 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#include "fpdfsdk/include/cpdfsdk_bfannothandler.h" +#include "fpdfsdk/include/cpdfsdk_widgethandler.h" #include <memory> #include <vector> @@ -22,16 +22,16 @@ #include "fpdfsdk/fpdfxfa/include/fpdfxfa_doc.h" #endif // PDF_ENABLE_XFA -CPDFSDK_BFAnnotHandler::CPDFSDK_BFAnnotHandler(CPDFDoc_Environment* pApp) +CPDFSDK_WidgetHandler::CPDFSDK_WidgetHandler(CPDFDoc_Environment* pApp) : m_pApp(pApp), m_pFormFiller(nullptr) {} -CPDFSDK_BFAnnotHandler::~CPDFSDK_BFAnnotHandler() {} +CPDFSDK_WidgetHandler::~CPDFSDK_WidgetHandler() {} -CFX_ByteString CPDFSDK_BFAnnotHandler::GetType() { +CFX_ByteString CPDFSDK_WidgetHandler::GetType() { return CFX_ByteString("Widget"); } -FX_BOOL CPDFSDK_BFAnnotHandler::CanAnswer(CPDFSDK_Annot* pAnnot) { +FX_BOOL CPDFSDK_WidgetHandler::CanAnswer(CPDFSDK_Annot* pAnnot) { ASSERT(pAnnot->GetAnnotSubtype() == "Widget"); if (pAnnot->IsSignatureWidget()) return FALSE; @@ -54,8 +54,8 @@ FX_BOOL CPDFSDK_BFAnnotHandler::CanAnswer(CPDFSDK_Annot* pAnnot) { (dwPermissions & FPDFPERM_ANNOT_FORM); } -CPDFSDK_Annot* CPDFSDK_BFAnnotHandler::NewAnnot(CPDF_Annot* pAnnot, - CPDFSDK_PageView* pPage) { +CPDFSDK_Annot* CPDFSDK_WidgetHandler::NewAnnot(CPDF_Annot* pAnnot, + CPDFSDK_PageView* pPage) { CPDFSDK_Document* pSDKDoc = m_pApp->GetSDKDocument(); CPDFSDK_InterForm* pInterForm = pSDKDoc->GetInterForm(); CPDF_FormControl* pCtrl = CPDFSDK_Widget::GetFormControl( @@ -73,13 +73,13 @@ CPDFSDK_Annot* CPDFSDK_BFAnnotHandler::NewAnnot(CPDF_Annot* pAnnot, } #ifdef PDF_ENABLE_XFA -CPDFSDK_Annot* CPDFSDK_BFAnnotHandler::NewAnnot(CXFA_FFWidget* hWidget, - CPDFSDK_PageView* pPage) { +CPDFSDK_Annot* CPDFSDK_WidgetHandler::NewAnnot(CXFA_FFWidget* hWidget, + CPDFSDK_PageView* pPage) { return nullptr; } #endif // PDF_ENABLE_XFA -void CPDFSDK_BFAnnotHandler::ReleaseAnnot(CPDFSDK_Annot* pAnnot) { +void CPDFSDK_WidgetHandler::ReleaseAnnot(CPDFSDK_Annot* pAnnot) { ASSERT(pAnnot); if (m_pFormFiller) @@ -91,13 +91,13 @@ void CPDFSDK_BFAnnotHandler::ReleaseAnnot(CPDFSDK_Annot* pAnnot) { pInterForm->RemoveMap(pControl); } -void CPDFSDK_BFAnnotHandler::DeleteAnnot(CPDFSDK_Annot* pAnnot) {} +void CPDFSDK_WidgetHandler::DeleteAnnot(CPDFSDK_Annot* pAnnot) {} -void CPDFSDK_BFAnnotHandler::OnDraw(CPDFSDK_PageView* pPageView, - CPDFSDK_Annot* pAnnot, - CFX_RenderDevice* pDevice, - CFX_Matrix* pUser2Device, - uint32_t dwFlags) { +void CPDFSDK_WidgetHandler::OnDraw(CPDFSDK_PageView* pPageView, + CPDFSDK_Annot* pAnnot, + CFX_RenderDevice* pDevice, + CFX_Matrix* pUser2Device, + uint32_t dwFlags) { if (pAnnot->IsSignatureWidget()) { static_cast<CPDFSDK_BAAnnot*>(pAnnot)->DrawAppearance( pDevice, pUser2Device, CPDF_Annot::Normal, nullptr); @@ -107,76 +107,76 @@ void CPDFSDK_BFAnnotHandler::OnDraw(CPDFSDK_PageView* pPageView, } } -void CPDFSDK_BFAnnotHandler::OnDrawSleep(CPDFSDK_PageView* pPageView, - CPDFSDK_Annot* pAnnot, - CFX_RenderDevice* pDevice, - CFX_Matrix* pUser2Device, - const CFX_FloatRect& rcWindow, - uint32_t dwFlags) {} +void CPDFSDK_WidgetHandler::OnDrawSleep(CPDFSDK_PageView* pPageView, + CPDFSDK_Annot* pAnnot, + CFX_RenderDevice* pDevice, + CFX_Matrix* pUser2Device, + const CFX_FloatRect& rcWindow, + uint32_t dwFlags) {} -void CPDFSDK_BFAnnotHandler::OnDelete(CPDFSDK_Annot* pAnnot) {} +void CPDFSDK_WidgetHandler::OnDelete(CPDFSDK_Annot* pAnnot) {} -void CPDFSDK_BFAnnotHandler::OnRelease(CPDFSDK_Annot* pAnnot) {} +void CPDFSDK_WidgetHandler::OnRelease(CPDFSDK_Annot* pAnnot) {} -void CPDFSDK_BFAnnotHandler::OnMouseEnter(CPDFSDK_PageView* pPageView, - CPDFSDK_Annot* pAnnot, - uint32_t nFlag) { +void CPDFSDK_WidgetHandler::OnMouseEnter(CPDFSDK_PageView* pPageView, + CPDFSDK_Annot* pAnnot, + uint32_t nFlag) { if (!pAnnot->IsSignatureWidget() && m_pFormFiller) m_pFormFiller->OnMouseEnter(pPageView, pAnnot, nFlag); } -void CPDFSDK_BFAnnotHandler::OnMouseExit(CPDFSDK_PageView* pPageView, - CPDFSDK_Annot* pAnnot, - uint32_t nFlag) { +void CPDFSDK_WidgetHandler::OnMouseExit(CPDFSDK_PageView* pPageView, + CPDFSDK_Annot* pAnnot, + uint32_t nFlag) { if (!pAnnot->IsSignatureWidget() && m_pFormFiller) m_pFormFiller->OnMouseExit(pPageView, pAnnot, nFlag); } -FX_BOOL CPDFSDK_BFAnnotHandler::OnLButtonDown(CPDFSDK_PageView* pPageView, - CPDFSDK_Annot* pAnnot, - uint32_t nFlags, - const CFX_FloatPoint& point) { +FX_BOOL CPDFSDK_WidgetHandler::OnLButtonDown(CPDFSDK_PageView* pPageView, + CPDFSDK_Annot* pAnnot, + uint32_t nFlags, + const CFX_FloatPoint& point) { if (!pAnnot->IsSignatureWidget() && m_pFormFiller) return m_pFormFiller->OnLButtonDown(pPageView, pAnnot, nFlags, point); return FALSE; } -FX_BOOL CPDFSDK_BFAnnotHandler::OnLButtonUp(CPDFSDK_PageView* pPageView, - CPDFSDK_Annot* pAnnot, - uint32_t nFlags, - const CFX_FloatPoint& point) { +FX_BOOL CPDFSDK_WidgetHandler::OnLButtonUp(CPDFSDK_PageView* pPageView, + CPDFSDK_Annot* pAnnot, + uint32_t nFlags, + const CFX_FloatPoint& point) { if (!pAnnot->IsSignatureWidget() && m_pFormFiller) return m_pFormFiller->OnLButtonUp(pPageView, pAnnot, nFlags, point); return FALSE; } -FX_BOOL CPDFSDK_BFAnnotHandler::OnLButtonDblClk(CPDFSDK_PageView* pPageView, - CPDFSDK_Annot* pAnnot, - uint32_t nFlags, - const CFX_FloatPoint& point) { +FX_BOOL CPDFSDK_WidgetHandler::OnLButtonDblClk(CPDFSDK_PageView* pPageView, + CPDFSDK_Annot* pAnnot, + uint32_t nFlags, + const CFX_FloatPoint& point) { if (!pAnnot->IsSignatureWidget() && m_pFormFiller) return m_pFormFiller->OnLButtonDblClk(pPageView, pAnnot, nFlags, point); return FALSE; } -FX_BOOL CPDFSDK_BFAnnotHandler::OnMouseMove(CPDFSDK_PageView* pPageView, - CPDFSDK_Annot* pAnnot, - uint32_t nFlags, - const CFX_FloatPoint& point) { +FX_BOOL CPDFSDK_WidgetHandler::OnMouseMove(CPDFSDK_PageView* pPageView, + CPDFSDK_Annot* pAnnot, + uint32_t nFlags, + const CFX_FloatPoint& point) { if (!pAnnot->IsSignatureWidget() && m_pFormFiller) return m_pFormFiller->OnMouseMove(pPageView, pAnnot, nFlags, point); return FALSE; } -FX_BOOL CPDFSDK_BFAnnotHandler::OnMouseWheel(CPDFSDK_PageView* pPageView, - CPDFSDK_Annot* pAnnot, - uint32_t nFlags, - short zDelta, - const CFX_FloatPoint& point) { +FX_BOOL CPDFSDK_WidgetHandler::OnMouseWheel(CPDFSDK_PageView* pPageView, + CPDFSDK_Annot* pAnnot, + uint32_t nFlags, + short zDelta, + const CFX_FloatPoint& point) { if (!pAnnot->IsSignatureWidget() && m_pFormFiller) return m_pFormFiller->OnMouseWheel(pPageView, pAnnot, nFlags, zDelta, point); @@ -184,63 +184,63 @@ FX_BOOL CPDFSDK_BFAnnotHandler::OnMouseWheel(CPDFSDK_PageView* pPageView, return FALSE; } -FX_BOOL CPDFSDK_BFAnnotHandler::OnRButtonDown(CPDFSDK_PageView* pPageView, - CPDFSDK_Annot* pAnnot, - uint32_t nFlags, - const CFX_FloatPoint& point) { +FX_BOOL CPDFSDK_WidgetHandler::OnRButtonDown(CPDFSDK_PageView* pPageView, + CPDFSDK_Annot* pAnnot, + uint32_t nFlags, + const CFX_FloatPoint& point) { if (!pAnnot->IsSignatureWidget() && m_pFormFiller) return m_pFormFiller->OnRButtonDown(pPageView, pAnnot, nFlags, point); return FALSE; } -FX_BOOL CPDFSDK_BFAnnotHandler::OnRButtonUp(CPDFSDK_PageView* pPageView, - CPDFSDK_Annot* pAnnot, - uint32_t nFlags, - const CFX_FloatPoint& point) { +FX_BOOL CPDFSDK_WidgetHandler::OnRButtonUp(CPDFSDK_PageView* pPageView, + CPDFSDK_Annot* pAnnot, + uint32_t nFlags, + const CFX_FloatPoint& point) { if (!pAnnot->IsSignatureWidget() && m_pFormFiller) return m_pFormFiller->OnRButtonUp(pPageView, pAnnot, nFlags, point); return FALSE; } -FX_BOOL CPDFSDK_BFAnnotHandler::OnRButtonDblClk(CPDFSDK_PageView* pPageView, - CPDFSDK_Annot* pAnnot, - uint32_t nFlags, - const CFX_FloatPoint& point) { +FX_BOOL CPDFSDK_WidgetHandler::OnRButtonDblClk(CPDFSDK_PageView* pPageView, + CPDFSDK_Annot* pAnnot, + uint32_t nFlags, + const CFX_FloatPoint& point) { return FALSE; } -FX_BOOL CPDFSDK_BFAnnotHandler::OnChar(CPDFSDK_Annot* pAnnot, - uint32_t nChar, - uint32_t nFlags) { +FX_BOOL CPDFSDK_WidgetHandler::OnChar(CPDFSDK_Annot* pAnnot, + uint32_t nChar, + uint32_t nFlags) { if (!pAnnot->IsSignatureWidget() && m_pFormFiller) return m_pFormFiller->OnChar(pAnnot, nChar, nFlags); return FALSE; } -FX_BOOL CPDFSDK_BFAnnotHandler::OnKeyDown(CPDFSDK_Annot* pAnnot, - int nKeyCode, - int nFlag) { +FX_BOOL CPDFSDK_WidgetHandler::OnKeyDown(CPDFSDK_Annot* pAnnot, + int nKeyCode, + int nFlag) { if (!pAnnot->IsSignatureWidget() && m_pFormFiller) return m_pFormFiller->OnKeyDown(pAnnot, nKeyCode, nFlag); return FALSE; } -FX_BOOL CPDFSDK_BFAnnotHandler::OnKeyUp(CPDFSDK_Annot* pAnnot, - int nKeyCode, - int nFlag) { +FX_BOOL CPDFSDK_WidgetHandler::OnKeyUp(CPDFSDK_Annot* pAnnot, + int nKeyCode, + int nFlag) { return FALSE; } -void CPDFSDK_BFAnnotHandler::OnCreate(CPDFSDK_Annot* pAnnot) { +void CPDFSDK_WidgetHandler::OnCreate(CPDFSDK_Annot* pAnnot) { if (!pAnnot->IsSignatureWidget() && m_pFormFiller) m_pFormFiller->OnCreate(pAnnot); } -void CPDFSDK_BFAnnotHandler::OnLoad(CPDFSDK_Annot* pAnnot) { +void CPDFSDK_WidgetHandler::OnLoad(CPDFSDK_Annot* pAnnot) { if (pAnnot->IsSignatureWidget()) return; @@ -269,16 +269,16 @@ void CPDFSDK_BFAnnotHandler::OnLoad(CPDFSDK_Annot* pAnnot) { m_pFormFiller->OnLoad(pAnnot); } -FX_BOOL CPDFSDK_BFAnnotHandler::OnSetFocus(CPDFSDK_Annot* pAnnot, - uint32_t nFlag) { +FX_BOOL CPDFSDK_WidgetHandler::OnSetFocus(CPDFSDK_Annot* pAnnot, + uint32_t nFlag) { if (!pAnnot->IsSignatureWidget() && m_pFormFiller) return m_pFormFiller->OnSetFocus(pAnnot, nFlag); return TRUE; } -FX_BOOL CPDFSDK_BFAnnotHandler::OnKillFocus(CPDFSDK_Annot* pAnnot, - uint32_t nFlag) { +FX_BOOL CPDFSDK_WidgetHandler::OnKillFocus(CPDFSDK_Annot* pAnnot, + uint32_t nFlag) { if (!pAnnot->IsSignatureWidget() && m_pFormFiller) return m_pFormFiller->OnKillFocus(pAnnot, nFlag); @@ -286,23 +286,23 @@ FX_BOOL CPDFSDK_BFAnnotHandler::OnKillFocus(CPDFSDK_Annot* pAnnot, } #ifdef PDF_ENABLE_XFA -FX_BOOL CPDFSDK_BFAnnotHandler::OnXFAChangedFocus(CPDFSDK_Annot* pOldAnnot, - CPDFSDK_Annot* pNewAnnot) { +FX_BOOL CPDFSDK_WidgetHandler::OnXFAChangedFocus(CPDFSDK_Annot* pOldAnnot, + CPDFSDK_Annot* pNewAnnot) { return TRUE; } #endif // PDF_ENABLE_XFA -CFX_FloatRect CPDFSDK_BFAnnotHandler::GetViewBBox(CPDFSDK_PageView* pPageView, - CPDFSDK_Annot* pAnnot) { +CFX_FloatRect CPDFSDK_WidgetHandler::GetViewBBox(CPDFSDK_PageView* pPageView, + CPDFSDK_Annot* pAnnot) { if (!pAnnot->IsSignatureWidget() && m_pFormFiller) return CFX_FloatRect(m_pFormFiller->GetViewBBox(pPageView, pAnnot)); return CFX_FloatRect(0, 0, 0, 0); } -FX_BOOL CPDFSDK_BFAnnotHandler::HitTest(CPDFSDK_PageView* pPageView, - CPDFSDK_Annot* pAnnot, - const CFX_FloatPoint& point) { +FX_BOOL CPDFSDK_WidgetHandler::HitTest(CPDFSDK_PageView* pPageView, + CPDFSDK_Annot* pAnnot, + const CFX_FloatPoint& point) { ASSERT(pPageView); ASSERT(pAnnot); diff --git a/fpdfsdk/cpdfsdk_xfaannothandler.cpp b/fpdfsdk/cpdfsdk_xfawidgethandler.cpp index 2f4599da5d..9a9a7a8a4a 100644 --- a/fpdfsdk/cpdfsdk_xfaannothandler.cpp +++ b/fpdfsdk/cpdfsdk_xfawidgethandler.cpp @@ -4,7 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#include "fpdfsdk/include/cpdfsdk_xfaannothandler.h" +#include "fpdfsdk/include/cpdfsdk_xfawidgethandler.h" #include "core/fpdfdoc/include/cpdf_interform.h" #include "fpdfsdk/fpdfxfa/include/fpdfxfa_doc.h" @@ -20,26 +20,26 @@ #include "xfa/fxgraphics/include/cfx_graphics.h" #include "xfa/fwl/core/include/fwl_widgethit.h" -CPDFSDK_XFAAnnotHandler::CPDFSDK_XFAAnnotHandler(CPDFDoc_Environment* pApp) +CPDFSDK_XFAWidgetHandler::CPDFSDK_XFAWidgetHandler(CPDFDoc_Environment* pApp) : m_pApp(pApp) {} -CPDFSDK_XFAAnnotHandler::~CPDFSDK_XFAAnnotHandler() {} +CPDFSDK_XFAWidgetHandler::~CPDFSDK_XFAWidgetHandler() {} -CFX_ByteString CPDFSDK_XFAAnnotHandler::GetType() { +CFX_ByteString CPDFSDK_XFAWidgetHandler::GetType() { return FSDK_XFAWIDGET_TYPENAME; } -FX_BOOL CPDFSDK_XFAAnnotHandler::CanAnswer(CPDFSDK_Annot* pAnnot) { +FX_BOOL CPDFSDK_XFAWidgetHandler::CanAnswer(CPDFSDK_Annot* pAnnot) { return !!pAnnot->GetXFAWidget(); } -CPDFSDK_Annot* CPDFSDK_XFAAnnotHandler::NewAnnot(CPDF_Annot* pAnnot, - CPDFSDK_PageView* pPage) { +CPDFSDK_Annot* CPDFSDK_XFAWidgetHandler::NewAnnot(CPDF_Annot* pAnnot, + CPDFSDK_PageView* pPage) { return nullptr; } -CPDFSDK_Annot* CPDFSDK_XFAAnnotHandler::NewAnnot(CXFA_FFWidget* pAnnot, - CPDFSDK_PageView* pPage) { +CPDFSDK_Annot* CPDFSDK_XFAWidgetHandler::NewAnnot(CXFA_FFWidget* pAnnot, + CPDFSDK_PageView* pPage) { CPDFSDK_Document* pSDKDoc = m_pApp->GetSDKDocument(); CPDFSDK_InterForm* pInterForm = pSDKDoc->GetInterForm(); CPDFSDK_XFAWidget* pWidget = new CPDFSDK_XFAWidget(pAnnot, pPage, pInterForm); @@ -47,11 +47,11 @@ CPDFSDK_Annot* CPDFSDK_XFAAnnotHandler::NewAnnot(CXFA_FFWidget* pAnnot, return pWidget; } -void CPDFSDK_XFAAnnotHandler::OnDraw(CPDFSDK_PageView* pPageView, - CPDFSDK_Annot* pAnnot, - CFX_RenderDevice* pDevice, - CFX_Matrix* pUser2Device, - uint32_t dwFlags) { +void CPDFSDK_XFAWidgetHandler::OnDraw(CPDFSDK_PageView* pPageView, + CPDFSDK_Annot* pAnnot, + CFX_RenderDevice* pDevice, + CFX_Matrix* pUser2Device, + uint32_t dwFlags) { ASSERT(pPageView); ASSERT(pAnnot); @@ -73,22 +73,22 @@ void CPDFSDK_XFAAnnotHandler::OnDraw(CPDFSDK_PageView* pPageView, // to do highlight and shadow } -void CPDFSDK_XFAAnnotHandler::OnDrawSleep(CPDFSDK_PageView* pPageView, - CPDFSDK_Annot* pAnnot, - CFX_RenderDevice* pDevice, - CFX_Matrix* pUser2Device, - const CFX_FloatRect& rcWindow, - uint32_t dwFlags) {} +void CPDFSDK_XFAWidgetHandler::OnDrawSleep(CPDFSDK_PageView* pPageView, + CPDFSDK_Annot* pAnnot, + CFX_RenderDevice* pDevice, + CFX_Matrix* pUser2Device, + const CFX_FloatRect& rcWindow, + uint32_t dwFlags) {} -void CPDFSDK_XFAAnnotHandler::OnCreate(CPDFSDK_Annot* pAnnot) {} +void CPDFSDK_XFAWidgetHandler::OnCreate(CPDFSDK_Annot* pAnnot) {} -void CPDFSDK_XFAAnnotHandler::OnLoad(CPDFSDK_Annot* pAnnot) {} +void CPDFSDK_XFAWidgetHandler::OnLoad(CPDFSDK_Annot* pAnnot) {} -void CPDFSDK_XFAAnnotHandler::OnDelete(CPDFSDK_Annot* pAnnot) {} +void CPDFSDK_XFAWidgetHandler::OnDelete(CPDFSDK_Annot* pAnnot) {} -void CPDFSDK_XFAAnnotHandler::OnRelease(CPDFSDK_Annot* pAnnot) {} +void CPDFSDK_XFAWidgetHandler::OnRelease(CPDFSDK_Annot* pAnnot) {} -void CPDFSDK_XFAAnnotHandler::ReleaseAnnot(CPDFSDK_Annot* pAnnot) { +void CPDFSDK_XFAWidgetHandler::ReleaseAnnot(CPDFSDK_Annot* pAnnot) { CPDFSDK_XFAWidget* pWidget = reinterpret_cast<CPDFSDK_XFAWidget*>(pAnnot); CPDFSDK_InterForm* pInterForm = pWidget->GetInterForm(); pInterForm->RemoveXFAMap(pWidget->GetXFAWidget()); @@ -96,10 +96,10 @@ void CPDFSDK_XFAAnnotHandler::ReleaseAnnot(CPDFSDK_Annot* pAnnot) { delete pWidget; } -void CPDFSDK_XFAAnnotHandler::DeleteAnnot(CPDFSDK_Annot* pAnnot) {} +void CPDFSDK_XFAWidgetHandler::DeleteAnnot(CPDFSDK_Annot* pAnnot) {} -CFX_FloatRect CPDFSDK_XFAAnnotHandler::GetViewBBox(CPDFSDK_PageView* pPageView, - CPDFSDK_Annot* pAnnot) { +CFX_FloatRect CPDFSDK_XFAWidgetHandler::GetViewBBox(CPDFSDK_PageView* pPageView, + CPDFSDK_Annot* pAnnot) { ASSERT(pAnnot); CFX_RectF rcBBox; @@ -119,9 +119,9 @@ CFX_FloatRect CPDFSDK_XFAAnnotHandler::GetViewBBox(CPDFSDK_PageView* pPageView, return rcWidget; } -FX_BOOL CPDFSDK_XFAAnnotHandler::HitTest(CPDFSDK_PageView* pPageView, - CPDFSDK_Annot* pAnnot, - const CFX_FloatPoint& point) { +FX_BOOL CPDFSDK_XFAWidgetHandler::HitTest(CPDFSDK_PageView* pPageView, + CPDFSDK_Annot* pAnnot, + const CFX_FloatPoint& point) { if (!pPageView || !pAnnot) return FALSE; @@ -146,18 +146,18 @@ FX_BOOL CPDFSDK_XFAAnnotHandler::HitTest(CPDFSDK_PageView* pPageView, return dwHitTest != FWL_WidgetHit::Unknown; } -void CPDFSDK_XFAAnnotHandler::OnMouseEnter(CPDFSDK_PageView* pPageView, - CPDFSDK_Annot* pAnnot, - uint32_t nFlag) { +void CPDFSDK_XFAWidgetHandler::OnMouseEnter(CPDFSDK_PageView* pPageView, + CPDFSDK_Annot* pAnnot, + uint32_t nFlag) { if (!pPageView || !pAnnot) return; CXFA_FFWidgetHandler* pWidgetHandler = GetXFAWidgetHandler(pAnnot); pWidgetHandler->OnMouseEnter(pAnnot->GetXFAWidget()); } -void CPDFSDK_XFAAnnotHandler::OnMouseExit(CPDFSDK_PageView* pPageView, - CPDFSDK_Annot* pAnnot, - uint32_t nFlag) { +void CPDFSDK_XFAWidgetHandler::OnMouseExit(CPDFSDK_PageView* pPageView, + CPDFSDK_Annot* pAnnot, + uint32_t nFlag) { if (!pPageView || !pAnnot) return; @@ -165,10 +165,10 @@ void CPDFSDK_XFAAnnotHandler::OnMouseExit(CPDFSDK_PageView* pPageView, pWidgetHandler->OnMouseExit(pAnnot->GetXFAWidget()); } -FX_BOOL CPDFSDK_XFAAnnotHandler::OnLButtonDown(CPDFSDK_PageView* pPageView, - CPDFSDK_Annot* pAnnot, - uint32_t nFlags, - const CFX_FloatPoint& point) { +FX_BOOL CPDFSDK_XFAWidgetHandler::OnLButtonDown(CPDFSDK_PageView* pPageView, + CPDFSDK_Annot* pAnnot, + uint32_t nFlags, + const CFX_FloatPoint& point) { if (!pPageView || !pAnnot) return FALSE; @@ -177,10 +177,10 @@ FX_BOOL CPDFSDK_XFAAnnotHandler::OnLButtonDown(CPDFSDK_PageView* pPageView, GetFWLFlags(nFlags), point.x, point.y); } -FX_BOOL CPDFSDK_XFAAnnotHandler::OnLButtonUp(CPDFSDK_PageView* pPageView, - CPDFSDK_Annot* pAnnot, - uint32_t nFlags, - const CFX_FloatPoint& point) { +FX_BOOL CPDFSDK_XFAWidgetHandler::OnLButtonUp(CPDFSDK_PageView* pPageView, + CPDFSDK_Annot* pAnnot, + uint32_t nFlags, + const CFX_FloatPoint& point) { if (!pPageView || !pAnnot) return FALSE; @@ -189,10 +189,10 @@ FX_BOOL CPDFSDK_XFAAnnotHandler::OnLButtonUp(CPDFSDK_PageView* pPageView, GetFWLFlags(nFlags), point.x, point.y); } -FX_BOOL CPDFSDK_XFAAnnotHandler::OnLButtonDblClk(CPDFSDK_PageView* pPageView, - CPDFSDK_Annot* pAnnot, - uint32_t nFlags, - const CFX_FloatPoint& point) { +FX_BOOL CPDFSDK_XFAWidgetHandler::OnLButtonDblClk(CPDFSDK_PageView* pPageView, + CPDFSDK_Annot* pAnnot, + uint32_t nFlags, + const CFX_FloatPoint& point) { if (!pPageView || !pAnnot) return FALSE; @@ -201,10 +201,10 @@ FX_BOOL CPDFSDK_XFAAnnotHandler::OnLButtonDblClk(CPDFSDK_PageView* pPageView, GetFWLFlags(nFlags), point.x, point.y); } -FX_BOOL CPDFSDK_XFAAnnotHandler::OnMouseMove(CPDFSDK_PageView* pPageView, - CPDFSDK_Annot* pAnnot, - uint32_t nFlags, - const CFX_FloatPoint& point) { +FX_BOOL CPDFSDK_XFAWidgetHandler::OnMouseMove(CPDFSDK_PageView* pPageView, + CPDFSDK_Annot* pAnnot, + uint32_t nFlags, + const CFX_FloatPoint& point) { if (!pPageView || !pAnnot) return FALSE; @@ -213,11 +213,11 @@ FX_BOOL CPDFSDK_XFAAnnotHandler::OnMouseMove(CPDFSDK_PageView* pPageView, GetFWLFlags(nFlags), point.x, point.y); } -FX_BOOL CPDFSDK_XFAAnnotHandler::OnMouseWheel(CPDFSDK_PageView* pPageView, - CPDFSDK_Annot* pAnnot, - uint32_t nFlags, - short zDelta, - const CFX_FloatPoint& point) { +FX_BOOL CPDFSDK_XFAWidgetHandler::OnMouseWheel(CPDFSDK_PageView* pPageView, + CPDFSDK_Annot* pAnnot, + uint32_t nFlags, + short zDelta, + const CFX_FloatPoint& point) { if (!pPageView || !pAnnot) return FALSE; @@ -226,10 +226,10 @@ FX_BOOL CPDFSDK_XFAAnnotHandler::OnMouseWheel(CPDFSDK_PageView* pPageView, pAnnot->GetXFAWidget(), GetFWLFlags(nFlags), zDelta, point.x, point.y); } -FX_BOOL CPDFSDK_XFAAnnotHandler::OnRButtonDown(CPDFSDK_PageView* pPageView, - CPDFSDK_Annot* pAnnot, - uint32_t nFlags, - const CFX_FloatPoint& point) { +FX_BOOL CPDFSDK_XFAWidgetHandler::OnRButtonDown(CPDFSDK_PageView* pPageView, + CPDFSDK_Annot* pAnnot, + uint32_t nFlags, + const CFX_FloatPoint& point) { if (!pPageView || !pAnnot) return FALSE; @@ -238,10 +238,10 @@ FX_BOOL CPDFSDK_XFAAnnotHandler::OnRButtonDown(CPDFSDK_PageView* pPageView, GetFWLFlags(nFlags), point.x, point.y); } -FX_BOOL CPDFSDK_XFAAnnotHandler::OnRButtonUp(CPDFSDK_PageView* pPageView, - CPDFSDK_Annot* pAnnot, - uint32_t nFlags, - const CFX_FloatPoint& point) { +FX_BOOL CPDFSDK_XFAWidgetHandler::OnRButtonUp(CPDFSDK_PageView* pPageView, + CPDFSDK_Annot* pAnnot, + uint32_t nFlags, + const CFX_FloatPoint& point) { if (!pPageView || !pAnnot) return FALSE; @@ -250,10 +250,10 @@ FX_BOOL CPDFSDK_XFAAnnotHandler::OnRButtonUp(CPDFSDK_PageView* pPageView, GetFWLFlags(nFlags), point.x, point.y); } -FX_BOOL CPDFSDK_XFAAnnotHandler::OnRButtonDblClk(CPDFSDK_PageView* pPageView, - CPDFSDK_Annot* pAnnot, - uint32_t nFlags, - const CFX_FloatPoint& point) { +FX_BOOL CPDFSDK_XFAWidgetHandler::OnRButtonDblClk(CPDFSDK_PageView* pPageView, + CPDFSDK_Annot* pAnnot, + uint32_t nFlags, + const CFX_FloatPoint& point) { if (!pPageView || !pAnnot) return FALSE; @@ -262,9 +262,9 @@ FX_BOOL CPDFSDK_XFAAnnotHandler::OnRButtonDblClk(CPDFSDK_PageView* pPageView, GetFWLFlags(nFlags), point.x, point.y); } -FX_BOOL CPDFSDK_XFAAnnotHandler::OnChar(CPDFSDK_Annot* pAnnot, - uint32_t nChar, - uint32_t nFlags) { +FX_BOOL CPDFSDK_XFAWidgetHandler::OnChar(CPDFSDK_Annot* pAnnot, + uint32_t nChar, + uint32_t nFlags) { if (!pAnnot) return FALSE; @@ -273,9 +273,9 @@ FX_BOOL CPDFSDK_XFAAnnotHandler::OnChar(CPDFSDK_Annot* pAnnot, GetFWLFlags(nFlags)); } -FX_BOOL CPDFSDK_XFAAnnotHandler::OnKeyDown(CPDFSDK_Annot* pAnnot, - int nKeyCode, - int nFlag) { +FX_BOOL CPDFSDK_XFAWidgetHandler::OnKeyDown(CPDFSDK_Annot* pAnnot, + int nKeyCode, + int nFlag) { if (!pAnnot) return FALSE; @@ -284,9 +284,9 @@ FX_BOOL CPDFSDK_XFAAnnotHandler::OnKeyDown(CPDFSDK_Annot* pAnnot, GetFWLFlags(nFlag)); } -FX_BOOL CPDFSDK_XFAAnnotHandler::OnKeyUp(CPDFSDK_Annot* pAnnot, - int nKeyCode, - int nFlag) { +FX_BOOL CPDFSDK_XFAWidgetHandler::OnKeyUp(CPDFSDK_Annot* pAnnot, + int nKeyCode, + int nFlag) { if (!pAnnot) return FALSE; @@ -295,22 +295,22 @@ FX_BOOL CPDFSDK_XFAAnnotHandler::OnKeyUp(CPDFSDK_Annot* pAnnot, GetFWLFlags(nFlag)); } -void CPDFSDK_XFAAnnotHandler::OnDeSelected(CPDFSDK_Annot* pAnnot) {} +void CPDFSDK_XFAWidgetHandler::OnDeSelected(CPDFSDK_Annot* pAnnot) {} -void CPDFSDK_XFAAnnotHandler::OnSelected(CPDFSDK_Annot* pAnnot) {} +void CPDFSDK_XFAWidgetHandler::OnSelected(CPDFSDK_Annot* pAnnot) {} -FX_BOOL CPDFSDK_XFAAnnotHandler::OnSetFocus(CPDFSDK_Annot* pAnnot, - uint32_t nFlag) { +FX_BOOL CPDFSDK_XFAWidgetHandler::OnSetFocus(CPDFSDK_Annot* pAnnot, + uint32_t nFlag) { return TRUE; } -FX_BOOL CPDFSDK_XFAAnnotHandler::OnKillFocus(CPDFSDK_Annot* pAnnot, - uint32_t nFlag) { +FX_BOOL CPDFSDK_XFAWidgetHandler::OnKillFocus(CPDFSDK_Annot* pAnnot, + uint32_t nFlag) { return TRUE; } -FX_BOOL CPDFSDK_XFAAnnotHandler::OnXFAChangedFocus(CPDFSDK_Annot* pOldAnnot, - CPDFSDK_Annot* pNewAnnot) { +FX_BOOL CPDFSDK_XFAWidgetHandler::OnXFAChangedFocus(CPDFSDK_Annot* pOldAnnot, + CPDFSDK_Annot* pNewAnnot) { CXFA_FFWidgetHandler* pWidgetHandler = nullptr; if (pOldAnnot) @@ -335,7 +335,7 @@ FX_BOOL CPDFSDK_XFAAnnotHandler::OnXFAChangedFocus(CPDFSDK_Annot* pOldAnnot, return TRUE; } -CXFA_FFWidgetHandler* CPDFSDK_XFAAnnotHandler::GetXFAWidgetHandler( +CXFA_FFWidgetHandler* CPDFSDK_XFAWidgetHandler::GetXFAWidgetHandler( CPDFSDK_Annot* pAnnot) { if (!pAnnot) return nullptr; @@ -366,7 +366,7 @@ const uint32_t FWL_KEYFLAG_LButton = (1 << 3); const uint32_t FWL_KEYFLAG_RButton = (1 << 4); const uint32_t FWL_KEYFLAG_MButton = (1 << 5); -uint32_t CPDFSDK_XFAAnnotHandler::GetFWLFlags(uint32_t dwFlag) { +uint32_t CPDFSDK_XFAWidgetHandler::GetFWLFlags(uint32_t dwFlag) { uint32_t dwFWLFlag = 0; if (dwFlag & FWL_EVENTFLAG_ControlKey) diff --git a/fpdfsdk/include/cpdfsdk_annothandlermgr.h b/fpdfsdk/include/cpdfsdk_annothandlermgr.h index 2ff35f83be..016135c0d0 100644 --- a/fpdfsdk/include/cpdfsdk_annothandlermgr.h +++ b/fpdfsdk/include/cpdfsdk_annothandlermgr.h @@ -19,12 +19,12 @@ class CPDF_Annot; class CPDFDoc_Environment; class CPDFSDK_Annot; class CPDFSDK_BAAnnotHandler; -class CPDFSDK_BFAnnotHandler; +class CPDFSDK_WidgetHandler; class CPDFSDK_PageView; class IPDFSDK_AnnotHandler; #ifdef PDF_ENABLE_XFA -class CPDFSDK_XFAAnnotHandler; +class CPDFSDK_XFAWidgetHandler; class CXFA_FFWidget; #endif // PDF_ENABLE_XFA @@ -113,9 +113,9 @@ class CPDFSDK_AnnotHandlerMgr { CPDFSDK_Annot* GetNextAnnot(CPDFSDK_Annot* pSDKAnnot, FX_BOOL bNext); std::unique_ptr<CPDFSDK_BAAnnotHandler> m_pBAAnnotHandler; - std::unique_ptr<CPDFSDK_BFAnnotHandler> m_pBFAnnotHandler; + std::unique_ptr<CPDFSDK_WidgetHandler> m_pWidgetHandler; #ifdef PDF_ENABLE_XFA - std::unique_ptr<CPDFSDK_XFAAnnotHandler> m_pXFAAnnotHandler; + std::unique_ptr<CPDFSDK_XFAWidgetHandler> m_pXFAWidgetHandler; #endif // PDF_ENABLE_XFA CPDFDoc_Environment* m_pApp; diff --git a/fpdfsdk/include/cpdfsdk_bfannothandler.h b/fpdfsdk/include/cpdfsdk_widgethandler.h index be7e79279d..0155967f3a 100644 --- a/fpdfsdk/include/cpdfsdk_bfannothandler.h +++ b/fpdfsdk/include/cpdfsdk_widgethandler.h @@ -4,8 +4,8 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#ifndef FPDFSDK_INCLUDE_CPDFSDK_BFANNOTHANDLER_H_ -#define FPDFSDK_INCLUDE_CPDFSDK_BFANNOTHANDLER_H_ +#ifndef FPDFSDK_INCLUDE_CPDFSDK_WIDGETHANDLER_H_ +#define FPDFSDK_INCLUDE_CPDFSDK_WIDGETHANDLER_H_ #include "core/fxcrt/include/fx_basic.h" #include "core/fxcrt/include/fx_coordinates.h" @@ -23,10 +23,10 @@ class CPDFSDK_PageView; class CXFA_FFWidget; #endif // PDF_ENABLE_XFA -class CPDFSDK_BFAnnotHandler : public IPDFSDK_AnnotHandler { +class CPDFSDK_WidgetHandler : public IPDFSDK_AnnotHandler { public: - explicit CPDFSDK_BFAnnotHandler(CPDFDoc_Environment* pApp); - ~CPDFSDK_BFAnnotHandler() override; + explicit CPDFSDK_WidgetHandler(CPDFDoc_Environment* pApp); + ~CPDFSDK_WidgetHandler() override; CFX_ByteString GetType() override; FX_BOOL CanAnswer(CPDFSDK_Annot* pAnnot) override; @@ -118,4 +118,4 @@ class CPDFSDK_BFAnnotHandler : public IPDFSDK_AnnotHandler { CFFL_IFormFiller* m_pFormFiller; }; -#endif // FPDFSDK_INCLUDE_CPDFSDK_BFANNOTHANDLER_H_ +#endif // FPDFSDK_INCLUDE_CPDFSDK_WIDGETHANDLER_H_ diff --git a/fpdfsdk/include/cpdfsdk_xfaannothandler.h b/fpdfsdk/include/cpdfsdk_xfawidgethandler.h index 2dd6f297a7..84e74b4a73 100644 --- a/fpdfsdk/include/cpdfsdk_xfaannothandler.h +++ b/fpdfsdk/include/cpdfsdk_xfawidgethandler.h @@ -4,8 +4,8 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#ifndef FPDFSDK_INCLUDE_CPDFSDK_XFAANNOTHANDLER_H_ -#define FPDFSDK_INCLUDE_CPDFSDK_XFAANNOTHANDLER_H_ +#ifndef FPDFSDK_INCLUDE_CPDFSDK_XFAWIDGETHANDLER_H_ +#define FPDFSDK_INCLUDE_CPDFSDK_XFAWIDGETHANDLER_H_ #include "core/fxcrt/include/fx_basic.h" #include "core/fxcrt/include/fx_coordinates.h" @@ -20,10 +20,10 @@ class CPDFSDK_PageView; class CXFA_FFWidget; class CXFA_FFWidgetHandler; -class CPDFSDK_XFAAnnotHandler : public IPDFSDK_AnnotHandler { +class CPDFSDK_XFAWidgetHandler : public IPDFSDK_AnnotHandler { public: - explicit CPDFSDK_XFAAnnotHandler(CPDFDoc_Environment* pApp); - ~CPDFSDK_XFAAnnotHandler() override; + explicit CPDFSDK_XFAWidgetHandler(CPDFDoc_Environment* pApp); + ~CPDFSDK_XFAWidgetHandler() override; CFX_ByteString GetType() override; FX_BOOL CanAnswer(CPDFSDK_Annot* pAnnot) override; @@ -110,4 +110,4 @@ class CPDFSDK_XFAAnnotHandler : public IPDFSDK_AnnotHandler { CPDFDoc_Environment* m_pApp; }; -#endif // FPDFSDK_INCLUDE_CPDFSDK_XFAANNOTHANDLER_H_ +#endif // FPDFSDK_INCLUDE_CPDFSDK_XFAWIDGETHANDLER_H_ |