summaryrefslogtreecommitdiff
path: root/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2017-07-21 17:42:19 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-07-22 00:54:57 +0000
commit60fa2fce1f6fc02b3039166d84ed8ec152312566 (patch)
treea5fe7c1263ccb1620b16b549787e390bb1814dd4 /fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
parentd2be646ae1655ac702c5f304d546a2eb32ad2c54 (diff)
downloadpdfium-60fa2fce1f6fc02b3039166d84ed8ec152312566.tar.xz
Simplify code in CPDFSDK_FormFillEnvironment.chromium/3165
This makes various IsFooKeyDown() methods static. Transitively apply that to callers too. Change-Id: Ia43b1fd62889c1943e0d8407e9696225b05125a8 Reviewed-on: https://pdfium-review.googlesource.com/7190 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fpdfsdk/formfiller/cffl_interactiveformfiller.cpp')
-rw-r--r--fpdfsdk/formfiller/cffl_interactiveformfiller.cpp52
1 files changed, 26 insertions, 26 deletions
diff --git a/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp b/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
index ee74b9928b..8a81f4c40d 100644
--- a/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
+++ b/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
@@ -124,8 +124,8 @@ void CFFL_InteractiveFormFiller::OnMouseEnter(
ASSERT(pPageView);
PDFSDK_FieldAction fa;
- fa.bModifier = m_pFormFillEnv->IsCTRLKeyDown(nFlag);
- fa.bShift = m_pFormFillEnv->IsSHIFTKeyDown(nFlag);
+ fa.bModifier = CPDFSDK_FormFillEnvironment::IsCTRLKeyDown(nFlag);
+ fa.bShift = CPDFSDK_FormFillEnvironment::IsSHIFTKeyDown(nFlag);
pWidget->OnAAction(CPDF_AAction::CursorEnter, fa, pPageView);
m_bNotifying = false;
if (!(*pAnnot))
@@ -158,8 +158,8 @@ void CFFL_InteractiveFormFiller::OnMouseExit(CPDFSDK_PageView* pPageView,
ASSERT(pPageView);
PDFSDK_FieldAction fa;
- fa.bModifier = m_pFormFillEnv->IsCTRLKeyDown(nFlag);
- fa.bShift = m_pFormFillEnv->IsSHIFTKeyDown(nFlag);
+ fa.bModifier = CPDFSDK_FormFillEnvironment::IsCTRLKeyDown(nFlag);
+ fa.bShift = CPDFSDK_FormFillEnvironment::IsSHIFTKeyDown(nFlag);
pWidget->OnAAction(CPDF_AAction::CursorExit, fa, pPageView);
m_bNotifying = false;
if (!(*pAnnot))
@@ -195,8 +195,8 @@ bool CFFL_InteractiveFormFiller::OnLButtonDown(
ASSERT(pPageView);
PDFSDK_FieldAction fa;
- fa.bModifier = m_pFormFillEnv->IsCTRLKeyDown(nFlags);
- fa.bShift = m_pFormFillEnv->IsSHIFTKeyDown(nFlags);
+ fa.bModifier = CPDFSDK_FormFillEnvironment::IsCTRLKeyDown(nFlags);
+ fa.bShift = CPDFSDK_FormFillEnvironment::IsSHIFTKeyDown(nFlags);
pWidget->OnAAction(CPDF_AAction::ButtonDown, fa, pPageView);
m_bNotifying = false;
if (!(*pAnnot))
@@ -273,8 +273,8 @@ bool CFFL_InteractiveFormFiller::OnButtonUp(CPDFSDK_Annot::ObservedPtr* pAnnot,
ASSERT(pPageView);
PDFSDK_FieldAction fa;
- fa.bModifier = m_pFormFillEnv->IsCTRLKeyDown(nFlag);
- fa.bShift = m_pFormFillEnv->IsSHIFTKeyDown(nFlag);
+ fa.bModifier = CPDFSDK_FormFillEnvironment::IsCTRLKeyDown(nFlag);
+ fa.bShift = CPDFSDK_FormFillEnvironment::IsSHIFTKeyDown(nFlag);
pWidget->OnAAction(CPDF_AAction::ButtonUp, fa, pPageView);
m_bNotifying = false;
if (!(*pAnnot) || !IsValidAnnot(pPageView, pWidget))
@@ -386,8 +386,8 @@ bool CFFL_InteractiveFormFiller::OnSetFocus(CPDFSDK_Annot::ObservedPtr* pAnnot,
ASSERT(pPageView);
PDFSDK_FieldAction fa;
- fa.bModifier = m_pFormFillEnv->IsCTRLKeyDown(nFlag);
- fa.bShift = m_pFormFillEnv->IsSHIFTKeyDown(nFlag);
+ fa.bModifier = CPDFSDK_FormFillEnvironment::IsCTRLKeyDown(nFlag);
+ fa.bShift = CPDFSDK_FormFillEnvironment::IsSHIFTKeyDown(nFlag);
pFormFiller->GetActionData(pPageView, CPDF_AAction::GetFocus, fa);
pWidget->OnAAction(CPDF_AAction::GetFocus, fa, pPageView);
m_bNotifying = false;
@@ -437,8 +437,8 @@ bool CFFL_InteractiveFormFiller::OnKillFocus(CPDFSDK_Annot::ObservedPtr* pAnnot,
ASSERT(pPageView);
PDFSDK_FieldAction fa;
- fa.bModifier = m_pFormFillEnv->IsCTRLKeyDown(nFlag);
- fa.bShift = m_pFormFillEnv->IsSHIFTKeyDown(nFlag);
+ fa.bModifier = CPDFSDK_FormFillEnvironment::IsCTRLKeyDown(nFlag);
+ fa.bShift = CPDFSDK_FormFillEnvironment::IsSHIFTKeyDown(nFlag);
pFormFiller->GetActionData(pPageView, CPDF_AAction::LoseFocus, fa);
pWidget->OnAAction(CPDF_AAction::LoseFocus, fa, pPageView);
m_bNotifying = false;
@@ -607,8 +607,8 @@ bool CFFL_InteractiveFormFiller::OnKeyStrokeCommit(
pWidget->ClearAppModified();
PDFSDK_FieldAction fa;
- fa.bModifier = m_pFormFillEnv->IsCTRLKeyDown(nFlag);
- fa.bShift = m_pFormFillEnv->IsSHIFTKeyDown(nFlag);
+ fa.bModifier = CPDFSDK_FormFillEnvironment::IsCTRLKeyDown(nFlag);
+ fa.bShift = CPDFSDK_FormFillEnvironment::IsSHIFTKeyDown(nFlag);
fa.bWillCommit = true;
fa.bKeyDown = true;
fa.bRC = true;
@@ -639,8 +639,8 @@ bool CFFL_InteractiveFormFiller::OnValidate(CPDFSDK_Annot::ObservedPtr* pAnnot,
pWidget->ClearAppModified();
PDFSDK_FieldAction fa;
- fa.bModifier = m_pFormFillEnv->IsCTRLKeyDown(nFlag);
- fa.bShift = m_pFormFillEnv->IsSHIFTKeyDown(nFlag);
+ fa.bModifier = CPDFSDK_FormFillEnvironment::IsCTRLKeyDown(nFlag);
+ fa.bShift = CPDFSDK_FormFillEnvironment::IsSHIFTKeyDown(nFlag);
fa.bKeyDown = true;
fa.bRC = true;
@@ -708,8 +708,8 @@ bool CFFL_InteractiveFormFiller::OnClick(CPDFSDK_Annot::ObservedPtr* pAnnot,
int nValueAge = pWidget->GetValueAge();
PDFSDK_FieldAction fa;
- fa.bModifier = m_pFormFillEnv->IsCTRLKeyDown(nFlag);
- fa.bShift = m_pFormFillEnv->IsSHIFTKeyDown(nFlag);
+ fa.bModifier = CPDFSDK_FormFillEnvironment::IsCTRLKeyDown(nFlag);
+ fa.bShift = CPDFSDK_FormFillEnvironment::IsSHIFTKeyDown(nFlag);
pWidget->OnXFAAAction(PDFSDK_XFA_Click, fa, pPageView);
m_bNotifying = false;
@@ -738,8 +738,8 @@ bool CFFL_InteractiveFormFiller::OnFull(CPDFSDK_Annot::ObservedPtr* pAnnot,
int nValueAge = pWidget->GetValueAge();
PDFSDK_FieldAction fa;
- fa.bModifier = m_pFormFillEnv->IsCTRLKeyDown(nFlag);
- fa.bShift = m_pFormFillEnv->IsSHIFTKeyDown(nFlag);
+ fa.bModifier = CPDFSDK_FormFillEnvironment::IsCTRLKeyDown(nFlag);
+ fa.bShift = CPDFSDK_FormFillEnvironment::IsSHIFTKeyDown(nFlag);
pWidget->OnXFAAAction(PDFSDK_XFA_Full, fa, pPageView);
m_bNotifying = false;
@@ -789,8 +789,8 @@ bool CFFL_InteractiveFormFiller::OnPreOpen(CPDFSDK_Annot::ObservedPtr* pAnnot,
int nValueAge = pWidget->GetValueAge();
PDFSDK_FieldAction fa;
- fa.bModifier = m_pFormFillEnv->IsCTRLKeyDown(nFlag);
- fa.bShift = m_pFormFillEnv->IsSHIFTKeyDown(nFlag);
+ fa.bModifier = CPDFSDK_FormFillEnvironment::IsCTRLKeyDown(nFlag);
+ fa.bShift = CPDFSDK_FormFillEnvironment::IsSHIFTKeyDown(nFlag);
pWidget->OnXFAAAction(PDFSDK_XFA_PreOpen, fa, pPageView);
m_bNotifying = false;
@@ -820,8 +820,8 @@ bool CFFL_InteractiveFormFiller::OnPostOpen(CPDFSDK_Annot::ObservedPtr* pAnnot,
int nValueAge = pWidget->GetValueAge();
PDFSDK_FieldAction fa;
- fa.bModifier = m_pFormFillEnv->IsCTRLKeyDown(nFlag);
- fa.bShift = m_pFormFillEnv->IsSHIFTKeyDown(nFlag);
+ fa.bModifier = CPDFSDK_FormFillEnvironment::IsCTRLKeyDown(nFlag);
+ fa.bShift = CPDFSDK_FormFillEnvironment::IsSHIFTKeyDown(nFlag);
pWidget->OnXFAAAction(PDFSDK_XFA_PostOpen, fa, pPageView);
m_bNotifying = false;
@@ -879,8 +879,8 @@ std::pair<bool, bool> CFFL_InteractiveFormFiller::OnBeforeKeyStroke(
pData->pPageView->GetFormFillEnv();
PDFSDK_FieldAction fa;
- fa.bModifier = m_pFormFillEnv->IsCTRLKeyDown(nFlag);
- fa.bShift = m_pFormFillEnv->IsSHIFTKeyDown(nFlag);
+ fa.bModifier = CPDFSDK_FormFillEnvironment::IsCTRLKeyDown(nFlag);
+ fa.bShift = CPDFSDK_FormFillEnvironment::IsSHIFTKeyDown(nFlag);
fa.sChange = strChange;
fa.sChangeEx = strChangeEx;
fa.bKeyDown = bKeyDown;