From 89fcde88f0c03da77d7fd83dece7726d66fd190e Mon Sep 17 00:00:00 2001 From: dsinclair Date: Tue, 3 May 2016 13:00:25 -0700 Subject: Remove FWL_WGTHITTEST_* defines in favour of enum class. This Cl updates the FWL_WGTHITTEST_ defines to an enum class and fixes up any code issues. Review-Url: https://codereview.chromium.org/1948583002 --- fpdfsdk/DEPS | 1 + fpdfsdk/fsdk_annothandler.cpp | 13 +++---------- 2 files changed, 4 insertions(+), 10 deletions(-) (limited to 'fpdfsdk') diff --git a/fpdfsdk/DEPS b/fpdfsdk/DEPS index 096b556fdb..463991d905 100644 --- a/fpdfsdk/DEPS +++ b/fpdfsdk/DEPS @@ -11,6 +11,7 @@ include_rules = [ '+core/fxge/include', '+public', '+v8', + '+xfa/fwl/core/include', '+xfa/fxfa/include', '+xfa/fxgraphics/include', ] diff --git a/fpdfsdk/fsdk_annothandler.cpp b/fpdfsdk/fsdk_annothandler.cpp index 24f3d60d47..73701cfb4c 100644 --- a/fpdfsdk/fsdk_annothandler.cpp +++ b/fpdfsdk/fsdk_annothandler.cpp @@ -19,6 +19,7 @@ #include "fpdfsdk/fpdfxfa/include/fpdfxfa_doc.h" #include "fpdfsdk/fpdfxfa/include/fpdfxfa_page.h" #include "fpdfsdk/fpdfxfa/include/fpdfxfa_util.h" +#include "xfa/fwl/core/include/fwl_widgethit.h" #include "xfa/fxfa/include/xfa_ffwidget.h" #include "xfa/fxgraphics/include/cfx_graphics.h" #endif // PDF_ENABLE_XFA @@ -723,14 +724,6 @@ FX_BOOL CPDFSDK_BFAnnotHandler::HitTest(CPDFSDK_PageView* pPageView, } #ifdef PDF_ENABLE_XFA -#define FWL_WGTHITTEST_Unknown 0 -#define FWL_WGTHITTEST_Client 1 // arrow -#define FWL_WGTHITTEST_Titlebar 11 // caption -#define FWL_WGTHITTEST_HScrollBar 15 -#define FWL_WGTHITTEST_VScrollBar 16 -#define FWL_WGTHITTEST_Border 17 -#define FWL_WGTHITTEST_Edit 19 -#define FWL_WGTHITTEST_HyperLink 20 CPDFSDK_XFAAnnotHandler::CPDFSDK_XFAAnnotHandler(CPDFDoc_Environment* pApp) : m_pApp(pApp) {} @@ -825,9 +818,9 @@ FX_BOOL CPDFSDK_XFAAnnotHandler::HitTest(CPDFSDK_PageView* pPageView, if (!pWidgetHandler) return FALSE; - uint32_t dwHitTest = + FWL_WidgetHit dwHitTest = pWidgetHandler->OnHitTest(pAnnot->GetXFAWidget(), point.x, point.y); - return (dwHitTest != FWL_WGTHITTEST_Unknown); + return dwHitTest != FWL_WidgetHit::Unknown; } void CPDFSDK_XFAAnnotHandler::OnMouseEnter(CPDFSDK_PageView* pPageView, -- cgit v1.2.3