summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-05-03 13:00:25 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-03 13:00:25 -0700
commit89fcde88f0c03da77d7fd83dece7726d66fd190e (patch)
tree509e8ee5c74480d1c60892c5868f0b888808f6b9 /fpdfsdk
parent5fc4f31285c3a88fc157fd2d9b9cf2eb5c7cabed (diff)
downloadpdfium-89fcde88f0c03da77d7fd83dece7726d66fd190e.tar.xz
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
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/DEPS1
-rw-r--r--fpdfsdk/fsdk_annothandler.cpp13
2 files changed, 4 insertions, 10 deletions
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,