summaryrefslogtreecommitdiff
path: root/fpdfsdk/formfiller
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/formfiller')
-rw-r--r--fpdfsdk/formfiller/cffl_checkbox.cpp2
-rw-r--r--fpdfsdk/formfiller/cffl_checkbox.h2
-rw-r--r--fpdfsdk/formfiller/cffl_formfiller.cpp35
-rw-r--r--fpdfsdk/formfiller/cffl_formfiller.h30
-rw-r--r--fpdfsdk/formfiller/cffl_interactiveformfiller.cpp16
-rw-r--r--fpdfsdk/formfiller/cffl_interactiveformfiller.h16
-rw-r--r--fpdfsdk/formfiller/cffl_radiobutton.cpp2
-rw-r--r--fpdfsdk/formfiller/cffl_radiobutton.h2
8 files changed, 51 insertions, 54 deletions
diff --git a/fpdfsdk/formfiller/cffl_checkbox.cpp b/fpdfsdk/formfiller/cffl_checkbox.cpp
index ffa3a032cf..c233c136c1 100644
--- a/fpdfsdk/formfiller/cffl_checkbox.cpp
+++ b/fpdfsdk/formfiller/cffl_checkbox.cpp
@@ -73,7 +73,7 @@ bool CFFL_CheckBox::OnChar(CPDFSDK_Annot* pAnnot,
bool CFFL_CheckBox::OnLButtonUp(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
uint32_t nFlags,
- const CFX_FloatPoint& point) {
+ const CFX_PointF& point) {
CFFL_Button::OnLButtonUp(pPageView, pAnnot, nFlags, point);
if (IsValid()) {
diff --git a/fpdfsdk/formfiller/cffl_checkbox.h b/fpdfsdk/formfiller/cffl_checkbox.h
index 65dba29f2e..79ddc847cc 100644
--- a/fpdfsdk/formfiller/cffl_checkbox.h
+++ b/fpdfsdk/formfiller/cffl_checkbox.h
@@ -24,7 +24,7 @@ class CFFL_CheckBox : public CFFL_Button {
bool OnLButtonUp(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
uint32_t nFlags,
- const CFX_FloatPoint& point) override;
+ const CFX_PointF& point) override;
bool IsDataChanged(CPDFSDK_PageView* pPageView) override;
void SaveData(CPDFSDK_PageView* pPageView) override;
};
diff --git a/fpdfsdk/formfiller/cffl_formfiller.cpp b/fpdfsdk/formfiller/cffl_formfiller.cpp
index 9ccca2b04a..3b06c30a28 100644
--- a/fpdfsdk/formfiller/cffl_formfiller.cpp
+++ b/fpdfsdk/formfiller/cffl_formfiller.cpp
@@ -119,7 +119,7 @@ void CFFL_FormFiller::OnMouseExit(CPDFSDK_PageView* pPageView,
bool CFFL_FormFiller::OnLButtonDown(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
uint32_t nFlags,
- const CFX_FloatPoint& point) {
+ const CFX_PointF& point) {
if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, true)) {
m_bValid = true;
FX_RECT rect = GetViewBBox(pPageView, pAnnot);
@@ -137,7 +137,7 @@ bool CFFL_FormFiller::OnLButtonDown(CPDFSDK_PageView* pPageView,
bool CFFL_FormFiller::OnLButtonUp(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
uint32_t nFlags,
- const CFX_FloatPoint& point) {
+ const CFX_PointF& point) {
CPWL_Wnd* pWnd = GetPDFWindow(pPageView, false);
if (!pWnd)
return false;
@@ -151,7 +151,7 @@ bool CFFL_FormFiller::OnLButtonUp(CPDFSDK_PageView* pPageView,
bool CFFL_FormFiller::OnLButtonDblClk(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
uint32_t nFlags,
- const CFX_FloatPoint& point) {
+ const CFX_PointF& point) {
CPWL_Wnd* pWnd = GetPDFWindow(pPageView, false);
if (!pWnd)
return false;
@@ -163,7 +163,7 @@ bool CFFL_FormFiller::OnLButtonDblClk(CPDFSDK_PageView* pPageView,
bool CFFL_FormFiller::OnMouseMove(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
uint32_t nFlags,
- const CFX_FloatPoint& point) {
+ const CFX_PointF& point) {
if (m_ptOldPos != point)
m_ptOldPos = point;
@@ -179,7 +179,7 @@ bool CFFL_FormFiller::OnMouseWheel(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
uint32_t nFlags,
short zDelta,
- const CFX_FloatPoint& point) {
+ const CFX_PointF& point) {
if (!IsValid())
return false;
@@ -190,7 +190,7 @@ bool CFFL_FormFiller::OnMouseWheel(CPDFSDK_PageView* pPageView,
bool CFFL_FormFiller::OnRButtonDown(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
uint32_t nFlags,
- const CFX_FloatPoint& point) {
+ const CFX_PointF& point) {
CPWL_Wnd* pWnd = GetPDFWindow(pPageView, true);
if (!pWnd)
return false;
@@ -202,7 +202,7 @@ bool CFFL_FormFiller::OnRButtonDown(CPDFSDK_PageView* pPageView,
bool CFFL_FormFiller::OnRButtonUp(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
uint32_t nFlags,
- const CFX_FloatPoint& point) {
+ const CFX_PointF& point) {
CPWL_Wnd* pWnd = GetPDFWindow(pPageView, false);
if (!pWnd)
return false;
@@ -483,25 +483,25 @@ CFX_FloatRect CFFL_FormFiller::PWLtoFFL(const CFX_FloatRect& rect) {
return temp;
}
-CFX_FloatPoint CFFL_FormFiller::FFLtoPWL(const CFX_FloatPoint& point) {
+CFX_PointF CFFL_FormFiller::FFLtoPWL(const CFX_PointF& point) {
CFX_Matrix mt;
mt.SetReverse(GetCurMatrix());
- CFX_FloatPoint pt = point;
+ CFX_PointF pt = point;
mt.TransformPoint(pt.x, pt.y);
return pt;
}
-CFX_FloatPoint CFFL_FormFiller::PWLtoFFL(const CFX_FloatPoint& point) {
+CFX_PointF CFFL_FormFiller::PWLtoFFL(const CFX_PointF& point) {
CFX_Matrix mt = GetCurMatrix();
- CFX_FloatPoint pt = point;
+ CFX_PointF pt = point;
mt.TransformPoint(pt.x, pt.y);
return pt;
}
-CFX_FloatPoint CFFL_FormFiller::WndtoPWL(CPDFSDK_PageView* pPageView,
- const CFX_FloatPoint& pt) {
+CFX_PointF CFFL_FormFiller::WndtoPWL(CPDFSDK_PageView* pPageView,
+ const CFX_PointF& pt) {
return FFLtoPWL(pt);
}
@@ -633,9 +633,9 @@ void CFFL_Button::OnMouseExit(CPDFSDK_PageView* pPageView,
bool CFFL_Button::OnLButtonDown(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
uint32_t nFlags,
- const CFX_FloatPoint& point) {
+ const CFX_PointF& point) {
CFX_FloatRect rcAnnot = pAnnot->GetRect();
- if (!rcAnnot.Contains(point.x, point.y))
+ if (!rcAnnot.Contains(point))
return false;
m_bMouseDown = true;
@@ -648,7 +648,7 @@ bool CFFL_Button::OnLButtonDown(CPDFSDK_PageView* pPageView,
bool CFFL_Button::OnLButtonUp(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
uint32_t nFlags,
- const CFX_FloatPoint& point) {
+ const CFX_PointF& point) {
CFX_FloatRect rcAnnot = pAnnot->GetRect();
if (!rcAnnot.Contains(point.x, point.y))
return false;
@@ -664,9 +664,8 @@ bool CFFL_Button::OnLButtonUp(CPDFSDK_PageView* pPageView,
bool CFFL_Button::OnMouseMove(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
uint32_t nFlags,
- const CFX_FloatPoint& point) {
+ const CFX_PointF& point) {
ASSERT(m_pFormFillEnv);
-
return true;
}
diff --git a/fpdfsdk/formfiller/cffl_formfiller.h b/fpdfsdk/formfiller/cffl_formfiller.h
index cf1aaf7205..7462b40e97 100644
--- a/fpdfsdk/formfiller/cffl_formfiller.h
+++ b/fpdfsdk/formfiller/cffl_formfiller.h
@@ -41,32 +41,32 @@ class CFFL_FormFiller : public IPWL_Provider, public CPWL_TimerHandler {
virtual bool OnLButtonDown(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
uint32_t nFlags,
- const CFX_FloatPoint& point);
+ const CFX_PointF& point);
virtual bool OnLButtonUp(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
uint32_t nFlags,
- const CFX_FloatPoint& point);
+ const CFX_PointF& point);
virtual bool OnLButtonDblClk(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
uint32_t nFlags,
- const CFX_FloatPoint& point);
+ const CFX_PointF& point);
virtual bool OnMouseMove(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
uint32_t nFlags,
- const CFX_FloatPoint& point);
+ const CFX_PointF& point);
virtual bool OnMouseWheel(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
uint32_t nFlags,
short zDelta,
- const CFX_FloatPoint& point);
+ const CFX_PointF& point);
virtual bool OnRButtonDown(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
uint32_t nFlags,
- const CFX_FloatPoint& point);
+ const CFX_PointF& point);
virtual bool OnRButtonUp(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
uint32_t nFlags,
- const CFX_FloatPoint& point);
+ const CFX_PointF& point);
virtual bool OnKeyDown(CPDFSDK_Annot* pAnnot,
uint32_t nKeyCode,
@@ -104,11 +104,10 @@ class CFFL_FormFiller : public IPWL_Provider, public CPWL_TimerHandler {
CFX_FloatRect FFLtoPWL(const CFX_FloatRect& rect);
CFX_FloatRect PWLtoFFL(const CFX_FloatRect& rect);
- CFX_FloatPoint FFLtoPWL(const CFX_FloatPoint& point);
- CFX_FloatPoint PWLtoFFL(const CFX_FloatPoint& point);
+ CFX_PointF FFLtoPWL(const CFX_PointF& point);
+ CFX_PointF PWLtoFFL(const CFX_PointF& point);
- CFX_FloatPoint WndtoPWL(CPDFSDK_PageView* pPageView,
- const CFX_FloatPoint& pt);
+ CFX_PointF WndtoPWL(CPDFSDK_PageView* pPageView, const CFX_PointF& pt);
CFX_FloatRect FFLtoWnd(CPDFSDK_PageView* pPageView,
const CFX_FloatRect& rect);
@@ -159,10 +158,9 @@ class CFFL_FormFiller : public IPWL_Provider, public CPWL_TimerHandler {
CPDFSDK_FormFillEnvironment* m_pFormFillEnv;
CPDFSDK_Widget* m_pWidget;
CPDFSDK_Annot* m_pAnnot;
-
bool m_bValid;
CFFL_PageView2PDFWindow m_Maps;
- CFX_FloatPoint m_ptOldPos;
+ CFX_PointF m_ptOldPos;
};
class CFFL_Button : public CFFL_FormFiller {
@@ -178,15 +176,15 @@ class CFFL_Button : public CFFL_FormFiller {
bool OnLButtonDown(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
uint32_t nFlags,
- const CFX_FloatPoint& point) override;
+ const CFX_PointF& point) override;
bool OnLButtonUp(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
uint32_t nFlags,
- const CFX_FloatPoint& point) override;
+ const CFX_PointF& point) override;
bool OnMouseMove(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
uint32_t nFlags,
- const CFX_FloatPoint& point) override;
+ const CFX_PointF& point) override;
void OnDraw(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
CFX_RenderDevice* pDevice,
diff --git a/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp b/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
index 82b9549a1c..a8368f4352 100644
--- a/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
+++ b/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
@@ -34,7 +34,7 @@ CFFL_InteractiveFormFiller::~CFFL_InteractiveFormFiller() {}
bool CFFL_InteractiveFormFiller::Annot_HitTest(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
- CFX_FloatPoint point) {
+ const CFX_PointF& point) {
CFX_FloatRect rc = pAnnot->GetRect();
return rc.Contains(point.x, point.y);
}
@@ -179,7 +179,7 @@ bool CFFL_InteractiveFormFiller::OnLButtonDown(
CPDFSDK_PageView* pPageView,
CPDFSDK_Annot::ObservedPtr* pAnnot,
uint32_t nFlags,
- const CFX_FloatPoint& point) {
+ const CFX_PointF& point) {
ASSERT((*pAnnot)->GetPDFAnnot()->GetSubtype() == CPDF_Annot::Subtype::WIDGET);
if (!m_bNotifying) {
CPDFSDK_Widget* pWidget = static_cast<CPDFSDK_Widget*>(pAnnot->Get());
@@ -220,7 +220,7 @@ bool CFFL_InteractiveFormFiller::OnLButtonDown(
bool CFFL_InteractiveFormFiller::OnLButtonUp(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot::ObservedPtr* pAnnot,
uint32_t nFlags,
- const CFX_FloatPoint& point) {
+ const CFX_PointF& point) {
ASSERT((*pAnnot)->GetPDFAnnot()->GetSubtype() == CPDF_Annot::Subtype::WIDGET);
CPDFSDK_Widget* pWidget = static_cast<CPDFSDK_Widget*>(pAnnot->Get());
@@ -294,7 +294,7 @@ bool CFFL_InteractiveFormFiller::OnLButtonDblClk(
CPDFSDK_PageView* pPageView,
CPDFSDK_Annot::ObservedPtr* pAnnot,
uint32_t nFlags,
- const CFX_FloatPoint& point) {
+ const CFX_PointF& point) {
ASSERT((*pAnnot)->GetPDFAnnot()->GetSubtype() == CPDF_Annot::Subtype::WIDGET);
CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot->Get(), false);
return pFormFiller &&
@@ -304,7 +304,7 @@ bool CFFL_InteractiveFormFiller::OnLButtonDblClk(
bool CFFL_InteractiveFormFiller::OnMouseMove(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot::ObservedPtr* pAnnot,
uint32_t nFlags,
- const CFX_FloatPoint& point) {
+ const CFX_PointF& point) {
ASSERT((*pAnnot)->GetPDFAnnot()->GetSubtype() == CPDF_Annot::Subtype::WIDGET);
CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot->Get(), true);
return pFormFiller &&
@@ -316,7 +316,7 @@ bool CFFL_InteractiveFormFiller::OnMouseWheel(
CPDFSDK_Annot::ObservedPtr* pAnnot,
uint32_t nFlags,
short zDelta,
- const CFX_FloatPoint& point) {
+ const CFX_PointF& point) {
ASSERT((*pAnnot)->GetPDFAnnot()->GetSubtype() == CPDF_Annot::Subtype::WIDGET);
CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot->Get(), false);
return pFormFiller &&
@@ -328,7 +328,7 @@ bool CFFL_InteractiveFormFiller::OnRButtonDown(
CPDFSDK_PageView* pPageView,
CPDFSDK_Annot::ObservedPtr* pAnnot,
uint32_t nFlags,
- const CFX_FloatPoint& point) {
+ const CFX_PointF& point) {
ASSERT((*pAnnot)->GetPDFAnnot()->GetSubtype() == CPDF_Annot::Subtype::WIDGET);
CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot->Get(), false);
return pFormFiller &&
@@ -338,7 +338,7 @@ bool CFFL_InteractiveFormFiller::OnRButtonDown(
bool CFFL_InteractiveFormFiller::OnRButtonUp(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot::ObservedPtr* pAnnot,
uint32_t nFlags,
- const CFX_FloatPoint& point) {
+ const CFX_PointF& point) {
ASSERT((*pAnnot)->GetPDFAnnot()->GetSubtype() == CPDF_Annot::Subtype::WIDGET);
CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot->Get(), false);
return pFormFiller &&
diff --git a/fpdfsdk/formfiller/cffl_interactiveformfiller.h b/fpdfsdk/formfiller/cffl_interactiveformfiller.h
index e81d3c88d0..90fd98c0e8 100644
--- a/fpdfsdk/formfiller/cffl_interactiveformfiller.h
+++ b/fpdfsdk/formfiller/cffl_interactiveformfiller.h
@@ -27,7 +27,7 @@ class CFFL_InteractiveFormFiller : public IPWL_Filler_Notify {
bool Annot_HitTest(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
- CFX_FloatPoint point);
+ const CFX_PointF& point);
FX_RECT GetViewBBox(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot);
void OnDraw(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
@@ -45,32 +45,32 @@ class CFFL_InteractiveFormFiller : public IPWL_Filler_Notify {
bool OnLButtonDown(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot::ObservedPtr* pAnnot,
uint32_t nFlags,
- const CFX_FloatPoint& point);
+ const CFX_PointF& point);
bool OnLButtonUp(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot::ObservedPtr* pAnnot,
uint32_t nFlags,
- const CFX_FloatPoint& point);
+ const CFX_PointF& point);
bool OnLButtonDblClk(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot::ObservedPtr* pAnnot,
uint32_t nFlags,
- const CFX_FloatPoint& point);
+ const CFX_PointF& point);
bool OnMouseMove(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot::ObservedPtr* pAnnot,
uint32_t nFlags,
- const CFX_FloatPoint& point);
+ const CFX_PointF& point);
bool OnMouseWheel(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot::ObservedPtr* pAnnot,
uint32_t nFlags,
short zDelta,
- const CFX_FloatPoint& point);
+ const CFX_PointF& point);
bool OnRButtonDown(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot::ObservedPtr* pAnnot,
uint32_t nFlags,
- const CFX_FloatPoint& point);
+ const CFX_PointF& point);
bool OnRButtonUp(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot::ObservedPtr* pAnnot,
uint32_t nFlags,
- const CFX_FloatPoint& point);
+ const CFX_PointF& point);
bool OnKeyDown(CPDFSDK_Annot* pAnnot, uint32_t nKeyCode, uint32_t nFlags);
bool OnChar(CPDFSDK_Annot* pAnnot, uint32_t nChar, uint32_t nFlags);
diff --git a/fpdfsdk/formfiller/cffl_radiobutton.cpp b/fpdfsdk/formfiller/cffl_radiobutton.cpp
index 70d4c0dee6..e78160e5dc 100644
--- a/fpdfsdk/formfiller/cffl_radiobutton.cpp
+++ b/fpdfsdk/formfiller/cffl_radiobutton.cpp
@@ -72,7 +72,7 @@ bool CFFL_RadioButton::OnChar(CPDFSDK_Annot* pAnnot,
bool CFFL_RadioButton::OnLButtonUp(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
uint32_t nFlags,
- const CFX_FloatPoint& point) {
+ const CFX_PointF& point) {
CFFL_Button::OnLButtonUp(pPageView, pAnnot, nFlags, point);
if (IsValid()) {
diff --git a/fpdfsdk/formfiller/cffl_radiobutton.h b/fpdfsdk/formfiller/cffl_radiobutton.h
index 49a658f84e..10ac37dcb8 100644
--- a/fpdfsdk/formfiller/cffl_radiobutton.h
+++ b/fpdfsdk/formfiller/cffl_radiobutton.h
@@ -24,7 +24,7 @@ class CFFL_RadioButton : public CFFL_Button {
bool OnLButtonUp(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
uint32_t nFlags,
- const CFX_FloatPoint& point) override;
+ const CFX_PointF& point) override;
bool IsDataChanged(CPDFSDK_PageView* pPageView) override;
void SaveData(CPDFSDK_PageView* pPageView) override;
};