summaryrefslogtreecommitdiff
path: root/fpdfsdk/formfiller/cffl_formfiller.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_formfiller.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_formfiller.cpp')
-rw-r--r--fpdfsdk/formfiller/cffl_formfiller.cpp31
1 files changed, 12 insertions, 19 deletions
diff --git a/fpdfsdk/formfiller/cffl_formfiller.cpp b/fpdfsdk/formfiller/cffl_formfiller.cpp
index 281f0d74a7..f45a52cd21 100644
--- a/fpdfsdk/formfiller/cffl_formfiller.cpp
+++ b/fpdfsdk/formfiller/cffl_formfiller.cpp
@@ -485,43 +485,36 @@ CFX_FloatRect CFFL_FormFiller::FFLtoWnd(CPDFSDK_PageView* pPageView,
bool CFFL_FormFiller::CommitData(CPDFSDK_PageView* pPageView, uint32_t nFlag) {
if (IsDataChanged(pPageView)) {
- bool bRC = true;
- bool bExit = false;
CFFL_InteractiveFormFiller* pFormFiller =
m_pFormFillEnv->GetInteractiveFormFiller();
CPDFSDK_Annot::ObservedPtr pObserved(m_pWidget.Get());
- pFormFiller->OnKeyStrokeCommit(&pObserved, pPageView, bRC, bExit, nFlag);
- if (!pObserved)
- return false;
- if (bExit)
- return true;
- if (!bRC) {
+
+ if (!pFormFiller->OnKeyStrokeCommit(&pObserved, pPageView, nFlag)) {
+ if (!pObserved)
+ return false;
ResetPDFWindow(pPageView, false);
return true;
}
-
- pFormFiller->OnValidate(&pObserved, pPageView, bRC, bExit, nFlag);
if (!pObserved)
return false;
- if (bExit)
- return true;
- if (!bRC) {
+
+ if (!pFormFiller->OnValidate(&pObserved, pPageView, nFlag)) {
+ if (!pObserved)
+ return false;
ResetPDFWindow(pPageView, false);
return true;
}
+ if (!pObserved)
+ return false;
SaveData(pPageView);
- pFormFiller->OnCalculate(&pObserved, pPageView, bExit, nFlag);
+ pFormFiller->OnCalculate(&pObserved, pPageView, nFlag);
if (!pObserved)
return false;
- if (bExit)
- return true;
- pFormFiller->OnFormat(&pObserved, pPageView, bExit, nFlag);
+ pFormFiller->OnFormat(&pObserved, pPageView, nFlag);
if (!pObserved)
return false;
- if (bExit)
- return true;
}
return true;
}