summaryrefslogtreecommitdiff
path: root/fpdfsdk/formfiller
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/formfiller')
-rw-r--r--fpdfsdk/formfiller/cffl_checkbox.cpp4
-rw-r--r--fpdfsdk/formfiller/cffl_combobox.cpp7
-rw-r--r--fpdfsdk/formfiller/cffl_formfiller.cpp24
-rw-r--r--fpdfsdk/formfiller/cffl_formfiller.h8
-rw-r--r--fpdfsdk/formfiller/cffl_interactiveformfiller.cpp76
-rw-r--r--fpdfsdk/formfiller/cffl_interactiveformfiller.h5
-rw-r--r--fpdfsdk/formfiller/cffl_listbox.cpp6
-rw-r--r--fpdfsdk/formfiller/cffl_radiobutton.cpp4
-rw-r--r--fpdfsdk/formfiller/cffl_textfield.cpp14
9 files changed, 76 insertions, 72 deletions
diff --git a/fpdfsdk/formfiller/cffl_checkbox.cpp b/fpdfsdk/formfiller/cffl_checkbox.cpp
index 64981f053c..8b5a97c01d 100644
--- a/fpdfsdk/formfiller/cffl_checkbox.cpp
+++ b/fpdfsdk/formfiller/cffl_checkbox.cpp
@@ -49,8 +49,8 @@ FX_BOOL CFFL_CheckBox::OnChar(CPDFSDK_Annot* pAnnot,
FX_BOOL bReset = FALSE;
FX_BOOL bExit = FALSE;
CPDFSDK_Annot::ObservedPtr pObserved(m_pWidget);
- m_pEnv->GetInteractiveFormFiller()->OnButtonUp(&pObserved, pPageView,
- bReset, bExit, nFlags);
+ m_pFormFillEnv->GetInteractiveFormFiller()->OnButtonUp(
+ &pObserved, pPageView, bReset, bExit, nFlags);
if (!pObserved) {
m_pWidget = nullptr;
return TRUE;
diff --git a/fpdfsdk/formfiller/cffl_combobox.cpp b/fpdfsdk/formfiller/cffl_combobox.cpp
index a7dda07e3b..cb2fdf4d73 100644
--- a/fpdfsdk/formfiller/cffl_combobox.cpp
+++ b/fpdfsdk/formfiller/cffl_combobox.cpp
@@ -55,7 +55,8 @@ CPWL_Wnd* CFFL_ComboBox::NewPDFWindow(const PWL_CREATEPARAM& cp,
pWnd->AttachFFLData(this);
pWnd->Create(cp);
- CFFL_InteractiveFormFiller* pFormFiller = m_pEnv->GetInteractiveFormFiller();
+ CFFL_InteractiveFormFiller* pFormFiller =
+ m_pFormFillEnv->GetInteractiveFormFiller();
pWnd->SetFillerNotify(pFormFiller);
int32_t nCurSel = m_pWidget->GetSelectedIndex(0);
@@ -260,7 +261,7 @@ FX_BOOL CFFL_ComboBox::IsFieldFull(CPDFSDK_PageView* pPageView) {
#endif // PDF_ENABLE_XFA
void CFFL_ComboBox::OnSetFocus(CPWL_Wnd* pWnd) {
- ASSERT(m_pEnv);
+ ASSERT(m_pFormFillEnv);
if (pWnd->GetClassName() == PWL_CLASSNAME_EDIT) {
CPWL_Edit* pEdit = (CPWL_Edit*)pWnd;
@@ -272,7 +273,7 @@ void CFFL_ComboBox::OnSetFocus(CPWL_Wnd* pWnd) {
int nCharacters = wsText.GetLength();
CFX_ByteString bsUTFText = wsText.UTF16LE_Encode();
unsigned short* pBuffer = (unsigned short*)bsUTFText.c_str();
- m_pEnv->OnSetFieldInputFocus(pBuffer, nCharacters, TRUE);
+ m_pFormFillEnv->OnSetFieldInputFocus(pBuffer, nCharacters, TRUE);
}
}
diff --git a/fpdfsdk/formfiller/cffl_formfiller.cpp b/fpdfsdk/formfiller/cffl_formfiller.cpp
index 30609fdac4..1e58d10799 100644
--- a/fpdfsdk/formfiller/cffl_formfiller.cpp
+++ b/fpdfsdk/formfiller/cffl_formfiller.cpp
@@ -21,9 +21,9 @@
#define FFL_HINT_ELAPSE 800
-CFFL_FormFiller::CFFL_FormFiller(CPDFSDK_FormFillEnvironment* pEnv,
+CFFL_FormFiller::CFFL_FormFiller(CPDFSDK_FormFillEnvironment* pFormFillEnv,
CPDFSDK_Annot* pAnnot)
- : m_pEnv(pEnv), m_pAnnot(pAnnot), m_bValid(FALSE) {
+ : m_pFormFillEnv(pFormFillEnv), m_pAnnot(pAnnot), m_bValid(FALSE) {
m_pWidget = static_cast<CPDFSDK_Widget*>(pAnnot);
}
@@ -244,7 +244,7 @@ FX_BOOL CFFL_FormFiller::OnChar(CPDFSDK_Annot* pAnnot,
void CFFL_FormFiller::SetFocusForAnnot(CPDFSDK_Annot* pAnnot, uint32_t nFlag) {
CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot;
UnderlyingPageType* pPage = pWidget->GetUnderlyingPage();
- CPDFSDK_PageView* pPageView = m_pEnv->GetPageView(pPage, true);
+ CPDFSDK_PageView* pPageView = m_pFormFillEnv->GetPageView(pPage, true);
if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, TRUE))
pWnd->SetFocus();
@@ -285,7 +285,7 @@ FX_BOOL CFFL_FormFiller::IsValid() const {
}
PWL_CREATEPARAM CFFL_FormFiller::GetCreateParam() {
- ASSERT(m_pEnv);
+ ASSERT(m_pFormFillEnv);
PWL_CREATEPARAM cp;
cp.pParentWnd = nullptr;
@@ -337,7 +337,7 @@ PWL_CREATEPARAM CFFL_FormFiller::GetCreateParam() {
dwCreateFlags |= PWS_AUTOFONTSIZE;
cp.dwFlags = dwCreateFlags;
- cp.pSystemHandler = m_pEnv->GetSysHandler();
+ cp.pSystemHandler = m_pFormFillEnv->GetSysHandler();
return cp;
}
@@ -432,7 +432,7 @@ CFX_Matrix CFFL_FormFiller::GetCurMatrix() {
}
CFX_WideString CFFL_FormFiller::LoadPopupMenuString(int nIndex) {
- ASSERT(m_pEnv);
+ ASSERT(m_pFormFillEnv);
return L"";
}
@@ -450,7 +450,7 @@ CFX_FloatRect CFFL_FormFiller::GetPDFWindowRect() const {
CPDFSDK_PageView* CFFL_FormFiller::GetCurPageView(bool renew) {
UnderlyingPageType* pPage = m_pAnnot->GetUnderlyingPage();
- return m_pEnv ? m_pEnv->GetPageView(pPage, renew) : nullptr;
+ return m_pFormFillEnv ? m_pFormFillEnv->GetPageView(pPage, renew) : nullptr;
}
CFX_FloatRect CFFL_FormFiller::GetFocusBox(CPDFSDK_PageView* pPageView) {
@@ -517,7 +517,7 @@ FX_BOOL CFFL_FormFiller::CommitData(CPDFSDK_PageView* pPageView,
FX_BOOL bRC = TRUE;
FX_BOOL bExit = FALSE;
CFFL_InteractiveFormFiller* pFormFiller =
- m_pEnv->GetInteractiveFormFiller();
+ m_pFormFillEnv->GetInteractiveFormFiller();
CPDFSDK_Annot::ObservedPtr pObserved(m_pWidget);
pFormFiller->OnKeyStrokeCommit(&pObserved, pPageView, bRC, bExit, nFlag);
if (!pObserved || bExit)
@@ -556,7 +556,7 @@ FX_BOOL CFFL_FormFiller::IsFieldFull(CPDFSDK_PageView* pPageView) {
#endif // PDF_ENABLE_XFA
void CFFL_FormFiller::SetChangeMark() {
- m_pEnv->OnChange();
+ m_pFormFillEnv->OnChange();
}
void CFFL_FormFiller::GetActionData(CPDFSDK_PageView* pPageView,
@@ -587,7 +587,7 @@ CPWL_Wnd* CFFL_FormFiller::ResetPDFWindow(CPDFSDK_PageView* pPageView,
void CFFL_FormFiller::TimerProc() {}
CFX_SystemHandler* CFFL_FormFiller::GetSystemHandler() const {
- return m_pEnv->GetSysHandler();
+ return m_pFormFillEnv->GetSysHandler();
}
void CFFL_FormFiller::EscapeFiller(CPDFSDK_PageView* pPageView,
@@ -606,7 +606,7 @@ void CFFL_FormFiller::InvalidateRect(double left,
double right,
double bottom) {
UnderlyingPageType* pPage = m_pWidget->GetUnderlyingPage();
- m_pEnv->Invalidate(pPage, left, top, right, bottom);
+ m_pFormFillEnv->Invalidate(pPage, left, top, right, bottom);
}
CFFL_Button::CFFL_Button(CPDFSDK_FormFillEnvironment* pApp,
@@ -667,7 +667,7 @@ FX_BOOL CFFL_Button::OnMouseMove(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
uint32_t nFlags,
const CFX_FloatPoint& point) {
- ASSERT(m_pEnv);
+ ASSERT(m_pFormFillEnv);
return TRUE;
}
diff --git a/fpdfsdk/formfiller/cffl_formfiller.h b/fpdfsdk/formfiller/cffl_formfiller.h
index 23c3ba7df2..cd04de4765 100644
--- a/fpdfsdk/formfiller/cffl_formfiller.h
+++ b/fpdfsdk/formfiller/cffl_formfiller.h
@@ -20,7 +20,8 @@ class CPDFSDK_Widget;
class CFFL_FormFiller : public IPWL_Provider, public CPWL_TimerHandler {
public:
- CFFL_FormFiller(CPDFSDK_FormFillEnvironment* pEnv, CPDFSDK_Annot* pAnnot);
+ CFFL_FormFiller(CPDFSDK_FormFillEnvironment* pFormFillEnv,
+ CPDFSDK_Annot* pAnnot);
~CFFL_FormFiller() override;
virtual FX_RECT GetViewBBox(CPDFSDK_PageView* pPageView,
@@ -157,7 +158,7 @@ class CFFL_FormFiller : public IPWL_Provider, public CPWL_TimerHandler {
// until the PWL_Edit is done with it. pdfium:566
void DestroyWindows();
- CPDFSDK_FormFillEnvironment* m_pEnv;
+ CPDFSDK_FormFillEnvironment* m_pFormFillEnv;
CPDFSDK_Widget* m_pWidget;
CPDFSDK_Annot* m_pAnnot;
@@ -168,7 +169,8 @@ class CFFL_FormFiller : public IPWL_Provider, public CPWL_TimerHandler {
class CFFL_Button : public CFFL_FormFiller {
public:
- CFFL_Button(CPDFSDK_FormFillEnvironment* pEnv, CPDFSDK_Annot* pWidget);
+ CFFL_Button(CPDFSDK_FormFillEnvironment* pFormFillEnv,
+ CPDFSDK_Annot* pWidget);
~CFFL_Button() override;
// CFFL_FormFiller
diff --git a/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp b/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
index b06dfdba4a..a699522aa8 100644
--- a/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
+++ b/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
@@ -27,8 +27,8 @@
#define FFL_MAXLISTBOXHEIGHT 140.0f
CFFL_InteractiveFormFiller::CFFL_InteractiveFormFiller(
- CPDFSDK_FormFillEnvironment* pEnv)
- : m_pEnv(pEnv), m_bNotifying(FALSE) {}
+ CPDFSDK_FormFillEnvironment* pFormFillEnv)
+ : m_pFormFillEnv(pFormFillEnv), m_bNotifying(FALSE) {}
CFFL_InteractiveFormFiller::~CFFL_InteractiveFormFiller() {}
@@ -66,7 +66,7 @@ void CFFL_InteractiveFormFiller::OnDraw(CPDFSDK_PageView* pPageView,
pFormFiller->OnDraw(pPageView, pAnnot, pDevice, pUser2Device);
pAnnot->GetPDFPage();
- if (m_pEnv->GetFocusAnnot() == pAnnot) {
+ if (m_pFormFillEnv->GetFocusAnnot() == pAnnot) {
CFX_FloatRect rcFocus = pFormFiller->GetFocusBox(pPageView);
if (!rcFocus.IsEmpty()) {
CFX_PathData path;
@@ -119,8 +119,8 @@ void CFFL_InteractiveFormFiller::OnMouseEnter(
ASSERT(pPageView);
PDFSDK_FieldAction fa;
- fa.bModifier = m_pEnv->IsCTRLKeyDown(nFlag);
- fa.bShift = m_pEnv->IsSHIFTKeyDown(nFlag);
+ fa.bModifier = m_pFormFillEnv->IsCTRLKeyDown(nFlag);
+ fa.bShift = m_pFormFillEnv->IsSHIFTKeyDown(nFlag);
pWidget->OnAAction(CPDF_AAction::CursorEnter, fa, pPageView);
m_bNotifying = FALSE;
if (!(*pAnnot))
@@ -153,8 +153,8 @@ void CFFL_InteractiveFormFiller::OnMouseExit(CPDFSDK_PageView* pPageView,
ASSERT(pPageView);
PDFSDK_FieldAction fa;
- fa.bModifier = m_pEnv->IsCTRLKeyDown(nFlag);
- fa.bShift = m_pEnv->IsSHIFTKeyDown(nFlag);
+ fa.bModifier = m_pFormFillEnv->IsCTRLKeyDown(nFlag);
+ fa.bShift = m_pFormFillEnv->IsSHIFTKeyDown(nFlag);
pWidget->OnAAction(CPDF_AAction::CursorExit, fa, pPageView);
m_bNotifying = FALSE;
if (!(*pAnnot))
@@ -190,8 +190,8 @@ FX_BOOL CFFL_InteractiveFormFiller::OnLButtonDown(
ASSERT(pPageView);
PDFSDK_FieldAction fa;
- fa.bModifier = m_pEnv->IsCTRLKeyDown(nFlags);
- fa.bShift = m_pEnv->IsSHIFTKeyDown(nFlags);
+ fa.bModifier = m_pFormFillEnv->IsCTRLKeyDown(nFlags);
+ fa.bShift = m_pFormFillEnv->IsSHIFTKeyDown(nFlags);
pWidget->OnAAction(CPDF_AAction::ButtonDown, fa, pPageView);
m_bNotifying = FALSE;
if (!(*pAnnot))
@@ -228,10 +228,10 @@ FX_BOOL CFFL_InteractiveFormFiller::OnLButtonUp(
case FIELDTYPE_RADIOBUTTON:
if (GetViewBBox(pPageView, pAnnot->Get())
.Contains((int)point.x, (int)point.y))
- m_pEnv->SetFocusAnnot(pAnnot);
+ m_pFormFillEnv->SetFocusAnnot(pAnnot);
break;
default:
- m_pEnv->SetFocusAnnot(pAnnot);
+ m_pFormFillEnv->SetFocusAnnot(pAnnot);
break;
}
@@ -239,7 +239,7 @@ FX_BOOL CFFL_InteractiveFormFiller::OnLButtonUp(
if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot->Get(), FALSE))
bRet = pFormFiller->OnLButtonUp(pPageView, pAnnot->Get(), nFlags, point);
- if (m_pEnv->GetFocusAnnot() == pAnnot->Get()) {
+ if (m_pFormFillEnv->GetFocusAnnot() == pAnnot->Get()) {
FX_BOOL bExit = FALSE;
FX_BOOL bReset = FALSE;
OnButtonUp(pAnnot, pPageView, bReset, bExit, nFlags);
@@ -269,8 +269,8 @@ void CFFL_InteractiveFormFiller::OnButtonUp(CPDFSDK_Annot::ObservedPtr* pAnnot,
ASSERT(pPageView);
PDFSDK_FieldAction fa;
- fa.bModifier = m_pEnv->IsCTRLKeyDown(nFlag);
- fa.bShift = m_pEnv->IsSHIFTKeyDown(nFlag);
+ fa.bModifier = m_pFormFillEnv->IsCTRLKeyDown(nFlag);
+ fa.bShift = m_pFormFillEnv->IsSHIFTKeyDown(nFlag);
pWidget->OnAAction(CPDF_AAction::ButtonUp, fa, pPageView);
m_bNotifying = FALSE;
if (!(*pAnnot) || !IsValidAnnot(pPageView, pWidget)) {
@@ -394,8 +394,8 @@ FX_BOOL CFFL_InteractiveFormFiller::OnSetFocus(
ASSERT(pPageView);
PDFSDK_FieldAction fa;
- fa.bModifier = m_pEnv->IsCTRLKeyDown(nFlag);
- fa.bShift = m_pEnv->IsSHIFTKeyDown(nFlag);
+ fa.bModifier = m_pFormFillEnv->IsCTRLKeyDown(nFlag);
+ fa.bShift = m_pFormFillEnv->IsSHIFTKeyDown(nFlag);
pFormFiller->GetActionData(pPageView, CPDF_AAction::GetFocus, fa);
pWidget->OnAAction(CPDF_AAction::GetFocus, fa, pPageView);
m_bNotifying = FALSE;
@@ -436,8 +436,8 @@ FX_BOOL CFFL_InteractiveFormFiller::OnKillFocus(
ASSERT(pPageView);
PDFSDK_FieldAction fa;
- fa.bModifier = m_pEnv->IsCTRLKeyDown(nFlag);
- fa.bShift = m_pEnv->IsSHIFTKeyDown(nFlag);
+ fa.bModifier = m_pFormFillEnv->IsCTRLKeyDown(nFlag);
+ fa.bShift = m_pFormFillEnv->IsSHIFTKeyDown(nFlag);
pFormFiller->GetActionData(pPageView, CPDF_AAction::LoseFocus, fa);
pWidget->OnAAction(CPDF_AAction::LoseFocus, fa, pPageView);
m_bNotifying = FALSE;
@@ -485,22 +485,22 @@ CFFL_FormFiller* CFFL_InteractiveFormFiller::GetFormFiller(
CFFL_FormFiller* pFormFiller;
switch (nFieldType) {
case FIELDTYPE_PUSHBUTTON:
- pFormFiller = new CFFL_PushButton(m_pEnv, pWidget);
+ pFormFiller = new CFFL_PushButton(m_pFormFillEnv, pWidget);
break;
case FIELDTYPE_CHECKBOX:
- pFormFiller = new CFFL_CheckBox(m_pEnv, pWidget);
+ pFormFiller = new CFFL_CheckBox(m_pFormFillEnv, pWidget);
break;
case FIELDTYPE_RADIOBUTTON:
- pFormFiller = new CFFL_RadioButton(m_pEnv, pWidget);
+ pFormFiller = new CFFL_RadioButton(m_pFormFillEnv, pWidget);
break;
case FIELDTYPE_TEXTFIELD:
- pFormFiller = new CFFL_TextField(m_pEnv, pWidget);
+ pFormFiller = new CFFL_TextField(m_pFormFillEnv, pWidget);
break;
case FIELDTYPE_LISTBOX:
- pFormFiller = new CFFL_ListBox(m_pEnv, pWidget);
+ pFormFiller = new CFFL_ListBox(m_pFormFillEnv, pWidget);
break;
case FIELDTYPE_COMBOBOX:
- pFormFiller = new CFFL_ComboBox(m_pEnv, pWidget);
+ pFormFiller = new CFFL_ComboBox(m_pFormFillEnv, pWidget);
break;
case FIELDTYPE_UNKNOWN:
default:
@@ -615,8 +615,8 @@ void CFFL_InteractiveFormFiller::OnKeyStrokeCommit(
pWidget->ClearAppModified();
PDFSDK_FieldAction fa;
- fa.bModifier = m_pEnv->IsCTRLKeyDown(nFlag);
- fa.bShift = m_pEnv->IsSHIFTKeyDown(nFlag);
+ fa.bModifier = m_pFormFillEnv->IsCTRLKeyDown(nFlag);
+ fa.bShift = m_pFormFillEnv->IsSHIFTKeyDown(nFlag);
fa.bWillCommit = TRUE;
fa.bKeyDown = TRUE;
fa.bRC = TRUE;
@@ -647,8 +647,8 @@ void CFFL_InteractiveFormFiller::OnValidate(CPDFSDK_Annot::ObservedPtr* pAnnot,
pWidget->ClearAppModified();
PDFSDK_FieldAction fa;
- fa.bModifier = m_pEnv->IsCTRLKeyDown(nFlag);
- fa.bShift = m_pEnv->IsSHIFTKeyDown(nFlag);
+ fa.bModifier = m_pFormFillEnv->IsCTRLKeyDown(nFlag);
+ fa.bShift = m_pFormFillEnv->IsSHIFTKeyDown(nFlag);
fa.bKeyDown = TRUE;
fa.bRC = TRUE;
@@ -714,8 +714,8 @@ void CFFL_InteractiveFormFiller::OnClick(CPDFSDK_Widget* pWidget,
int nValueAge = pWidget->GetValueAge();
PDFSDK_FieldAction fa;
- fa.bModifier = m_pEnv->IsCTRLKeyDown(nFlag);
- fa.bShift = m_pEnv->IsSHIFTKeyDown(nFlag);
+ fa.bModifier = m_pFormFillEnv->IsCTRLKeyDown(nFlag);
+ fa.bShift = m_pFormFillEnv->IsSHIFTKeyDown(nFlag);
pWidget->OnXFAAAction(PDFSDK_XFA_Click, fa, pPageView);
m_bNotifying = FALSE;
@@ -749,8 +749,8 @@ void CFFL_InteractiveFormFiller::OnFull(CPDFSDK_Widget* pWidget,
int nValueAge = pWidget->GetValueAge();
PDFSDK_FieldAction fa;
- fa.bModifier = m_pEnv->IsCTRLKeyDown(nFlag);
- fa.bShift = m_pEnv->IsSHIFTKeyDown(nFlag);
+ fa.bModifier = m_pFormFillEnv->IsCTRLKeyDown(nFlag);
+ fa.bShift = m_pFormFillEnv->IsSHIFTKeyDown(nFlag);
pWidget->OnXFAAAction(PDFSDK_XFA_Full, fa, pPageView);
m_bNotifying = FALSE;
@@ -812,8 +812,8 @@ void CFFL_InteractiveFormFiller::OnPreOpen(CPDFSDK_Widget* pWidget,
int nValueAge = pWidget->GetValueAge();
PDFSDK_FieldAction fa;
- fa.bModifier = m_pEnv->IsCTRLKeyDown(nFlag);
- fa.bShift = m_pEnv->IsSHIFTKeyDown(nFlag);
+ fa.bModifier = m_pFormFillEnv->IsCTRLKeyDown(nFlag);
+ fa.bShift = m_pFormFillEnv->IsSHIFTKeyDown(nFlag);
pWidget->OnXFAAAction(PDFSDK_XFA_PreOpen, fa, pPageView);
m_bNotifying = FALSE;
@@ -847,8 +847,8 @@ void CFFL_InteractiveFormFiller::OnPostOpen(CPDFSDK_Widget* pWidget,
int nValueAge = pWidget->GetValueAge();
PDFSDK_FieldAction fa;
- fa.bModifier = m_pEnv->IsCTRLKeyDown(nFlag);
- fa.bShift = m_pEnv->IsSHIFTKeyDown(nFlag);
+ fa.bModifier = m_pFormFillEnv->IsCTRLKeyDown(nFlag);
+ fa.bShift = m_pFormFillEnv->IsSHIFTKeyDown(nFlag);
pWidget->OnXFAAAction(PDFSDK_XFA_PostOpen, fa, pPageView);
m_bNotifying = FALSE;
@@ -914,8 +914,8 @@ void CFFL_InteractiveFormFiller::OnBeforeKeyStroke(
pData->pPageView->GetFormFillEnv();
PDFSDK_FieldAction fa;
- fa.bModifier = m_pEnv->IsCTRLKeyDown(nFlag);
- fa.bShift = m_pEnv->IsSHIFTKeyDown(nFlag);
+ fa.bModifier = m_pFormFillEnv->IsCTRLKeyDown(nFlag);
+ fa.bShift = m_pFormFillEnv->IsSHIFTKeyDown(nFlag);
fa.sChange = strChange;
fa.sChangeEx = strChangeEx;
fa.bKeyDown = bKeyDown;
diff --git a/fpdfsdk/formfiller/cffl_interactiveformfiller.h b/fpdfsdk/formfiller/cffl_interactiveformfiller.h
index 1a1af44ebb..70ec43ddd6 100644
--- a/fpdfsdk/formfiller/cffl_interactiveformfiller.h
+++ b/fpdfsdk/formfiller/cffl_interactiveformfiller.h
@@ -21,7 +21,8 @@ class CPDFSDK_Widget;
class CFFL_InteractiveFormFiller : public IPWL_Filler_Notify {
public:
- explicit CFFL_InteractiveFormFiller(CPDFSDK_FormFillEnvironment* pEnv);
+ explicit CFFL_InteractiveFormFiller(
+ CPDFSDK_FormFillEnvironment* pFormFillEnv);
~CFFL_InteractiveFormFiller() override;
FX_BOOL Annot_HitTest(CPDFSDK_PageView* pPageView,
@@ -165,7 +166,7 @@ class CFFL_InteractiveFormFiller : public IPWL_Filler_Notify {
#endif // PDF_ENABLE_XFA
void UnRegisterFormFiller(CPDFSDK_Annot* pAnnot);
- CPDFSDK_FormFillEnvironment* const m_pEnv;
+ CPDFSDK_FormFillEnvironment* const m_pFormFillEnv;
CFFL_Widget2Filler m_Maps;
FX_BOOL m_bNotifying;
};
diff --git a/fpdfsdk/formfiller/cffl_listbox.cpp b/fpdfsdk/formfiller/cffl_listbox.cpp
index d8331e5027..85b907017c 100644
--- a/fpdfsdk/formfiller/cffl_listbox.cpp
+++ b/fpdfsdk/formfiller/cffl_listbox.cpp
@@ -38,8 +38,8 @@ PWL_CREATEPARAM CFFL_ListBox::GetCreateParam() {
cp.fFontSize = FFL_DEFAULTLISTBOXFONTSIZE;
if (!m_pFontMap) {
- m_pFontMap =
- pdfium::MakeUnique<CBA_FontMap>(m_pWidget, m_pEnv->GetSysHandler());
+ m_pFontMap = pdfium::MakeUnique<CBA_FontMap>(
+ m_pWidget, m_pFormFillEnv->GetSysHandler());
}
cp.pFontMap = m_pFontMap.get();
@@ -51,7 +51,7 @@ CPWL_Wnd* CFFL_ListBox::NewPDFWindow(const PWL_CREATEPARAM& cp,
CPWL_ListBox* pWnd = new CPWL_ListBox();
pWnd->AttachFFLData(this);
pWnd->Create(cp);
- pWnd->SetFillerNotify(m_pEnv->GetInteractiveFormFiller());
+ pWnd->SetFillerNotify(m_pFormFillEnv->GetInteractiveFormFiller());
for (int32_t i = 0, sz = m_pWidget->CountOptions(); i < sz; i++)
pWnd->AddString(m_pWidget->GetOptionLabel(i));
diff --git a/fpdfsdk/formfiller/cffl_radiobutton.cpp b/fpdfsdk/formfiller/cffl_radiobutton.cpp
index 73fd18d2af..8186c2f137 100644
--- a/fpdfsdk/formfiller/cffl_radiobutton.cpp
+++ b/fpdfsdk/formfiller/cffl_radiobutton.cpp
@@ -52,8 +52,8 @@ FX_BOOL CFFL_RadioButton::OnChar(CPDFSDK_Annot* pAnnot,
FX_BOOL bReset = FALSE;
FX_BOOL bExit = FALSE;
CPDFSDK_Annot::ObservedPtr pObserved(m_pWidget);
- m_pEnv->GetInteractiveFormFiller()->OnButtonUp(&pObserved, pPageView,
- bReset, bExit, nFlags);
+ m_pFormFillEnv->GetInteractiveFormFiller()->OnButtonUp(
+ &pObserved, pPageView, bReset, bExit, nFlags);
if (!pObserved || bReset || bExit)
return TRUE;
diff --git a/fpdfsdk/formfiller/cffl_textfield.cpp b/fpdfsdk/formfiller/cffl_textfield.cpp
index a2612f17ef..566051c2de 100644
--- a/fpdfsdk/formfiller/cffl_textfield.cpp
+++ b/fpdfsdk/formfiller/cffl_textfield.cpp
@@ -73,8 +73,8 @@ PWL_CREATEPARAM CFFL_TextField::GetCreateParam() {
}
if (!m_pFontMap) {
- m_pFontMap =
- pdfium::MakeUnique<CBA_FontMap>(m_pWidget, m_pEnv->GetSysHandler());
+ m_pFontMap = pdfium::MakeUnique<CBA_FontMap>(
+ m_pWidget, m_pFormFillEnv->GetSysHandler());
}
cp.pFontMap = m_pFontMap.get();
cp.pFocusHandler = this;
@@ -87,7 +87,7 @@ CPWL_Wnd* CFFL_TextField::NewPDFWindow(const PWL_CREATEPARAM& cp,
CPWL_Edit* pWnd = new CPWL_Edit();
pWnd->AttachFFLData(this);
pWnd->Create(cp);
- pWnd->SetFillerNotify(m_pEnv->GetInteractiveFormFiller());
+ pWnd->SetFillerNotify(m_pFormFillEnv->GetInteractiveFormFiller());
int32_t nMaxLen = m_pWidget->GetMaxLen();
CFX_WideString swValue = m_pWidget->GetValue();
@@ -115,8 +115,8 @@ FX_BOOL CFFL_TextField::OnChar(CPDFSDK_Annot* pAnnot,
ASSERT(pPageView);
m_bValid = !m_bValid;
CFX_FloatRect rcAnnot = pAnnot->GetRect();
- m_pEnv->Invalidate(pAnnot->GetUnderlyingPage(), rcAnnot.left,
- rcAnnot.top, rcAnnot.right, rcAnnot.bottom);
+ m_pFormFillEnv->Invalidate(pAnnot->GetUnderlyingPage(), rcAnnot.left,
+ rcAnnot.top, rcAnnot.right, rcAnnot.bottom);
if (m_bValid) {
if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, TRUE))
@@ -271,7 +271,7 @@ FX_BOOL CFFL_TextField::IsFieldFull(CPDFSDK_PageView* pPageView) {
#endif // PDF_ENABLE_XFA
void CFFL_TextField::OnSetFocus(CPWL_Wnd* pWnd) {
- ASSERT(m_pEnv);
+ ASSERT(m_pFormFillEnv);
if (pWnd->GetClassName() == PWL_CLASSNAME_EDIT) {
CPWL_Edit* pEdit = (CPWL_Edit*)pWnd;
pEdit->SetCharSet(FXFONT_GB2312_CHARSET);
@@ -282,6 +282,6 @@ void CFFL_TextField::OnSetFocus(CPWL_Wnd* pWnd) {
int nCharacters = wsText.GetLength();
CFX_ByteString bsUTFText = wsText.UTF16LE_Encode();
unsigned short* pBuffer = (unsigned short*)bsUTFText.c_str();
- m_pEnv->OnSetFieldInputFocus(pBuffer, nCharacters, TRUE);
+ m_pFormFillEnv->OnSetFieldInputFocus(pBuffer, nCharacters, TRUE);
}
}