Rename CFFL_FormFiller to CFFL_FormField
Resolves a longstanding naming issue. Fully automated CL generation.
Bug: pdfium:1673
Change-Id: I2f8907db5118a3e28105c03acc54c4b9e070a5c6
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/81151
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/fpdfsdk/cpdfsdk_baannothandler.cpp b/fpdfsdk/cpdfsdk_baannothandler.cpp
index 48872bd..6aee006 100644
--- a/fpdfsdk/cpdfsdk_baannothandler.cpp
+++ b/fpdfsdk/cpdfsdk_baannothandler.cpp
@@ -18,7 +18,7 @@
#include "fpdfsdk/cpdfsdk_baannot.h"
#include "fpdfsdk/cpdfsdk_formfillenvironment.h"
#include "fpdfsdk/cpdfsdk_pageview.h"
-#include "fpdfsdk/formfiller/cffl_formfiller.h"
+#include "fpdfsdk/formfiller/cffl_formfield.h"
#include "public/fpdf_fwlevent.h"
#include "third_party/base/check.h"
#include "third_party/base/stl_util.h"
diff --git a/fpdfsdk/cpdfsdk_formfillenvironment.cpp b/fpdfsdk/cpdfsdk_formfillenvironment.cpp
index 15d80f1..4b512b1 100644
--- a/fpdfsdk/cpdfsdk_formfillenvironment.cpp
+++ b/fpdfsdk/cpdfsdk_formfillenvironment.cpp
@@ -21,7 +21,7 @@
#include "fpdfsdk/cpdfsdk_interactiveform.h"
#include "fpdfsdk/cpdfsdk_pageview.h"
#include "fpdfsdk/cpdfsdk_widget.h"
-#include "fpdfsdk/formfiller/cffl_formfiller.h"
+#include "fpdfsdk/formfiller/cffl_formfield.h"
#include "fpdfsdk/formfiller/cffl_interactiveformfiller.h"
#include "fpdfsdk/formfiller/cffl_privatedata.h"
#include "fxjs/ijs_runtime.h"
@@ -110,7 +110,7 @@
}
void CPDFSDK_FormFillEnvironment::OutputSelectedRect(
- CFFL_FormFiller* pFormFiller,
+ CFFL_FormField* pFormFiller,
const CFX_FloatRect& rect) {
if (!pFormFiller || !m_pInfo || !m_pInfo->FFI_OutputSelectedRect)
return;
diff --git a/fpdfsdk/cpdfsdk_formfillenvironment.h b/fpdfsdk/cpdfsdk_formfillenvironment.h
index 7cee3ed..ec538dd 100644
--- a/fpdfsdk/cpdfsdk_formfillenvironment.h
+++ b/fpdfsdk/cpdfsdk_formfillenvironment.h
@@ -61,7 +61,7 @@
// IPWL_SystemHandler:
void InvalidateRect(PerWindowData* pWidgetData,
const CFX_FloatRect& rect) override;
- void OutputSelectedRect(CFFL_FormFiller* pFormFiller,
+ void OutputSelectedRect(CFFL_FormField* pFormFiller,
const CFX_FloatRect& rect) override;
bool IsSelectionImplemented() const override;
void SetCursor(CursorStyle nCursorType) override;
diff --git a/fpdfsdk/cpdfsdk_interactiveform.cpp b/fpdfsdk/cpdfsdk_interactiveform.cpp
index 8a4bcea..a5dec66 100644
--- a/fpdfsdk/cpdfsdk_interactiveform.cpp
+++ b/fpdfsdk/cpdfsdk_interactiveform.cpp
@@ -31,7 +31,7 @@
#include "fpdfsdk/cpdfsdk_formfillenvironment.h"
#include "fpdfsdk/cpdfsdk_pageview.h"
#include "fpdfsdk/cpdfsdk_widget.h"
-#include "fpdfsdk/formfiller/cffl_formfiller.h"
+#include "fpdfsdk/formfiller/cffl_formfield.h"
#include "fpdfsdk/ipdfsdk_annothandler.h"
#include "fxjs/ijs_event_context.h"
#include "fxjs/ijs_runtime.h"
diff --git a/fpdfsdk/cpdfsdk_widgethandler.cpp b/fpdfsdk/cpdfsdk_widgethandler.cpp
index 0f977ce..79bf5f2 100644
--- a/fpdfsdk/cpdfsdk_widgethandler.cpp
+++ b/fpdfsdk/cpdfsdk_widgethandler.cpp
@@ -18,7 +18,7 @@
#include "fpdfsdk/cpdfsdk_interactiveform.h"
#include "fpdfsdk/cpdfsdk_pageview.h"
#include "fpdfsdk/cpdfsdk_widget.h"
-#include "fpdfsdk/formfiller/cffl_formfiller.h"
+#include "fpdfsdk/formfiller/cffl_formfield.h"
#include "third_party/base/check.h"
#include "third_party/base/check_op.h"
#include "third_party/base/stl_util.h"
diff --git a/fpdfsdk/formfiller/BUILD.gn b/fpdfsdk/formfiller/BUILD.gn
index 10d5e74..e38ccf9 100644
--- a/fpdfsdk/formfiller/BUILD.gn
+++ b/fpdfsdk/formfiller/BUILD.gn
@@ -12,8 +12,8 @@
"cffl_checkbox.h",
"cffl_combobox.cpp",
"cffl_combobox.h",
- "cffl_formfiller.cpp",
- "cffl_formfiller.h",
+ "cffl_formfield.cpp",
+ "cffl_formfield.h",
"cffl_interactiveformfiller.cpp",
"cffl_interactiveformfiller.h",
"cffl_listbox.cpp",
diff --git a/fpdfsdk/formfiller/cffl_button.cpp b/fpdfsdk/formfiller/cffl_button.cpp
index f7da69b..acfcbe9 100644
--- a/fpdfsdk/formfiller/cffl_button.cpp
+++ b/fpdfsdk/formfiller/cffl_button.cpp
@@ -11,7 +11,7 @@
CFFL_Button::CFFL_Button(CPDFSDK_FormFillEnvironment* pFormFillEnv,
CPDFSDK_Widget* pWidget)
- : CFFL_FormFiller(pFormFillEnv, pWidget) {}
+ : CFFL_FormField(pFormFillEnv, pWidget) {}
CFFL_Button::~CFFL_Button() = default;
diff --git a/fpdfsdk/formfiller/cffl_button.h b/fpdfsdk/formfiller/cffl_button.h
index d55b231..aed4b41 100644
--- a/fpdfsdk/formfiller/cffl_button.h
+++ b/fpdfsdk/formfiller/cffl_button.h
@@ -8,7 +8,7 @@
#define FPDFSDK_FORMFILLER_CFFL_BUTTON_H_
#include "core/fxcrt/fx_coordinates.h"
-#include "fpdfsdk/formfiller/cffl_formfiller.h"
+#include "fpdfsdk/formfiller/cffl_formfield.h"
class CFX_RenderDevice;
class CFX_Matrix;
@@ -17,13 +17,13 @@
class CPDFSDK_PageView;
class CPDFSDK_Widget;
-class CFFL_Button : public CFFL_FormFiller {
+class CFFL_Button : public CFFL_FormField {
public:
CFFL_Button(CPDFSDK_FormFillEnvironment* pFormFillEnv,
CPDFSDK_Widget* pWidget);
~CFFL_Button() override;
- // CFFL_FormFiller
+ // CFFL_FormField
void OnMouseEnter(CPDFSDK_PageView* pPageView) override;
void OnMouseExit(CPDFSDK_PageView* pPageView) override;
bool OnLButtonDown(CPDFSDK_PageView* pPageView,
diff --git a/fpdfsdk/formfiller/cffl_checkbox.cpp b/fpdfsdk/formfiller/cffl_checkbox.cpp
index c2d26db..c37e452 100644
--- a/fpdfsdk/formfiller/cffl_checkbox.cpp
+++ b/fpdfsdk/formfiller/cffl_checkbox.cpp
@@ -11,7 +11,7 @@
#include "core/fpdfdoc/cpdf_formcontrol.h"
#include "fpdfsdk/cpdfsdk_formfillenvironment.h"
#include "fpdfsdk/cpdfsdk_widget.h"
-#include "fpdfsdk/formfiller/cffl_formfiller.h"
+#include "fpdfsdk/formfiller/cffl_formfield.h"
#include "fpdfsdk/pwl/cpwl_special_button.h"
#include "public/fpdf_fwlevent.h"
#include "third_party/base/check.h"
@@ -37,7 +37,7 @@
case FWL_VKEY_Space:
return true;
default:
- return CFFL_FormFiller::OnKeyDown(nKeyCode, nFlags);
+ return CFFL_FormField::OnKeyDown(nKeyCode, nFlags);
}
}
bool CFFL_CheckBox::OnChar(CPDFSDK_Annot* pAnnot,
@@ -61,7 +61,7 @@
return true;
}
- CFFL_FormFiller::OnChar(pAnnot, nChar, nFlags);
+ CFFL_FormField::OnChar(pAnnot, nChar, nFlags);
CPWL_CheckBox* pWnd = GetCheckBox(pPageView, true);
if (pWnd && !pWnd->IsReadOnly()) {
@@ -72,7 +72,7 @@
return CommitData(pPageView, nFlags);
}
default:
- return CFFL_FormFiller::OnChar(pAnnot, nChar, nFlags);
+ return CFFL_FormField::OnChar(pAnnot, nChar, nFlags);
}
}
diff --git a/fpdfsdk/formfiller/cffl_formfiller.cpp b/fpdfsdk/formfiller/cffl_formfield.cpp
similarity index 68%
rename from fpdfsdk/formfiller/cffl_formfiller.cpp
rename to fpdfsdk/formfiller/cffl_formfield.cpp
index fbd3901..397218d 100644
--- a/fpdfsdk/formfiller/cffl_formfiller.cpp
+++ b/fpdfsdk/formfiller/cffl_formfield.cpp
@@ -4,7 +4,7 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "fpdfsdk/formfiller/cffl_formfiller.h"
+#include "fpdfsdk/formfiller/cffl_formfield.h"
#include <utility>
@@ -17,17 +17,17 @@
#include "fpdfsdk/formfiller/cffl_privatedata.h"
#include "third_party/base/check.h"
-CFFL_FormFiller::CFFL_FormFiller(CPDFSDK_FormFillEnvironment* pFormFillEnv,
- CPDFSDK_Widget* pWidget)
+CFFL_FormField::CFFL_FormField(CPDFSDK_FormFillEnvironment* pFormFillEnv,
+ CPDFSDK_Widget* pWidget)
: m_pFormFillEnv(pFormFillEnv), m_pWidget(pWidget) {
DCHECK(m_pFormFillEnv);
}
-CFFL_FormFiller::~CFFL_FormFiller() {
+CFFL_FormField::~CFFL_FormField() {
DestroyWindows();
}
-void CFFL_FormFiller::DestroyWindows() {
+void CFFL_FormField::DestroyWindows() {
while (!m_Maps.empty()) {
auto it = m_Maps.begin();
std::unique_ptr<CPWL_Wnd> pWnd = std::move(it->second);
@@ -37,7 +37,7 @@
}
}
-FX_RECT CFFL_FormFiller::GetViewBBox(CPDFSDK_PageView* pPageView) {
+FX_RECT CFFL_FormField::GetViewBBox(CPDFSDK_PageView* pPageView) {
CPWL_Wnd* pWnd = GetPWLWindow(pPageView, false);
CFX_FloatRect rcAnnot =
pWnd ? PWLtoFFL(pWnd->GetWindowRect()) : m_pWidget->GetRect();
@@ -54,10 +54,10 @@
return rcWin.GetOuterRect();
}
-void CFFL_FormFiller::OnDraw(CPDFSDK_PageView* pPageView,
- CPDFSDK_Annot* pAnnot,
- CFX_RenderDevice* pDevice,
- const CFX_Matrix& mtUser2Device) {
+void CFFL_FormField::OnDraw(CPDFSDK_PageView* pPageView,
+ CPDFSDK_Annot* pAnnot,
+ CFX_RenderDevice* pDevice,
+ const CFX_Matrix& mtUser2Device) {
CPWL_Wnd* pWnd = GetPWLWindow(pPageView, false);
if (pWnd) {
pWnd->DrawAppearance(pDevice, GetCurMatrix() * mtUser2Device);
@@ -71,25 +71,25 @@
pWidget->DrawAppearance(pDevice, mtUser2Device, CPDF_Annot::Normal, nullptr);
}
-void CFFL_FormFiller::OnDrawDeactive(CPDFSDK_PageView* pPageView,
- CPDFSDK_Annot* pAnnot,
- CFX_RenderDevice* pDevice,
- const CFX_Matrix& mtUser2Device) {
+void CFFL_FormField::OnDrawDeactive(CPDFSDK_PageView* pPageView,
+ CPDFSDK_Annot* pAnnot,
+ CFX_RenderDevice* pDevice,
+ const CFX_Matrix& mtUser2Device) {
ToCPDFSDKWidget(pAnnot)->DrawAppearance(pDevice, mtUser2Device,
CPDF_Annot::Normal, nullptr);
}
-void CFFL_FormFiller::OnMouseEnter(CPDFSDK_PageView* pPageView) {}
+void CFFL_FormField::OnMouseEnter(CPDFSDK_PageView* pPageView) {}
-void CFFL_FormFiller::OnMouseExit(CPDFSDK_PageView* pPageView) {
+void CFFL_FormField::OnMouseExit(CPDFSDK_PageView* pPageView) {
m_pTimer.reset();
DCHECK(m_pWidget);
}
-bool CFFL_FormFiller::OnLButtonDown(CPDFSDK_PageView* pPageView,
- CPDFSDK_Annot* pAnnot,
- uint32_t nFlags,
- const CFX_PointF& point) {
+bool CFFL_FormField::OnLButtonDown(CPDFSDK_PageView* pPageView,
+ CPDFSDK_Annot* pAnnot,
+ uint32_t nFlags,
+ const CFX_PointF& point) {
CPWL_Wnd* pWnd = GetPWLWindow(pPageView, true);
if (!pWnd)
return false;
@@ -102,10 +102,10 @@
return pWnd->OnLButtonDown(nFlags, FFLtoPWL(point));
}
-bool CFFL_FormFiller::OnLButtonUp(CPDFSDK_PageView* pPageView,
- CPDFSDK_Annot* pAnnot,
- uint32_t nFlags,
- const CFX_PointF& point) {
+bool CFFL_FormField::OnLButtonUp(CPDFSDK_PageView* pPageView,
+ CPDFSDK_Annot* pAnnot,
+ uint32_t nFlags,
+ const CFX_PointF& point) {
CPWL_Wnd* pWnd = GetPWLWindow(pPageView, false);
if (!pWnd)
return false;
@@ -115,9 +115,9 @@
return true;
}
-bool CFFL_FormFiller::OnLButtonDblClk(CPDFSDK_PageView* pPageView,
- uint32_t nFlags,
- const CFX_PointF& point) {
+bool CFFL_FormField::OnLButtonDblClk(CPDFSDK_PageView* pPageView,
+ uint32_t nFlags,
+ const CFX_PointF& point) {
CPWL_Wnd* pWnd = GetPWLWindow(pPageView, false);
if (!pWnd)
return false;
@@ -126,9 +126,9 @@
return true;
}
-bool CFFL_FormFiller::OnMouseMove(CPDFSDK_PageView* pPageView,
- uint32_t nFlags,
- const CFX_PointF& point) {
+bool CFFL_FormField::OnMouseMove(CPDFSDK_PageView* pPageView,
+ uint32_t nFlags,
+ const CFX_PointF& point) {
CPWL_Wnd* pWnd = GetPWLWindow(pPageView, false);
if (!pWnd)
return false;
@@ -137,10 +137,10 @@
return true;
}
-bool CFFL_FormFiller::OnMouseWheel(CPDFSDK_PageView* pPageView,
- uint32_t nFlags,
- const CFX_PointF& point,
- const CFX_Vector& delta) {
+bool CFFL_FormField::OnMouseWheel(CPDFSDK_PageView* pPageView,
+ uint32_t nFlags,
+ const CFX_PointF& point,
+ const CFX_Vector& delta) {
if (!IsValid())
return false;
@@ -148,21 +148,21 @@
return pWnd && pWnd->OnMouseWheel(nFlags, FFLtoPWL(point), delta);
}
-bool CFFL_FormFiller::OnRButtonDown(CPDFSDK_PageView* pPageView,
- uint32_t nFlags,
- const CFX_PointF& point) {
+bool CFFL_FormField::OnRButtonDown(CPDFSDK_PageView* pPageView,
+ uint32_t nFlags,
+ const CFX_PointF& point) {
CPWL_Wnd* pWnd = GetPWLWindow(pPageView, true);
return pWnd && pWnd->OnRButtonDown(nFlags, FFLtoPWL(point));
}
-bool CFFL_FormFiller::OnRButtonUp(CPDFSDK_PageView* pPageView,
- uint32_t nFlags,
- const CFX_PointF& point) {
+bool CFFL_FormField::OnRButtonUp(CPDFSDK_PageView* pPageView,
+ uint32_t nFlags,
+ const CFX_PointF& point) {
CPWL_Wnd* pWnd = GetPWLWindow(pPageView, false);
return pWnd && pWnd->OnRButtonUp(nFlags, FFLtoPWL(point));
}
-bool CFFL_FormFiller::OnKeyDown(uint32_t nKeyCode, uint32_t nFlags) {
+bool CFFL_FormField::OnKeyDown(uint32_t nKeyCode, uint32_t nFlags) {
if (!IsValid())
return false;
@@ -170,9 +170,9 @@
return pWnd && pWnd->OnKeyDown(nKeyCode, nFlags);
}
-bool CFFL_FormFiller::OnChar(CPDFSDK_Annot* pAnnot,
- uint32_t nChar,
- uint32_t nFlags) {
+bool CFFL_FormField::OnChar(CPDFSDK_Annot* pAnnot,
+ uint32_t nChar,
+ uint32_t nFlags) {
if (!IsValid())
return false;
@@ -180,15 +180,15 @@
return pWnd && pWnd->OnChar(nChar, nFlags);
}
-bool CFFL_FormFiller::SetIndexSelected(int index, bool selected) {
+bool CFFL_FormField::SetIndexSelected(int index, bool selected) {
return false;
}
-bool CFFL_FormFiller::IsIndexSelected(int index) {
+bool CFFL_FormField::IsIndexSelected(int index) {
return false;
}
-WideString CFFL_FormFiller::GetText() {
+WideString CFFL_FormField::GetText() {
if (!IsValid())
return WideString();
@@ -196,7 +196,7 @@
return pWnd ? pWnd->GetText() : WideString();
}
-WideString CFFL_FormFiller::GetSelectedText() {
+WideString CFFL_FormField::GetSelectedText() {
if (!IsValid())
return WideString();
@@ -204,7 +204,7 @@
return pWnd ? pWnd->GetSelectedText() : WideString();
}
-void CFFL_FormFiller::ReplaceSelection(const WideString& text) {
+void CFFL_FormField::ReplaceSelection(const WideString& text) {
if (!IsValid())
return;
@@ -215,7 +215,7 @@
pWnd->ReplaceSelection(text);
}
-bool CFFL_FormFiller::SelectAllText() {
+bool CFFL_FormField::SelectAllText() {
if (!IsValid())
return false;
@@ -223,7 +223,7 @@
return pWnd && pWnd->SelectAllText();
}
-bool CFFL_FormFiller::CanUndo() {
+bool CFFL_FormField::CanUndo() {
if (!IsValid())
return false;
@@ -231,7 +231,7 @@
return pWnd && pWnd->CanUndo();
}
-bool CFFL_FormFiller::CanRedo() {
+bool CFFL_FormField::CanRedo() {
if (!IsValid())
return false;
@@ -239,7 +239,7 @@
return pWnd && pWnd->CanRedo();
}
-bool CFFL_FormFiller::Undo() {
+bool CFFL_FormField::Undo() {
if (!IsValid())
return false;
@@ -247,7 +247,7 @@
return pWnd && pWnd->Undo();
}
-bool CFFL_FormFiller::Redo() {
+bool CFFL_FormField::Redo() {
if (!IsValid())
return false;
@@ -255,7 +255,7 @@
return pWnd && pWnd->Redo();
}
-void CFFL_FormFiller::SetFocusForAnnot(CPDFSDK_Annot* pAnnot, uint32_t nFlag) {
+void CFFL_FormField::SetFocusForAnnot(CPDFSDK_Annot* pAnnot, uint32_t nFlag) {
CPDFSDK_Widget* pWidget = ToCPDFSDKWidget(pAnnot);
IPDF_Page* pPage = pWidget->GetPage();
CPDFSDK_PageView* pPageView = m_pFormFillEnv->GetPageView(pPage, true);
@@ -266,7 +266,7 @@
InvalidateRect(GetViewBBox(pPageView));
}
-void CFFL_FormFiller::KillFocusForAnnot(uint32_t nFlag) {
+void CFFL_FormField::KillFocusForAnnot(uint32_t nFlag) {
if (!IsValid())
return;
@@ -291,11 +291,11 @@
EscapeFiller(pPageView, bDestroyPWLWindow);
}
-bool CFFL_FormFiller::IsValid() const {
+bool CFFL_FormField::IsValid() const {
return m_bValid;
}
-CPWL_Wnd::CreateParams CFFL_FormFiller::GetCreateParam() {
+CPWL_Wnd::CreateParams CFFL_FormField::GetCreateParam() {
CPWL_Wnd::CreateParams cp;
cp.pProvider.Reset(this);
cp.rcRectWnd = GetPDFAnnotRect();
@@ -343,8 +343,7 @@
return cp;
}
-CPWL_Wnd* CFFL_FormFiller::GetPWLWindow(CPDFSDK_PageView* pPageView,
- bool bNew) {
+CPWL_Wnd* CFFL_FormField::GetPWLWindow(CPDFSDK_PageView* pPageView, bool bNew) {
DCHECK(pPageView);
auto it = m_Maps.find(pPageView);
if (it == m_Maps.end()) {
@@ -372,7 +371,7 @@
pPrivateData->ValueAgeEquals(m_pWidget->GetValueAge()));
}
-void CFFL_FormFiller::DestroyPWLWindow(CPDFSDK_PageView* pPageView) {
+void CFFL_FormField::DestroyPWLWindow(CPDFSDK_PageView* pPageView) {
auto it = m_Maps.find(pPageView);
if (it == m_Maps.end())
return;
@@ -382,7 +381,7 @@
pWnd->Destroy();
}
-CFX_Matrix CFFL_FormFiller::GetWindowMatrix(
+CFX_Matrix CFFL_FormField::GetWindowMatrix(
const IPWL_SystemHandler::PerWindowData* pAttached) {
const auto* pPrivateData = static_cast<const CFFL_PrivateData*>(pAttached);
if (!pPrivateData)
@@ -395,7 +394,7 @@
return GetCurMatrix() * pPageView->GetCurrentMatrix();
}
-CFX_Matrix CFFL_FormFiller::GetCurMatrix() {
+CFX_Matrix CFFL_FormField::GetCurMatrix() {
CFX_Matrix mt;
CFX_FloatRect rcDA = m_pWidget->GetPDFAnnot()->GetRect();
switch (m_pWidget->GetRotate()) {
@@ -419,7 +418,7 @@
return mt;
}
-CFX_FloatRect CFFL_FormFiller::GetPDFAnnotRect() const {
+CFX_FloatRect CFFL_FormField::GetPDFAnnotRect() const {
CFX_FloatRect rectAnnot = m_pWidget->GetPDFAnnot()->GetRect();
float fWidth = rectAnnot.Width();
@@ -429,12 +428,12 @@
return CFX_FloatRect(0, 0, fWidth, fHeight);
}
-CPDFSDK_PageView* CFFL_FormFiller::GetCurPageView() {
+CPDFSDK_PageView* CFFL_FormField::GetCurPageView() {
IPDF_Page* pPage = m_pWidget->GetPage();
return m_pFormFillEnv->GetPageView(pPage, true);
}
-CFX_FloatRect CFFL_FormFiller::GetFocusBox(CPDFSDK_PageView* pPageView) {
+CFX_FloatRect CFFL_FormField::GetFocusBox(CPDFSDK_PageView* pPageView) {
CPWL_Wnd* pWnd = GetPWLWindow(pPageView, false);
if (!pWnd)
return CFX_FloatRect();
@@ -444,23 +443,23 @@
: CFX_FloatRect();
}
-CFX_FloatRect CFFL_FormFiller::FFLtoPWL(const CFX_FloatRect& rect) {
+CFX_FloatRect CFFL_FormField::FFLtoPWL(const CFX_FloatRect& rect) {
return GetCurMatrix().GetInverse().TransformRect(rect);
}
-CFX_FloatRect CFFL_FormFiller::PWLtoFFL(const CFX_FloatRect& rect) {
+CFX_FloatRect CFFL_FormField::PWLtoFFL(const CFX_FloatRect& rect) {
return GetCurMatrix().TransformRect(rect);
}
-CFX_PointF CFFL_FormFiller::FFLtoPWL(const CFX_PointF& point) {
+CFX_PointF CFFL_FormField::FFLtoPWL(const CFX_PointF& point) {
return GetCurMatrix().GetInverse().Transform(point);
}
-CFX_PointF CFFL_FormFiller::PWLtoFFL(const CFX_PointF& point) {
+CFX_PointF CFFL_FormField::PWLtoFFL(const CFX_PointF& point) {
return GetCurMatrix().Transform(point);
}
-bool CFFL_FormFiller::CommitData(CPDFSDK_PageView* pPageView, uint32_t nFlag) {
+bool CFFL_FormField::CommitData(CPDFSDK_PageView* pPageView, uint32_t nFlag) {
if (!IsDataChanged(pPageView))
return true;
@@ -501,45 +500,45 @@
return true;
}
-bool CFFL_FormFiller::IsDataChanged(CPDFSDK_PageView* pPageView) {
+bool CFFL_FormField::IsDataChanged(CPDFSDK_PageView* pPageView) {
return false;
}
-void CFFL_FormFiller::SaveData(CPDFSDK_PageView* pPageView) {}
+void CFFL_FormField::SaveData(CPDFSDK_PageView* pPageView) {}
#ifdef PDF_ENABLE_XFA
-bool CFFL_FormFiller::IsFieldFull(CPDFSDK_PageView* pPageView) {
+bool CFFL_FormField::IsFieldFull(CPDFSDK_PageView* pPageView) {
return false;
}
#endif // PDF_ENABLE_XFA
-void CFFL_FormFiller::SetChangeMark() {
+void CFFL_FormField::SetChangeMark() {
m_pFormFillEnv->OnChange();
}
-void CFFL_FormFiller::GetActionData(CPDFSDK_PageView* pPageView,
- CPDF_AAction::AActionType type,
- CPDFSDK_FieldAction& fa) {
+void CFFL_FormField::GetActionData(CPDFSDK_PageView* pPageView,
+ CPDF_AAction::AActionType type,
+ CPDFSDK_FieldAction& fa) {
fa.sValue = m_pWidget->GetValue();
}
-void CFFL_FormFiller::SetActionData(CPDFSDK_PageView* pPageView,
- CPDF_AAction::AActionType type,
- const CPDFSDK_FieldAction& fa) {}
+void CFFL_FormField::SetActionData(CPDFSDK_PageView* pPageView,
+ CPDF_AAction::AActionType type,
+ const CPDFSDK_FieldAction& fa) {}
-void CFFL_FormFiller::SaveState(CPDFSDK_PageView* pPageView) {}
+void CFFL_FormField::SaveState(CPDFSDK_PageView* pPageView) {}
-void CFFL_FormFiller::RestoreState(CPDFSDK_PageView* pPageView) {}
+void CFFL_FormField::RestoreState(CPDFSDK_PageView* pPageView) {}
-CPWL_Wnd* CFFL_FormFiller::ResetPWLWindow(CPDFSDK_PageView* pPageView,
- bool bRestoreValue) {
+CPWL_Wnd* CFFL_FormField::ResetPWLWindow(CPDFSDK_PageView* pPageView,
+ bool bRestoreValue) {
return GetPWLWindow(pPageView, false);
}
-void CFFL_FormFiller::OnTimerFired() {}
+void CFFL_FormField::OnTimerFired() {}
-void CFFL_FormFiller::EscapeFiller(CPDFSDK_PageView* pPageView,
- bool bDestroyPWLWindow) {
+void CFFL_FormField::EscapeFiller(CPDFSDK_PageView* pPageView,
+ bool bDestroyPWLWindow) {
m_bValid = false;
InvalidateRect(GetViewBBox(pPageView));
@@ -547,6 +546,6 @@
DestroyPWLWindow(pPageView);
}
-void CFFL_FormFiller::InvalidateRect(const FX_RECT& rect) {
+void CFFL_FormField::InvalidateRect(const FX_RECT& rect) {
m_pFormFillEnv->Invalidate(m_pWidget->GetPage(), rect);
}
diff --git a/fpdfsdk/formfiller/cffl_formfiller.h b/fpdfsdk/formfiller/cffl_formfield.h
similarity index 93%
rename from fpdfsdk/formfiller/cffl_formfiller.h
rename to fpdfsdk/formfiller/cffl_formfield.h
index 31860f7..aa8dae3 100644
--- a/fpdfsdk/formfiller/cffl_formfiller.h
+++ b/fpdfsdk/formfiller/cffl_formfield.h
@@ -4,8 +4,8 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#ifndef FPDFSDK_FORMFILLER_CFFL_FORMFILLER_H_
-#define FPDFSDK_FORMFILLER_CFFL_FORMFILLER_H_
+#ifndef FPDFSDK_FORMFILLER_CFFL_FORMFIELD_H_
+#define FPDFSDK_FORMFILLER_CFFL_FORMFIELD_H_
#include <map>
#include <memory>
@@ -22,12 +22,12 @@
class CPDFSDK_FormFillEnvironment;
class CPDFSDK_PageView;
-class CFFL_FormFiller : public CPWL_Wnd::ProviderIface,
- public CFX_Timer::CallbackIface {
+class CFFL_FormField : public CPWL_Wnd::ProviderIface,
+ public CFX_Timer::CallbackIface {
public:
- CFFL_FormFiller(CPDFSDK_FormFillEnvironment* pFormFillEnv,
- CPDFSDK_Widget* pWidget);
- ~CFFL_FormFiller() override;
+ CFFL_FormField(CPDFSDK_FormFillEnvironment* pFormFillEnv,
+ CPDFSDK_Widget* pWidget);
+ ~CFFL_FormField() override;
virtual void OnDraw(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
@@ -153,4 +153,4 @@
std::map<CPDFSDK_PageView*, std::unique_ptr<CPWL_Wnd>> m_Maps;
};
-#endif // FPDFSDK_FORMFILLER_CFFL_FORMFILLER_H_
+#endif // FPDFSDK_FORMFILLER_CFFL_FORMFIELD_H_
diff --git a/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp b/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
index 7e799f9..88bcc45 100644
--- a/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
+++ b/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
@@ -17,7 +17,7 @@
#include "fpdfsdk/cpdfsdk_widget.h"
#include "fpdfsdk/formfiller/cffl_checkbox.h"
#include "fpdfsdk/formfiller/cffl_combobox.h"
-#include "fpdfsdk/formfiller/cffl_formfiller.h"
+#include "fpdfsdk/formfiller/cffl_formfield.h"
#include "fpdfsdk/formfiller/cffl_listbox.h"
#include "fpdfsdk/formfiller/cffl_privatedata.h"
#include "fpdfsdk/formfiller/cffl_pushbutton.h"
@@ -42,7 +42,7 @@
FX_RECT CFFL_InteractiveFormFiller::GetViewBBox(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot) {
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot))
+ if (CFFL_FormField* pFormFiller = GetFormFiller(pAnnot))
return pFormFiller->GetViewBBox(pPageView);
DCHECK(pPageView);
@@ -65,7 +65,7 @@
if (!IsVisible(pWidget))
return;
- CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot);
+ CFFL_FormField* pFormFiller = GetFormFiller(pAnnot);
if (pFormFiller && pFormFiller->IsValid()) {
pFormFiller->OnDraw(pPageView, pAnnot, pDevice, mtUser2Device);
if (m_pFormFillEnv->GetFocusAnnot() != pAnnot)
@@ -119,14 +119,14 @@
return;
if (pWidget->IsAppModified()) {
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget)) {
+ if (CFFL_FormField* pFormFiller = GetFormFiller(pWidget)) {
pFormFiller->ResetPWLWindow(pPageView,
pWidget->GetValueAge() == nValueAge);
}
}
}
}
- if (CFFL_FormFiller* pFormFiller = GetOrCreateFormFiller(pAnnot->Get()))
+ if (CFFL_FormField* pFormFiller = GetOrCreateFormFiller(pAnnot->Get()))
pFormFiller->OnMouseEnter(pPageView);
}
@@ -153,14 +153,14 @@
return;
if (pWidget->IsAppModified()) {
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget)) {
+ if (CFFL_FormField* pFormFiller = GetFormFiller(pWidget)) {
pFormFiller->ResetPWLWindow(pPageView,
nValueAge == pWidget->GetValueAge());
}
}
}
}
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot->Get()))
+ if (CFFL_FormField* pFormFiller = GetFormFiller(pAnnot->Get()))
pFormFiller->OnMouseExit(pPageView);
}
@@ -193,14 +193,14 @@
return true;
if (pWidget->IsAppModified()) {
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget)) {
+ if (CFFL_FormField* pFormFiller = GetFormFiller(pWidget)) {
pFormFiller->ResetPWLWindow(pPageView,
nValueAge == pWidget->GetValueAge());
}
}
}
}
- CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot->Get());
+ CFFL_FormField* pFormFiller = GetFormFiller(pAnnot->Get());
return pFormFiller &&
pFormFiller->OnLButtonDown(pPageView, pAnnot->Get(), nFlags, point);
}
@@ -230,7 +230,7 @@
if (bSetFocus)
m_pFormFillEnv->SetFocusAnnot(pAnnot);
- CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot->Get());
+ CFFL_FormField* pFormFiller = GetFormFiller(pAnnot->Get());
bool bRet = pFormFiller &&
pFormFiller->OnLButtonUp(pPageView, pAnnot->Get(), nFlags, point);
if (m_pFormFillEnv->GetFocusAnnot() != pAnnot->Get())
@@ -270,7 +270,7 @@
if (nAge == pWidget->GetAppearanceAge())
return false;
- CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget);
+ CFFL_FormField* pFormFiller = GetFormFiller(pWidget);
if (pFormFiller)
pFormFiller->ResetPWLWindow(pPageView, nValueAge == pWidget->GetValueAge());
return true;
@@ -283,7 +283,7 @@
DCHECK_EQ((*pAnnot)->GetPDFAnnot()->GetSubtype(),
CPDF_Annot::Subtype::WIDGET);
- CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot->Get());
+ CFFL_FormField* pFormFiller = GetFormFiller(pAnnot->Get());
return pFormFiller && pFormFiller->SetIndexSelected(index, selected);
}
@@ -293,7 +293,7 @@
DCHECK_EQ((*pAnnot)->GetPDFAnnot()->GetSubtype(),
CPDF_Annot::Subtype::WIDGET);
- CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot->Get());
+ CFFL_FormField* pFormFiller = GetFormFiller(pAnnot->Get());
return pFormFiller && pFormFiller->IsIndexSelected(index);
}
@@ -304,7 +304,7 @@
const CFX_PointF& point) {
DCHECK_EQ((*pAnnot)->GetPDFAnnot()->GetSubtype(),
CPDF_Annot::Subtype::WIDGET);
- CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot->Get());
+ CFFL_FormField* pFormFiller = GetFormFiller(pAnnot->Get());
return pFormFiller && pFormFiller->OnLButtonDblClk(pPageView, nFlags, point);
}
@@ -314,7 +314,7 @@
const CFX_PointF& point) {
DCHECK_EQ((*pAnnot)->GetPDFAnnot()->GetSubtype(),
CPDF_Annot::Subtype::WIDGET);
- CFFL_FormFiller* pFormFiller = GetOrCreateFormFiller(pAnnot->Get());
+ CFFL_FormField* pFormFiller = GetOrCreateFormFiller(pAnnot->Get());
return pFormFiller && pFormFiller->OnMouseMove(pPageView, nFlags, point);
}
@@ -326,7 +326,7 @@
const CFX_Vector& delta) {
DCHECK_EQ((*pAnnot)->GetPDFAnnot()->GetSubtype(),
CPDF_Annot::Subtype::WIDGET);
- CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot->Get());
+ CFFL_FormField* pFormFiller = GetFormFiller(pAnnot->Get());
return pFormFiller &&
pFormFiller->OnMouseWheel(pPageView, nFlags, point, delta);
}
@@ -338,7 +338,7 @@
const CFX_PointF& point) {
DCHECK_EQ((*pAnnot)->GetPDFAnnot()->GetSubtype(),
CPDF_Annot::Subtype::WIDGET);
- CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot->Get());
+ CFFL_FormField* pFormFiller = GetFormFiller(pAnnot->Get());
return pFormFiller && pFormFiller->OnRButtonDown(pPageView, nFlags, point);
}
@@ -348,7 +348,7 @@
const CFX_PointF& point) {
DCHECK_EQ((*pAnnot)->GetPDFAnnot()->GetSubtype(),
CPDF_Annot::Subtype::WIDGET);
- CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot->Get());
+ CFFL_FormField* pFormFiller = GetFormFiller(pAnnot->Get());
return pFormFiller && pFormFiller->OnRButtonUp(pPageView, nFlags, point);
}
@@ -357,7 +357,7 @@
uint32_t nFlags) {
DCHECK_EQ(pAnnot->GetPDFAnnot()->GetSubtype(), CPDF_Annot::Subtype::WIDGET);
- CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot);
+ CFFL_FormField* pFormFiller = GetFormFiller(pAnnot);
return pFormFiller && pFormFiller->OnKeyDown(nKeyCode, nFlags);
}
@@ -368,7 +368,7 @@
if (nChar == FWL_VKEY_Tab)
return true;
- CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot);
+ CFFL_FormField* pFormFiller = GetFormFiller(pAnnot);
return pFormFiller && pFormFiller->OnChar(pAnnot, nChar, nFlags);
}
@@ -387,7 +387,7 @@
uint32_t nValueAge = pWidget->GetValueAge();
pWidget->ClearAppModified();
- CFFL_FormFiller* pFormFiller = GetOrCreateFormFiller(pWidget);
+ CFFL_FormField* pFormFiller = GetOrCreateFormFiller(pWidget);
if (!pFormFiller)
return false;
@@ -404,7 +404,7 @@
return false;
if (pWidget->IsAppModified()) {
- if (CFFL_FormFiller* pFiller = GetFormFiller(pWidget)) {
+ if (CFFL_FormField* pFiller = GetFormFiller(pWidget)) {
pFiller->ResetPWLWindow(pPageView,
nValueAge == pWidget->GetValueAge());
}
@@ -412,7 +412,7 @@
}
}
- if (CFFL_FormFiller* pFormFiller = GetOrCreateFormFiller(pAnnot->Get()))
+ if (CFFL_FormField* pFormFiller = GetOrCreateFormFiller(pAnnot->Get()))
pFormFiller->SetFocusForAnnot(pAnnot->Get(), nFlag);
return true;
@@ -425,7 +425,7 @@
DCHECK_EQ((*pAnnot)->GetPDFAnnot()->GetSubtype(),
CPDF_Annot::Subtype::WIDGET);
- CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot->Get());
+ CFFL_FormField* pFormFiller = GetFormFiller(pAnnot->Get());
if (!pFormFiller)
return true;
@@ -475,20 +475,20 @@
pdfium::access_permissions::kModifyContent);
}
-CFFL_FormFiller* CFFL_InteractiveFormFiller::GetFormFiller(
+CFFL_FormField* CFFL_InteractiveFormFiller::GetFormFiller(
CPDFSDK_Annot* pAnnot) {
auto it = m_Map.find(pAnnot);
return it != m_Map.end() ? it->second.get() : nullptr;
}
-CFFL_FormFiller* CFFL_InteractiveFormFiller::GetOrCreateFormFiller(
+CFFL_FormField* CFFL_InteractiveFormFiller::GetOrCreateFormFiller(
CPDFSDK_Annot* pAnnot) {
- CFFL_FormFiller* result = GetFormFiller(pAnnot);
+ CFFL_FormField* result = GetFormFiller(pAnnot);
if (result)
return result;
CPDFSDK_Widget* pWidget = ToCPDFSDKWidget(pAnnot);
- std::unique_ptr<CFFL_FormFiller> pFormFiller;
+ std::unique_ptr<CFFL_FormField> pFormFiller;
switch (pWidget->GetFieldType()) {
case FormFieldType::kPushButton:
pFormFiller =
@@ -526,20 +526,20 @@
WideString CFFL_InteractiveFormFiller::GetText(CPDFSDK_Annot* pAnnot) {
DCHECK_EQ(pAnnot->GetPDFAnnot()->GetSubtype(), CPDF_Annot::Subtype::WIDGET);
- CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot);
+ CFFL_FormField* pFormFiller = GetFormFiller(pAnnot);
return pFormFiller ? pFormFiller->GetText() : WideString();
}
WideString CFFL_InteractiveFormFiller::GetSelectedText(CPDFSDK_Annot* pAnnot) {
DCHECK_EQ(pAnnot->GetPDFAnnot()->GetSubtype(), CPDF_Annot::Subtype::WIDGET);
- CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot);
+ CFFL_FormField* pFormFiller = GetFormFiller(pAnnot);
return pFormFiller ? pFormFiller->GetSelectedText() : WideString();
}
void CFFL_InteractiveFormFiller::ReplaceSelection(CPDFSDK_Annot* pAnnot,
const WideString& text) {
DCHECK_EQ(pAnnot->GetPDFAnnot()->GetSubtype(), CPDF_Annot::Subtype::WIDGET);
- CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot);
+ CFFL_FormField* pFormFiller = GetFormFiller(pAnnot);
if (!pFormFiller)
return;
@@ -548,31 +548,31 @@
bool CFFL_InteractiveFormFiller::SelectAllText(CPDFSDK_Annot* pAnnot) {
DCHECK_EQ(pAnnot->GetPDFAnnot()->GetSubtype(), CPDF_Annot::Subtype::WIDGET);
- CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot);
+ CFFL_FormField* pFormFiller = GetFormFiller(pAnnot);
return pAnnot && pFormFiller->SelectAllText();
}
bool CFFL_InteractiveFormFiller::CanUndo(CPDFSDK_Annot* pAnnot) {
DCHECK_EQ(pAnnot->GetPDFAnnot()->GetSubtype(), CPDF_Annot::Subtype::WIDGET);
- CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot);
+ CFFL_FormField* pFormFiller = GetFormFiller(pAnnot);
return pFormFiller && pFormFiller->CanUndo();
}
bool CFFL_InteractiveFormFiller::CanRedo(CPDFSDK_Annot* pAnnot) {
DCHECK_EQ(pAnnot->GetPDFAnnot()->GetSubtype(), CPDF_Annot::Subtype::WIDGET);
- CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot);
+ CFFL_FormField* pFormFiller = GetFormFiller(pAnnot);
return pFormFiller && pFormFiller->CanRedo();
}
bool CFFL_InteractiveFormFiller::Undo(CPDFSDK_Annot* pAnnot) {
DCHECK_EQ(pAnnot->GetPDFAnnot()->GetSubtype(), CPDF_Annot::Subtype::WIDGET);
- CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot);
+ CFFL_FormField* pFormFiller = GetFormFiller(pAnnot);
return pFormFiller && pFormFiller->Undo();
}
bool CFFL_InteractiveFormFiller::Redo(CPDFSDK_Annot* pAnnot) {
DCHECK_EQ(pAnnot->GetPDFAnnot()->GetSubtype(), CPDF_Annot::Subtype::WIDGET);
- CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot);
+ CFFL_FormField* pFormFiller = GetFormFiller(pAnnot);
return pFormFiller && pFormFiller->Redo();
}
@@ -667,7 +667,7 @@
fa.bKeyDown = true;
fa.bRC = true;
- CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget);
+ CFFL_FormField* pFormFiller = GetFormFiller(pWidget);
pFormFiller->GetActionData(pPageView, CPDF_AAction::kKeyStroke, fa);
pFormFiller->SaveState(pPageView);
pWidget->OnAAction(CPDF_AAction::kKeyStroke, &fa, pPageView);
@@ -698,7 +698,7 @@
fa.bKeyDown = true;
fa.bRC = true;
- CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget);
+ CFFL_FormField* pFormFiller = GetFormFiller(pWidget);
pFormFiller->GetActionData(pPageView, CPDF_AAction::kValidate, fa);
pFormFiller->SaveState(pPageView);
pWidget->OnAAction(CPDF_AAction::kValidate, &fa, pPageView);
@@ -773,7 +773,7 @@
if (nAge == pWidget->GetAppearanceAge())
return false;
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget))
+ if (CFFL_FormField* pFormFiller = GetFormFiller(pWidget))
pFormFiller->ResetPWLWindow(pPageView, nValueAge == pWidget->GetValueAge());
return false;
}
@@ -803,7 +803,7 @@
if (nAge == pWidget->GetAppearanceAge())
return false;
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget))
+ if (CFFL_FormField* pFormFiller = GetFormFiller(pWidget))
pFormFiller->ResetPWLWindow(pPageView, nValueAge == pWidget->GetValueAge());
return true;
@@ -834,7 +834,7 @@
if (nAge == pWidget->GetAppearanceAge())
return false;
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget))
+ if (CFFL_FormField* pFormFiller = GetFormFiller(pWidget))
pFormFiller->ResetPWLWindow(pPageView, nValueAge == pWidget->GetValueAge());
return true;
@@ -865,7 +865,7 @@
if (nAge == pWidget->GetAppearanceAge())
return false;
- if (CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget))
+ if (CFFL_FormField* pFormFiller = GetFormFiller(pWidget))
pFormFiller->ResetPWLWindow(pPageView, nValueAge == pWidget->GetValueAge());
return true;
@@ -891,7 +891,7 @@
ObservedPtr<CPDFSDK_Widget> pWidget(pPrivateData->GetWidget());
DCHECK(pWidget);
- CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget.Get());
+ CFFL_FormField* pFormFiller = GetFormFiller(pWidget.Get());
#ifdef PDF_ENABLE_XFA
if (pFormFiller->IsFieldFull(pPageView)) {
diff --git a/fpdfsdk/formfiller/cffl_interactiveformfiller.h b/fpdfsdk/formfiller/cffl_interactiveformfiller.h
index 4c46138..faeb651 100644
--- a/fpdfsdk/formfiller/cffl_interactiveformfiller.h
+++ b/fpdfsdk/formfiller/cffl_interactiveformfiller.h
@@ -17,7 +17,7 @@
#include "fpdfsdk/pwl/ipwl_fillernotify.h"
#include "fpdfsdk/pwl/ipwl_systemhandler.h"
-class CFFL_FormFiller;
+class CFFL_FormField;
class CPDFSDK_FormFillEnvironment;
class CPDFSDK_PageView;
class CPDFSDK_Widget;
@@ -81,7 +81,7 @@
bool OnSetFocus(ObservedPtr<CPDFSDK_Annot>* pAnnot, uint32_t nFlag);
bool OnKillFocus(ObservedPtr<CPDFSDK_Annot>* pAnnot, uint32_t nFlag);
- CFFL_FormFiller* GetFormFillerForTesting(CPDFSDK_Annot* pAnnot) {
+ CFFL_FormField* GetFormFillerForTesting(CPDFSDK_Annot* pAnnot) {
return GetFormFiller(pAnnot);
}
@@ -122,7 +122,7 @@
private:
using WidgetToFormFillerMap =
- std::map<CPDFSDK_Annot*, std::unique_ptr<CFFL_FormFiller>>;
+ std::map<CPDFSDK_Annot*, std::unique_ptr<CFFL_FormField>>;
// IPWL_FillerNotify:
void QueryWherePopup(const IPWL_SystemHandler::PerWindowData* pAttached,
@@ -161,8 +161,8 @@
#endif // PDF_ENABLE_XFA
bool IsFillingAllowed(CPDFSDK_Widget* pWidget) const;
- CFFL_FormFiller* GetFormFiller(CPDFSDK_Annot* pAnnot);
- CFFL_FormFiller* GetOrCreateFormFiller(CPDFSDK_Annot* pAnnot);
+ CFFL_FormField* GetFormFiller(CPDFSDK_Annot* pAnnot);
+ CFFL_FormField* GetOrCreateFormFiller(CPDFSDK_Annot* pAnnot);
void UnRegisterFormFiller(CPDFSDK_Annot* pAnnot);
UnownedPtr<CPDFSDK_FormFillEnvironment> const m_pFormFillEnv;
diff --git a/fpdfsdk/formfiller/cffl_pushbutton.cpp b/fpdfsdk/formfiller/cffl_pushbutton.cpp
index e6a0b5e..799d86b 100644
--- a/fpdfsdk/formfiller/cffl_pushbutton.cpp
+++ b/fpdfsdk/formfiller/cffl_pushbutton.cpp
@@ -8,7 +8,7 @@
#include <utility>
-#include "fpdfsdk/formfiller/cffl_formfiller.h"
+#include "fpdfsdk/formfiller/cffl_formfield.h"
#include "fpdfsdk/pwl/cpwl_special_button.h"
CFFL_PushButton::CFFL_PushButton(CPDFSDK_FormFillEnvironment* pApp,
diff --git a/fpdfsdk/formfiller/cffl_radiobutton.cpp b/fpdfsdk/formfiller/cffl_radiobutton.cpp
index 2e1dfcd..cd283e0 100644
--- a/fpdfsdk/formfiller/cffl_radiobutton.cpp
+++ b/fpdfsdk/formfiller/cffl_radiobutton.cpp
@@ -11,7 +11,7 @@
#include "core/fpdfdoc/cpdf_formcontrol.h"
#include "fpdfsdk/cpdfsdk_formfillenvironment.h"
#include "fpdfsdk/cpdfsdk_widget.h"
-#include "fpdfsdk/formfiller/cffl_formfiller.h"
+#include "fpdfsdk/formfiller/cffl_formfield.h"
#include "fpdfsdk/pwl/cpwl_special_button.h"
#include "public/fpdf_fwlevent.h"
#include "third_party/base/check.h"
@@ -37,7 +37,7 @@
case FWL_VKEY_Space:
return true;
default:
- return CFFL_FormFiller::OnKeyDown(nKeyCode, nFlags);
+ return CFFL_FormField::OnKeyDown(nKeyCode, nFlags);
}
}
@@ -57,14 +57,14 @@
return true;
}
- CFFL_FormFiller::OnChar(pAnnot, nChar, nFlags);
+ CFFL_FormField::OnChar(pAnnot, nChar, nFlags);
CPWL_RadioButton* pWnd = GetRadioButton(pPageView, true);
if (pWnd && !pWnd->IsReadOnly())
pWnd->SetCheck(true);
return CommitData(pPageView, nFlags);
}
default:
- return CFFL_FormFiller::OnChar(pAnnot, nChar, nFlags);
+ return CFFL_FormField::OnChar(pAnnot, nChar, nFlags);
}
}
diff --git a/fpdfsdk/formfiller/cffl_textobject.cpp b/fpdfsdk/formfiller/cffl_textobject.cpp
index 71e6ed9..7d5f293 100644
--- a/fpdfsdk/formfiller/cffl_textobject.cpp
+++ b/fpdfsdk/formfiller/cffl_textobject.cpp
@@ -25,7 +25,7 @@
CFFL_TextObject::CFFL_TextObject(CPDFSDK_FormFillEnvironment* pApp,
CPDFSDK_Widget* pWidget)
- : CFFL_FormFiller(pApp, pWidget) {}
+ : CFFL_FormField(pApp, pWidget) {}
CFFL_TextObject::~CFFL_TextObject() {
// Destroy view classes before this object's members are destroyed since
diff --git a/fpdfsdk/formfiller/cffl_textobject.h b/fpdfsdk/formfiller/cffl_textobject.h
index 050f3ec..c7287a7 100644
--- a/fpdfsdk/formfiller/cffl_textobject.h
+++ b/fpdfsdk/formfiller/cffl_textobject.h
@@ -9,15 +9,15 @@
#include <memory>
-#include "fpdfsdk/formfiller/cffl_formfiller.h"
+#include "fpdfsdk/formfiller/cffl_formfield.h"
class CPDF_BAFontMap;
-// Class to implement common functionality for CFFL_FormFiller sub-classes with
+// Class to implement common functionality for CFFL_FormField sub-classes with
// text fields.
-class CFFL_TextObject : public CFFL_FormFiller {
+class CFFL_TextObject : public CFFL_FormField {
public:
- // CFFL_FormFiller:
+ // CFFL_FormField:
CPWL_Wnd* ResetPWLWindow(CPDFSDK_PageView* pPageView,
bool bRestoreValue) override;
diff --git a/fpdfsdk/pwl/cpwl_combo_box.h b/fpdfsdk/pwl/cpwl_combo_box.h
index fb5d124..4dd8db1 100644
--- a/fpdfsdk/pwl/cpwl_combo_box.h
+++ b/fpdfsdk/pwl/cpwl_combo_box.h
@@ -14,7 +14,7 @@
#include "fpdfsdk/pwl/cpwl_wnd.h"
#include "fpdfsdk/pwl/ipwl_systemhandler.h"
-class CFFL_FormFiller;
+class CFFL_FormField;
class CPWL_Edit;
class CPWL_CBButton;
class CPWL_CBListBox;
@@ -62,7 +62,7 @@
void SelectAll();
bool IsPopup() const;
void SetSelectText();
- void AttachFFLData(CFFL_FormFiller* pData) { m_pFormFiller = pData; }
+ void AttachFFLData(CFFL_FormField* pData) { m_pFormFiller = pData; }
private:
void CreateEdit(const CreateParams& cp);
@@ -80,7 +80,7 @@
bool m_bBottom = true;
int32_t m_nSelectItem = -1;
UnownedPtr<IPWL_FillerNotify> m_pFillerNotify;
- UnownedPtr<CFFL_FormFiller> m_pFormFiller;
+ UnownedPtr<CFFL_FormField> m_pFormFiller;
};
#endif // FPDFSDK_PWL_CPWL_COMBO_BOX_H_
diff --git a/fpdfsdk/pwl/cpwl_combo_box_embeddertest.cpp b/fpdfsdk/pwl/cpwl_combo_box_embeddertest.cpp
index 31145ff..16b93ea 100644
--- a/fpdfsdk/pwl/cpwl_combo_box_embeddertest.cpp
+++ b/fpdfsdk/pwl/cpwl_combo_box_embeddertest.cpp
@@ -6,7 +6,7 @@
#include "fpdfsdk/cpdfsdk_annotiterator.h"
#include "fpdfsdk/cpdfsdk_formfillenvironment.h"
#include "fpdfsdk/cpdfsdk_helpers.h"
-#include "fpdfsdk/formfiller/cffl_formfiller.h"
+#include "fpdfsdk/formfiller/cffl_formfield.h"
#include "fpdfsdk/formfiller/cffl_interactiveformfiller.h"
#include "fpdfsdk/pwl/cpwl_combo_box.h"
#include "fpdfsdk/pwl/cpwl_wnd.h"
@@ -80,7 +80,7 @@
FPDF_PAGE GetPage() const { return m_page; }
CPWL_ComboBox* GetCPWLComboBox() const { return m_pComboBox; }
- CFFL_FormFiller* GetCFFLFormFiller() const { return m_pFormFiller; }
+ CFFL_FormField* GetCFFLFormFiller() const { return m_pFormFiller; }
CPDFSDK_Annot* GetCPDFSDKAnnotNormal() const { return m_pAnnotNormal; }
CPDFSDK_Annot* GetCPDFSDKAnnotUserEditable() const {
return m_pAnnotEditable;
@@ -92,7 +92,7 @@
private:
FPDF_PAGE m_page;
CPWL_ComboBox* m_pComboBox;
- CFFL_FormFiller* m_pFormFiller;
+ CFFL_FormField* m_pFormFiller;
CPDFSDK_Annot* m_pAnnotNormal;
CPDFSDK_Annot* m_pAnnotEditable;
CPDFSDK_FormFillEnvironment* m_pFormFillEnv;
diff --git a/fpdfsdk/pwl/cpwl_edit.h b/fpdfsdk/pwl/cpwl_edit.h
index d3acd3d..a8ba98c 100644
--- a/fpdfsdk/pwl/cpwl_edit.h
+++ b/fpdfsdk/pwl/cpwl_edit.h
@@ -98,7 +98,7 @@
m_pFillerNotify = pNotify;
}
- void AttachFFLData(CFFL_FormFiller* pData) { m_pFormFiller = pData; }
+ void AttachFFLData(CFFL_FormField* pData) { m_pFormFiller = pData; }
bool SetCaret(bool bVisible,
const CFX_PointF& ptHead,
const CFX_PointF& ptFoot);
@@ -135,7 +135,7 @@
std::unique_ptr<CPWL_EditImpl> const m_pEditImpl;
UnownedPtr<CPWL_Caret> m_pCaret;
UnownedPtr<IPWL_FillerNotify> m_pFillerNotify;
- UnownedPtr<CFFL_FormFiller> m_pFormFiller;
+ UnownedPtr<CFFL_FormField> m_pFormFiller;
};
#endif // FPDFSDK_PWL_CPWL_EDIT_H_
diff --git a/fpdfsdk/pwl/cpwl_edit_embeddertest.cpp b/fpdfsdk/pwl/cpwl_edit_embeddertest.cpp
index 36d23b0..ee16a06 100644
--- a/fpdfsdk/pwl/cpwl_edit_embeddertest.cpp
+++ b/fpdfsdk/pwl/cpwl_edit_embeddertest.cpp
@@ -8,7 +8,7 @@
#include "fpdfsdk/cpdfsdk_annotiterator.h"
#include "fpdfsdk/cpdfsdk_formfillenvironment.h"
#include "fpdfsdk/cpdfsdk_helpers.h"
-#include "fpdfsdk/formfiller/cffl_formfiller.h"
+#include "fpdfsdk/formfiller/cffl_formfield.h"
#include "fpdfsdk/formfiller/cffl_interactiveformfiller.h"
#include "public/fpdf_fwlevent.h"
#include "testing/embedder_test.h"
@@ -85,14 +85,14 @@
FPDF_PAGE GetPage() { return m_page; }
CPWL_Edit* GetCPWLEdit() { return m_pEdit; }
- CFFL_FormFiller* GetCFFLFormFiller() { return m_pFormFiller; }
+ CFFL_FormField* GetCFFLFormFiller() { return m_pFormFiller; }
CPDFSDK_Annot* GetCPDFSDKAnnot() { return m_pAnnot; }
CPDFSDK_Annot* GetCPDFSDKAnnotCharLimit() { return m_pAnnotCharLimit; }
private:
FPDF_PAGE m_page;
CPWL_Edit* m_pEdit;
- CFFL_FormFiller* m_pFormFiller;
+ CFFL_FormField* m_pFormFiller;
CPDFSDK_Annot* m_pAnnot;
CPDFSDK_Annot* m_pAnnotCharLimit;
CPDFSDK_FormFillEnvironment* m_pFormFillEnv;
diff --git a/fpdfsdk/pwl/cpwl_edit_impl.cpp b/fpdfsdk/pwl/cpwl_edit_impl.cpp
index ef888c3..2bb29c7 100644
--- a/fpdfsdk/pwl/cpwl_edit_impl.cpp
+++ b/fpdfsdk/pwl/cpwl_edit_impl.cpp
@@ -587,7 +587,7 @@
const CFX_PointF& ptOffset,
const CPVT_WordRange* pRange,
IPWL_SystemHandler* pSystemHandler,
- CFFL_FormFiller* pFFLData) {
+ CFFL_FormField* pFFLData) {
const bool bContinuous =
pEdit->GetCharArray() == 0 && pEdit->GetCharSpace() <= 0.0f;
uint16_t SubWord = pEdit->GetPasswordChar();
diff --git a/fpdfsdk/pwl/cpwl_edit_impl.h b/fpdfsdk/pwl/cpwl_edit_impl.h
index a6535fd..8b2bb56 100644
--- a/fpdfsdk/pwl/cpwl_edit_impl.h
+++ b/fpdfsdk/pwl/cpwl_edit_impl.h
@@ -17,7 +17,7 @@
#include "core/fxcrt/unowned_ptr.h"
#include "core/fxge/dib/fx_dib.h"
-class CFFL_FormFiller;
+class CFFL_FormField;
class CFX_RenderDevice;
class CPWL_Edit;
class IPWL_SystemHandler;
@@ -49,7 +49,7 @@
const CFX_PointF& ptOffset,
const CPVT_WordRange* pRange,
IPWL_SystemHandler* pSystemHandler,
- CFFL_FormFiller* pFFLData);
+ CFFL_FormField* pFFLData);
CPWL_EditImpl();
~CPWL_EditImpl();
diff --git a/fpdfsdk/pwl/cpwl_list_box.h b/fpdfsdk/pwl/cpwl_list_box.h
index 1b141c6..87bc6dd 100644
--- a/fpdfsdk/pwl/cpwl_list_box.h
+++ b/fpdfsdk/pwl/cpwl_list_box.h
@@ -81,7 +81,7 @@
m_pFillerNotify = pNotify;
}
- void AttachFFLData(CFFL_FormFiller* pData) { m_pFormFiller = pData; }
+ void AttachFFLData(CFFL_FormField* pData) { m_pFormFiller = pData; }
protected:
bool m_bMouseDown = false;
@@ -90,7 +90,7 @@
UnownedPtr<IPWL_FillerNotify> m_pFillerNotify;
private:
- UnownedPtr<CFFL_FormFiller> m_pFormFiller;
+ UnownedPtr<CFFL_FormField> m_pFormFiller;
};
#endif // FPDFSDK_PWL_CPWL_LIST_BOX_H_
diff --git a/fpdfsdk/pwl/cpwl_special_button_embeddertest.cpp b/fpdfsdk/pwl/cpwl_special_button_embeddertest.cpp
index ef50ef4..7761e29 100644
--- a/fpdfsdk/pwl/cpwl_special_button_embeddertest.cpp
+++ b/fpdfsdk/pwl/cpwl_special_button_embeddertest.cpp
@@ -6,7 +6,7 @@
#include "fpdfsdk/cpdfsdk_annotiterator.h"
#include "fpdfsdk/cpdfsdk_formfillenvironment.h"
#include "fpdfsdk/cpdfsdk_helpers.h"
-#include "fpdfsdk/formfiller/cffl_formfiller.h"
+#include "fpdfsdk/formfiller/cffl_formfield.h"
#include "fpdfsdk/pwl/cpwl_special_button.h"
#include "fpdfsdk/pwl/cpwl_wnd.h"
#include "testing/embedder_test.h"
@@ -96,7 +96,7 @@
private:
FPDF_PAGE page_;
- CFFL_FormFiller* form_filler_;
+ CFFL_FormField* form_filler_;
CPDFSDK_Annot* annot_checkbox_;
CPDFSDK_Annot* annot_readonly_checkbox_;
CPDFSDK_Annot* annot_radiobutton_;
diff --git a/fpdfsdk/pwl/ipwl_systemhandler.h b/fpdfsdk/pwl/ipwl_systemhandler.h
index 61ed7f6..c949f77 100644
--- a/fpdfsdk/pwl/ipwl_systemhandler.h
+++ b/fpdfsdk/pwl/ipwl_systemhandler.h
@@ -12,7 +12,7 @@
#include "core/fxcrt/fx_coordinates.h"
#include "core/fxcrt/fx_system.h"
-class CFFL_FormFiller;
+class CFFL_FormField;
class IPWL_SystemHandler {
public:
@@ -36,7 +36,7 @@
virtual void InvalidateRect(PerWindowData* pWidgetData,
const CFX_FloatRect& rect) = 0;
- virtual void OutputSelectedRect(CFFL_FormFiller* pFormFiller,
+ virtual void OutputSelectedRect(CFFL_FormField* pFormFiller,
const CFX_FloatRect& rect) = 0;
virtual bool IsSelectionImplemented() const = 0;
virtual void SetCursor(CursorStyle nCursorStyle) = 0;