summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fsdk_annothandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/src/fsdk_annothandler.cpp')
-rw-r--r--fpdfsdk/src/fsdk_annothandler.cpp94
1 files changed, 45 insertions, 49 deletions
diff --git a/fpdfsdk/src/fsdk_annothandler.cpp b/fpdfsdk/src/fsdk_annothandler.cpp
index 28b8114ed6..661eaef1a1 100644
--- a/fpdfsdk/src/fsdk_annothandler.cpp
+++ b/fpdfsdk/src/fsdk_annothandler.cpp
@@ -156,7 +156,7 @@ FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnLButtonDown(
CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
FX_DWORD nFlags,
- const CFX_FloatPoint& point) {
+ const CPDF_Point& point) {
ASSERT(pAnnot);
if (IPDFSDK_AnnotHandler* pAnnotHandler = GetAnnotHandler(pAnnot)) {
@@ -164,11 +164,10 @@ FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnLButtonDown(
}
return FALSE;
}
-FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnLButtonUp(
- CPDFSDK_PageView* pPageView,
- CPDFSDK_Annot* pAnnot,
- FX_DWORD nFlags,
- const CFX_FloatPoint& point) {
+FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnLButtonUp(CPDFSDK_PageView* pPageView,
+ CPDFSDK_Annot* pAnnot,
+ FX_DWORD nFlags,
+ const CPDF_Point& point) {
ASSERT(pAnnot);
if (IPDFSDK_AnnotHandler* pAnnotHandler = GetAnnotHandler(pAnnot)) {
@@ -180,7 +179,7 @@ FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnLButtonDblClk(
CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
FX_DWORD nFlags,
- const CFX_FloatPoint& point) {
+ const CPDF_Point& point) {
ASSERT(pAnnot);
if (IPDFSDK_AnnotHandler* pAnnotHandler = GetAnnotHandler(pAnnot)) {
@@ -188,11 +187,10 @@ FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnLButtonDblClk(
}
return FALSE;
}
-FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnMouseMove(
- CPDFSDK_PageView* pPageView,
- CPDFSDK_Annot* pAnnot,
- FX_DWORD nFlags,
- const CFX_FloatPoint& point) {
+FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnMouseMove(CPDFSDK_PageView* pPageView,
+ CPDFSDK_Annot* pAnnot,
+ FX_DWORD nFlags,
+ const CPDF_Point& point) {
ASSERT(pAnnot);
if (IPDFSDK_AnnotHandler* pAnnotHandler = GetAnnotHandler(pAnnot)) {
@@ -200,12 +198,11 @@ FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnMouseMove(
}
return FALSE;
}
-FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnMouseWheel(
- CPDFSDK_PageView* pPageView,
- CPDFSDK_Annot* pAnnot,
- FX_DWORD nFlags,
- short zDelta,
- const CFX_FloatPoint& point) {
+FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnMouseWheel(CPDFSDK_PageView* pPageView,
+ CPDFSDK_Annot* pAnnot,
+ FX_DWORD nFlags,
+ short zDelta,
+ const CPDF_Point& point) {
ASSERT(pAnnot);
if (IPDFSDK_AnnotHandler* pAnnotHandler = GetAnnotHandler(pAnnot)) {
@@ -218,7 +215,7 @@ FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnRButtonDown(
CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
FX_DWORD nFlags,
- const CFX_FloatPoint& point) {
+ const CPDF_Point& point) {
ASSERT(pAnnot);
if (IPDFSDK_AnnotHandler* pAnnotHandler = GetAnnotHandler(pAnnot)) {
@@ -226,11 +223,10 @@ FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnRButtonDown(
}
return FALSE;
}
-FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnRButtonUp(
- CPDFSDK_PageView* pPageView,
- CPDFSDK_Annot* pAnnot,
- FX_DWORD nFlags,
- const CFX_FloatPoint& point) {
+FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnRButtonUp(CPDFSDK_PageView* pPageView,
+ CPDFSDK_Annot* pAnnot,
+ FX_DWORD nFlags,
+ const CPDF_Point& point) {
ASSERT(pAnnot);
if (IPDFSDK_AnnotHandler* pAnnotHandler = GetAnnotHandler(pAnnot)) {
@@ -335,7 +331,7 @@ FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnChangeFocus(
}
#endif // PDF_ENABLE_XFA
-CFX_FloatRect CPDFSDK_AnnotHandlerMgr::Annot_OnGetViewBBox(
+CPDF_Rect CPDFSDK_AnnotHandlerMgr::Annot_OnGetViewBBox(
CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot) {
ASSERT(pAnnot);
@@ -347,7 +343,7 @@ CFX_FloatRect CPDFSDK_AnnotHandlerMgr::Annot_OnGetViewBBox(
FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnHitTest(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
- const CFX_FloatPoint& point) {
+ const CPDF_Point& point) {
ASSERT(pAnnot);
if (IPDFSDK_AnnotHandler* pAnnotHandler = GetAnnotHandler(pAnnot)) {
if (pAnnotHandler->CanAnswer(pAnnot))
@@ -497,7 +493,7 @@ void CPDFSDK_BFAnnotHandler::OnMouseExit(CPDFSDK_PageView* pPageView,
FX_BOOL CPDFSDK_BFAnnotHandler::OnLButtonDown(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
FX_DWORD nFlags,
- const CFX_FloatPoint& point) {
+ const CPDF_Point& point) {
CFX_ByteString sSubType = pAnnot->GetSubType();
if (sSubType == BFFT_SIGNATURE) {
@@ -512,7 +508,7 @@ FX_BOOL CPDFSDK_BFAnnotHandler::OnLButtonDown(CPDFSDK_PageView* pPageView,
FX_BOOL CPDFSDK_BFAnnotHandler::OnLButtonUp(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
FX_DWORD nFlags,
- const CFX_FloatPoint& point) {
+ const CPDF_Point& point) {
CFX_ByteString sSubType = pAnnot->GetSubType();
if (sSubType == BFFT_SIGNATURE) {
@@ -527,7 +523,7 @@ FX_BOOL CPDFSDK_BFAnnotHandler::OnLButtonUp(CPDFSDK_PageView* pPageView,
FX_BOOL CPDFSDK_BFAnnotHandler::OnLButtonDblClk(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
FX_DWORD nFlags,
- const CFX_FloatPoint& point) {
+ const CPDF_Point& point) {
CFX_ByteString sSubType = pAnnot->GetSubType();
if (sSubType == BFFT_SIGNATURE) {
@@ -542,7 +538,7 @@ FX_BOOL CPDFSDK_BFAnnotHandler::OnLButtonDblClk(CPDFSDK_PageView* pPageView,
FX_BOOL CPDFSDK_BFAnnotHandler::OnMouseMove(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
FX_DWORD nFlags,
- const CFX_FloatPoint& point) {
+ const CPDF_Point& point) {
CFX_ByteString sSubType = pAnnot->GetSubType();
if (sSubType == BFFT_SIGNATURE) {
@@ -558,7 +554,7 @@ FX_BOOL CPDFSDK_BFAnnotHandler::OnMouseWheel(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
FX_DWORD nFlags,
short zDelta,
- const CFX_FloatPoint& point) {
+ const CPDF_Point& point) {
CFX_ByteString sSubType = pAnnot->GetSubType();
if (sSubType == BFFT_SIGNATURE) {
@@ -574,7 +570,7 @@ FX_BOOL CPDFSDK_BFAnnotHandler::OnMouseWheel(CPDFSDK_PageView* pPageView,
FX_BOOL CPDFSDK_BFAnnotHandler::OnRButtonDown(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
FX_DWORD nFlags,
- const CFX_FloatPoint& point) {
+ const CPDF_Point& point) {
CFX_ByteString sSubType = pAnnot->GetSubType();
if (sSubType == BFFT_SIGNATURE) {
@@ -588,7 +584,7 @@ FX_BOOL CPDFSDK_BFAnnotHandler::OnRButtonDown(CPDFSDK_PageView* pPageView,
FX_BOOL CPDFSDK_BFAnnotHandler::OnRButtonUp(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
FX_DWORD nFlags,
- const CFX_FloatPoint& point) {
+ const CPDF_Point& point) {
CFX_ByteString sSubType = pAnnot->GetSubType();
if (sSubType == BFFT_SIGNATURE) {
@@ -698,8 +694,8 @@ FX_BOOL CPDFSDK_BFAnnotHandler::OnKillFocus(CPDFSDK_Annot* pAnnot,
return TRUE;
}
-CFX_FloatRect CPDFSDK_BFAnnotHandler::GetViewBBox(CPDFSDK_PageView* pPageView,
- CPDFSDK_Annot* pAnnot) {
+CPDF_Rect CPDFSDK_BFAnnotHandler::GetViewBBox(CPDFSDK_PageView* pPageView,
+ CPDFSDK_Annot* pAnnot) {
CFX_ByteString sSubType = pAnnot->GetSubType();
if (sSubType == BFFT_SIGNATURE) {
@@ -708,16 +704,16 @@ CFX_FloatRect CPDFSDK_BFAnnotHandler::GetViewBBox(CPDFSDK_PageView* pPageView,
return m_pFormFiller->GetViewBBox(pPageView, pAnnot);
}
- return CFX_FloatRect(0, 0, 0, 0);
+ return CPDF_Rect(0, 0, 0, 0);
}
FX_BOOL CPDFSDK_BFAnnotHandler::HitTest(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
- const CFX_FloatPoint& point) {
+ const CPDF_Point& point) {
ASSERT(pPageView);
ASSERT(pAnnot);
- CFX_FloatRect rect = GetViewBBox(pPageView, pAnnot);
+ CPDF_Rect rect = GetViewBBox(pPageView, pAnnot);
return rect.Contains(point.x, point.y);
}
@@ -781,8 +777,8 @@ void CPDFSDK_XFAAnnotHandler::ReleaseAnnot(CPDFSDK_Annot* pAnnot) {
delete pWidget;
}
-CFX_FloatRect CPDFSDK_XFAAnnotHandler::GetViewBBox(CPDFSDK_PageView* pPageView,
- CPDFSDK_Annot* pAnnot) {
+CPDF_Rect CPDFSDK_XFAAnnotHandler::GetViewBBox(CPDFSDK_PageView* pPageView,
+ CPDFSDK_Annot* pAnnot) {
ASSERT(pAnnot);
IXFA_WidgetHandler* pWidgetHandler = GetXFAWidgetHandler(pAnnot);
@@ -807,7 +803,7 @@ CFX_FloatRect CPDFSDK_XFAAnnotHandler::GetViewBBox(CPDFSDK_PageView* pPageView,
FX_BOOL CPDFSDK_XFAAnnotHandler::HitTest(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
- const CFX_FloatPoint& point) {
+ const CPDF_Point& point) {
if (!pPageView || !pAnnot)
return FALSE;
@@ -854,7 +850,7 @@ void CPDFSDK_XFAAnnotHandler::OnMouseExit(CPDFSDK_PageView* pPageView,
FX_BOOL CPDFSDK_XFAAnnotHandler::OnLButtonDown(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
FX_DWORD nFlags,
- const CFX_FloatPoint& point) {
+ const CPDF_Point& point) {
if (!pPageView || !pAnnot)
return FALSE;
@@ -866,7 +862,7 @@ FX_BOOL CPDFSDK_XFAAnnotHandler::OnLButtonDown(CPDFSDK_PageView* pPageView,
FX_BOOL CPDFSDK_XFAAnnotHandler::OnLButtonUp(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
FX_DWORD nFlags,
- const CFX_FloatPoint& point) {
+ const CPDF_Point& point) {
if (!pPageView || !pAnnot)
return FALSE;
@@ -878,7 +874,7 @@ FX_BOOL CPDFSDK_XFAAnnotHandler::OnLButtonUp(CPDFSDK_PageView* pPageView,
FX_BOOL CPDFSDK_XFAAnnotHandler::OnLButtonDblClk(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
FX_DWORD nFlags,
- const CFX_FloatPoint& point) {
+ const CPDF_Point& point) {
if (!pPageView || !pAnnot)
return FALSE;
@@ -890,7 +886,7 @@ FX_BOOL CPDFSDK_XFAAnnotHandler::OnLButtonDblClk(CPDFSDK_PageView* pPageView,
FX_BOOL CPDFSDK_XFAAnnotHandler::OnMouseMove(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
FX_DWORD nFlags,
- const CFX_FloatPoint& point) {
+ const CPDF_Point& point) {
if (!pPageView || !pAnnot)
return FALSE;
@@ -903,7 +899,7 @@ FX_BOOL CPDFSDK_XFAAnnotHandler::OnMouseWheel(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
FX_DWORD nFlags,
short zDelta,
- const CFX_FloatPoint& point) {
+ const CPDF_Point& point) {
if (!pPageView || !pAnnot)
return FALSE;
@@ -915,7 +911,7 @@ FX_BOOL CPDFSDK_XFAAnnotHandler::OnMouseWheel(CPDFSDK_PageView* pPageView,
FX_BOOL CPDFSDK_XFAAnnotHandler::OnRButtonDown(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
FX_DWORD nFlags,
- const CFX_FloatPoint& point) {
+ const CPDF_Point& point) {
if (!pPageView || !pAnnot)
return FALSE;
@@ -927,7 +923,7 @@ FX_BOOL CPDFSDK_XFAAnnotHandler::OnRButtonDown(CPDFSDK_PageView* pPageView,
FX_BOOL CPDFSDK_XFAAnnotHandler::OnRButtonUp(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
FX_DWORD nFlags,
- const CFX_FloatPoint& point) {
+ const CPDF_Point& point) {
if (!pPageView || !pAnnot)
return FALSE;
@@ -939,7 +935,7 @@ FX_BOOL CPDFSDK_XFAAnnotHandler::OnRButtonUp(CPDFSDK_PageView* pPageView,
FX_BOOL CPDFSDK_XFAAnnotHandler::OnRButtonDblClk(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
FX_DWORD nFlags,
- const CFX_FloatPoint& point) {
+ const CPDF_Point& point) {
if (!pPageView || !pAnnot)
return FALSE;