From 5060b2e37b82a2e2907e11685ed2998d06d8b452 Mon Sep 17 00:00:00 2001 From: tsepez Date: Tue, 27 Sep 2016 14:06:43 -0700 Subject: De-virtualize many CFFL_InteractiveFormFiller methods. Apart from the IPWL_Filler_Notify overrides, none of these are overriden because there are no subclasses. Review-Url: https://codereview.chromium.org/2372263002 --- fpdfsdk/formfiller/cffl_interactiveformfiller.h | 113 +++++++++++------------- 1 file changed, 54 insertions(+), 59 deletions(-) (limited to 'fpdfsdk/formfiller') diff --git a/fpdfsdk/formfiller/cffl_interactiveformfiller.h b/fpdfsdk/formfiller/cffl_interactiveformfiller.h index 1594cfda17..dc2cb4174e 100644 --- a/fpdfsdk/formfiller/cffl_interactiveformfiller.h +++ b/fpdfsdk/formfiller/cffl_interactiveformfiller.h @@ -24,66 +24,61 @@ class CFFL_InteractiveFormFiller : public IPWL_Filler_Notify { explicit CFFL_InteractiveFormFiller(CPDFSDK_Environment* pEnv); ~CFFL_InteractiveFormFiller() override; - virtual FX_BOOL Annot_HitTest(CPDFSDK_PageView* pPageView, - CPDFSDK_Annot* pAnnot, - CFX_FloatPoint point); - virtual FX_RECT GetViewBBox(CPDFSDK_PageView* pPageView, - CPDFSDK_Annot* pAnnot); - virtual void OnDraw(CPDFSDK_PageView* pPageView, + FX_BOOL Annot_HitTest(CPDFSDK_PageView* pPageView, + CPDFSDK_Annot* pAnnot, + CFX_FloatPoint point); + FX_RECT GetViewBBox(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot); + void OnDraw(CPDFSDK_PageView* pPageView, + CPDFSDK_Annot* pAnnot, + CFX_RenderDevice* pDevice, + CFX_Matrix* pUser2Device); + + void OnCreate(CPDFSDK_Annot* pAnnot); + void OnLoad(CPDFSDK_Annot* pAnnot); + void OnDelete(CPDFSDK_Annot* pAnnot); + + void OnMouseEnter(CPDFSDK_PageView* pPageView, + CPDFSDK_Annot* pAnnot, + uint32_t nFlag); + void OnMouseExit(CPDFSDK_PageView* pPageView, + CPDFSDK_Annot* pAnnot, + uint32_t nFlag); + + FX_BOOL OnLButtonDown(CPDFSDK_PageView* pPageView, + CPDFSDK_Annot* pAnnot, + uint32_t nFlags, + const CFX_FloatPoint& point); + FX_BOOL OnLButtonUp(CPDFSDK_PageView* pPageView, + CPDFSDK_Annot* pAnnot, + uint32_t nFlags, + const CFX_FloatPoint& point); + FX_BOOL OnLButtonDblClk(CPDFSDK_PageView* pPageView, + CPDFSDK_Annot* pAnnot, + uint32_t nFlags, + const CFX_FloatPoint& point); + FX_BOOL OnMouseMove(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, - CFX_RenderDevice* pDevice, - CFX_Matrix* pUser2Device); - - virtual void OnCreate(CPDFSDK_Annot* pAnnot); - virtual void OnLoad(CPDFSDK_Annot* pAnnot); - virtual void OnDelete(CPDFSDK_Annot* pAnnot); - - virtual void OnMouseEnter(CPDFSDK_PageView* pPageView, - CPDFSDK_Annot* pAnnot, - uint32_t nFlag); - virtual void OnMouseExit(CPDFSDK_PageView* pPageView, - CPDFSDK_Annot* pAnnot, - uint32_t nFlag); - - virtual FX_BOOL OnLButtonDown(CPDFSDK_PageView* pPageView, - CPDFSDK_Annot* pAnnot, - uint32_t nFlags, - const CFX_FloatPoint& point); - virtual FX_BOOL OnLButtonUp(CPDFSDK_PageView* pPageView, - CPDFSDK_Annot* pAnnot, - uint32_t nFlags, - const CFX_FloatPoint& point); - virtual FX_BOOL OnLButtonDblClk(CPDFSDK_PageView* pPageView, - CPDFSDK_Annot* pAnnot, - uint32_t nFlags, - const CFX_FloatPoint& point); - virtual FX_BOOL OnMouseMove(CPDFSDK_PageView* pPageView, - CPDFSDK_Annot* pAnnot, - uint32_t nFlags, - const CFX_FloatPoint& point); - virtual FX_BOOL OnMouseWheel(CPDFSDK_PageView* pPageView, - CPDFSDK_Annot* pAnnot, - uint32_t nFlags, - short zDelta, - const CFX_FloatPoint& point); - virtual FX_BOOL OnRButtonDown(CPDFSDK_PageView* pPageView, - CPDFSDK_Annot* pAnnot, - uint32_t nFlags, - const CFX_FloatPoint& point); - virtual FX_BOOL OnRButtonUp(CPDFSDK_PageView* pPageView, - CPDFSDK_Annot* pAnnot, - uint32_t nFlags, - const CFX_FloatPoint& point); - - virtual FX_BOOL OnKeyDown(CPDFSDK_Annot* pAnnot, - uint32_t nKeyCode, - uint32_t nFlags); - virtual FX_BOOL OnChar(CPDFSDK_Annot* pAnnot, - uint32_t nChar, - uint32_t nFlags); - - virtual FX_BOOL OnSetFocus(CPDFSDK_Annot* pAnnot, uint32_t nFlag); - virtual FX_BOOL OnKillFocus(CPDFSDK_Annot* pAnnot, uint32_t nFlag); + uint32_t nFlags, + const CFX_FloatPoint& point); + FX_BOOL OnMouseWheel(CPDFSDK_PageView* pPageView, + CPDFSDK_Annot* pAnnot, + uint32_t nFlags, + short zDelta, + const CFX_FloatPoint& point); + FX_BOOL OnRButtonDown(CPDFSDK_PageView* pPageView, + CPDFSDK_Annot* pAnnot, + uint32_t nFlags, + const CFX_FloatPoint& point); + FX_BOOL OnRButtonUp(CPDFSDK_PageView* pPageView, + CPDFSDK_Annot* pAnnot, + uint32_t nFlags, + const CFX_FloatPoint& point); + + FX_BOOL OnKeyDown(CPDFSDK_Annot* pAnnot, uint32_t nKeyCode, uint32_t nFlags); + FX_BOOL OnChar(CPDFSDK_Annot* pAnnot, uint32_t nChar, uint32_t nFlags); + + FX_BOOL OnSetFocus(CPDFSDK_Annot* pAnnot, uint32_t nFlag); + FX_BOOL OnKillFocus(CPDFSDK_Annot* pAnnot, uint32_t nFlag); CFFL_FormFiller* GetFormFiller(CPDFSDK_Annot* pAnnot, FX_BOOL bRegister); void RemoveFormFiller(CPDFSDK_Annot* pAnnot); -- cgit v1.2.3