summaryrefslogtreecommitdiff
path: root/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-07-06 10:40:51 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-07-06 19:10:17 +0000
commitbdb965338673ca2bcef831f20e98b7965b39b2fb (patch)
tree72e1571a777a90eac04d820d5961226011224bc7 /fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
parent2e1a32bc49f2b7b871cf0d04f25ec45b337f06fb (diff)
downloadpdfium-bdb965338673ca2bcef831f20e98b7965b39b2fb.tar.xz
Remove some in/out params from CFFL_InteractiveFormFiller
This CL removes the bExit and bReset in-out params from CFFL_InteractiveFormFiller and switches to using returns. Change-Id: I1617afa3598c02fe56ef02adfb0b1443b5fd0e4a Reviewed-on: https://pdfium-review.googlesource.com/7311 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/formfiller/cffl_interactiveformfiller.cpp')
-rw-r--r--fpdfsdk/formfiller/cffl_interactiveformfiller.cpp28
1 files changed, 10 insertions, 18 deletions
diff --git a/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp b/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
index 682d41cabf..96e7645fb6 100644
--- a/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
+++ b/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
@@ -597,18 +597,16 @@ void CFFL_InteractiveFormFiller::QueryWherePopup(void* pPrivateData,
}
}
-void CFFL_InteractiveFormFiller::OnKeyStrokeCommit(
+bool CFFL_InteractiveFormFiller::OnKeyStrokeCommit(
CPDFSDK_Annot::ObservedPtr* pAnnot,
CPDFSDK_PageView* pPageView,
- bool& bRC,
- bool& bExit,
uint32_t nFlag) {
if (m_bNotifying)
- return;
+ return true;
CPDFSDK_Widget* pWidget = static_cast<CPDFSDK_Widget*>(pAnnot->Get());
if (!pWidget->GetAAction(CPDF_AAction::KeyStroke).GetDict())
- return;
+ return true;
ASSERT(pPageView);
m_bNotifying = true;
@@ -626,23 +624,21 @@ void CFFL_InteractiveFormFiller::OnKeyStrokeCommit(
pFormFiller->SaveState(pPageView);
pWidget->OnAAction(CPDF_AAction::KeyStroke, fa, pPageView);
if (!(*pAnnot))
- return;
+ return true;
- bRC = fa.bRC;
m_bNotifying = false;
+ return fa.bRC;
}
-void CFFL_InteractiveFormFiller::OnValidate(CPDFSDK_Annot::ObservedPtr* pAnnot,
+bool CFFL_InteractiveFormFiller::OnValidate(CPDFSDK_Annot::ObservedPtr* pAnnot,
CPDFSDK_PageView* pPageView,
- bool& bRC,
- bool& bExit,
uint32_t nFlag) {
if (m_bNotifying)
- return;
+ return true;
CPDFSDK_Widget* pWidget = static_cast<CPDFSDK_Widget*>(pAnnot->Get());
if (!pWidget->GetAAction(CPDF_AAction::Validate).GetDict())
- return;
+ return true;
ASSERT(pPageView);
m_bNotifying = true;
@@ -659,15 +655,14 @@ void CFFL_InteractiveFormFiller::OnValidate(CPDFSDK_Annot::ObservedPtr* pAnnot,
pFormFiller->SaveState(pPageView);
pWidget->OnAAction(CPDF_AAction::Validate, fa, pPageView);
if (!(*pAnnot))
- return;
+ return true;
- bRC = fa.bRC;
m_bNotifying = false;
+ return fa.bRC;
}
void CFFL_InteractiveFormFiller::OnCalculate(CPDFSDK_Annot::ObservedPtr* pAnnot,
CPDFSDK_PageView* pPageView,
- bool& bExit,
uint32_t nFlag) {
if (m_bNotifying)
return;
@@ -681,7 +676,6 @@ void CFFL_InteractiveFormFiller::OnCalculate(CPDFSDK_Annot::ObservedPtr* pAnnot,
void CFFL_InteractiveFormFiller::OnFormat(CPDFSDK_Annot::ObservedPtr* pAnnot,
CPDFSDK_PageView* pPageView,
- bool& bExit,
uint32_t nFlag) {
if (m_bNotifying)
return;
@@ -695,8 +689,6 @@ void CFFL_InteractiveFormFiller::OnFormat(CPDFSDK_Annot::ObservedPtr* pAnnot,
pInterForm->OnFormat(pWidget->GetFormField(), bFormatted);
if (!(*pAnnot))
return;
- if (bExit)
- return;
if (bFormatted) {
pInterForm->ResetFieldAppearance(pWidget->GetFormField(), &sValue, true);