summaryrefslogtreecommitdiff
path: root/fpdfsdk/formfiller
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-01-30 18:56:50 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-01-30 18:56:50 +0000
commit8cdea72a82aae5e07aa92e9886dbbe635eb8b7cc (patch)
treeff632b087b2770a117581696384bd0a429d86d55 /fpdfsdk/formfiller
parent95dd8dad6b1b2ac31aca84afe677205c7ed47f7f (diff)
downloadpdfium-8cdea72a82aae5e07aa92e9886dbbe635eb8b7cc.tar.xz
Cleanup duplicate RunScript code
This CL consolidates the duplicate RunScript code in CPDFSDK_ActionHandler. Change-Id: I08beb7644b6cbaa7906e5bb302372fd8a670f32a Reviewed-on: https://pdfium-review.googlesource.com/24630 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/formfiller')
-rw-r--r--fpdfsdk/formfiller/cffl_interactiveformfiller.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp b/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
index e74f902bd2..f33bde68cc 100644
--- a/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
+++ b/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
@@ -129,7 +129,7 @@ void CFFL_InteractiveFormFiller::OnMouseEnter(
PDFSDK_FieldAction fa;
fa.bModifier = CPDFSDK_FormFillEnvironment::IsCTRLKeyDown(nFlag);
fa.bShift = CPDFSDK_FormFillEnvironment::IsSHIFTKeyDown(nFlag);
- pWidget->OnAAction(CPDF_AAction::CursorEnter, fa, pPageView);
+ pWidget->OnAAction(CPDF_AAction::CursorEnter, &fa, pPageView);
m_bNotifying = false;
if (!(*pAnnot))
return;
@@ -162,7 +162,7 @@ void CFFL_InteractiveFormFiller::OnMouseExit(CPDFSDK_PageView* pPageView,
PDFSDK_FieldAction fa;
fa.bModifier = CPDFSDK_FormFillEnvironment::IsCTRLKeyDown(nFlag);
fa.bShift = CPDFSDK_FormFillEnvironment::IsSHIFTKeyDown(nFlag);
- pWidget->OnAAction(CPDF_AAction::CursorExit, fa, pPageView);
+ pWidget->OnAAction(CPDF_AAction::CursorExit, &fa, pPageView);
m_bNotifying = false;
if (!(*pAnnot))
return;
@@ -198,7 +198,7 @@ bool CFFL_InteractiveFormFiller::OnLButtonDown(
PDFSDK_FieldAction fa;
fa.bModifier = CPDFSDK_FormFillEnvironment::IsCTRLKeyDown(nFlags);
fa.bShift = CPDFSDK_FormFillEnvironment::IsSHIFTKeyDown(nFlags);
- pWidget->OnAAction(CPDF_AAction::ButtonDown, fa, pPageView);
+ pWidget->OnAAction(CPDF_AAction::ButtonDown, &fa, pPageView);
m_bNotifying = false;
if (!(*pAnnot))
return true;
@@ -276,7 +276,7 @@ bool CFFL_InteractiveFormFiller::OnButtonUp(CPDFSDK_Annot::ObservedPtr* pAnnot,
PDFSDK_FieldAction fa;
fa.bModifier = CPDFSDK_FormFillEnvironment::IsCTRLKeyDown(nFlag);
fa.bShift = CPDFSDK_FormFillEnvironment::IsSHIFTKeyDown(nFlag);
- pWidget->OnAAction(CPDF_AAction::ButtonUp, fa, pPageView);
+ pWidget->OnAAction(CPDF_AAction::ButtonUp, &fa, pPageView);
m_bNotifying = false;
if (!(*pAnnot) || !IsValidAnnot(pPageView, pWidget))
return true;
@@ -389,7 +389,7 @@ bool CFFL_InteractiveFormFiller::OnSetFocus(CPDFSDK_Annot::ObservedPtr* pAnnot,
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);
+ pWidget->OnAAction(CPDF_AAction::GetFocus, &fa, pPageView);
m_bNotifying = false;
if (!(*pAnnot))
return false;
@@ -440,7 +440,7 @@ bool CFFL_InteractiveFormFiller::OnKillFocus(CPDFSDK_Annot::ObservedPtr* pAnnot,
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);
+ pWidget->OnAAction(CPDF_AAction::LoseFocus, &fa, pPageView);
m_bNotifying = false;
return !!(*pAnnot);
}
@@ -621,7 +621,7 @@ bool CFFL_InteractiveFormFiller::OnKeyStrokeCommit(
CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, false);
pFormFiller->GetActionData(pPageView, CPDF_AAction::KeyStroke, fa);
pFormFiller->SaveState(pPageView);
- pWidget->OnAAction(CPDF_AAction::KeyStroke, fa, pPageView);
+ pWidget->OnAAction(CPDF_AAction::KeyStroke, &fa, pPageView);
if (!(*pAnnot))
return true;
@@ -652,7 +652,7 @@ bool CFFL_InteractiveFormFiller::OnValidate(CPDFSDK_Annot::ObservedPtr* pAnnot,
CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, false);
pFormFiller->GetActionData(pPageView, CPDF_AAction::Validate, fa);
pFormFiller->SaveState(pPageView);
- pWidget->OnAAction(CPDF_AAction::Validate, fa, pPageView);
+ pWidget->OnAAction(CPDF_AAction::Validate, &fa, pPageView);
if (!(*pAnnot))
return true;
@@ -716,7 +716,7 @@ bool CFFL_InteractiveFormFiller::OnClick(CPDFSDK_Annot::ObservedPtr* pAnnot,
fa.bModifier = CPDFSDK_FormFillEnvironment::IsCTRLKeyDown(nFlag);
fa.bShift = CPDFSDK_FormFillEnvironment::IsSHIFTKeyDown(nFlag);
- pWidget->OnXFAAAction(PDFSDK_XFA_Click, fa, pPageView);
+ pWidget->OnXFAAAction(PDFSDK_XFA_Click, &fa, pPageView);
m_bNotifying = false;
if (!(*pAnnot) || !IsValidAnnot(pPageView, pWidget))
return true;
@@ -746,7 +746,7 @@ bool CFFL_InteractiveFormFiller::OnFull(CPDFSDK_Annot::ObservedPtr* pAnnot,
fa.bModifier = CPDFSDK_FormFillEnvironment::IsCTRLKeyDown(nFlag);
fa.bShift = CPDFSDK_FormFillEnvironment::IsSHIFTKeyDown(nFlag);
- pWidget->OnXFAAAction(PDFSDK_XFA_Full, fa, pPageView);
+ pWidget->OnXFAAAction(PDFSDK_XFA_Full, &fa, pPageView);
m_bNotifying = false;
if (!(*pAnnot) || !IsValidAnnot(pPageView, pWidget))
return true;
@@ -799,7 +799,7 @@ bool CFFL_InteractiveFormFiller::OnPreOpen(CPDFSDK_Annot::ObservedPtr* pAnnot,
fa.bModifier = CPDFSDK_FormFillEnvironment::IsCTRLKeyDown(nFlag);
fa.bShift = CPDFSDK_FormFillEnvironment::IsSHIFTKeyDown(nFlag);
- pWidget->OnXFAAAction(PDFSDK_XFA_PreOpen, fa, pPageView);
+ pWidget->OnXFAAAction(PDFSDK_XFA_PreOpen, &fa, pPageView);
m_bNotifying = false;
if (!(*pAnnot) || !IsValidAnnot(pPageView, pWidget))
return true;
@@ -830,7 +830,7 @@ bool CFFL_InteractiveFormFiller::OnPostOpen(CPDFSDK_Annot::ObservedPtr* pAnnot,
fa.bModifier = CPDFSDK_FormFillEnvironment::IsCTRLKeyDown(nFlag);
fa.bShift = CPDFSDK_FormFillEnvironment::IsSHIFTKeyDown(nFlag);
- pWidget->OnXFAAAction(PDFSDK_XFA_PostOpen, fa, pPageView);
+ pWidget->OnXFAAAction(PDFSDK_XFA_PostOpen, &fa, pPageView);
m_bNotifying = false;
if (!(*pAnnot) || !IsValidAnnot(pPageView, pWidget))
return true;
@@ -900,7 +900,7 @@ std::pair<bool, bool> CFFL_InteractiveFormFiller::OnBeforeKeyStroke(
CPDFSDK_Annot::ObservedPtr pObserved(privateData.pWidget);
bool action_status = privateData.pWidget->OnAAction(
- CPDF_AAction::KeyStroke, fa, privateData.pPageView);
+ CPDF_AAction::KeyStroke, &fa, privateData.pPageView);
if (!pObserved || !IsValidAnnot(privateData.pPageView, privateData.pWidget))
return {true, true};