From bdb965338673ca2bcef831f20e98b7965b39b2fb Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Thu, 6 Jul 2017 10:40:51 -0400 Subject: 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 Commit-Queue: dsinclair --- fpdfsdk/formfiller/cffl_interactiveformfiller.cpp | 28 ++++++++--------------- 1 file changed, 10 insertions(+), 18 deletions(-) (limited to 'fpdfsdk/formfiller/cffl_interactiveformfiller.cpp') 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(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(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); -- cgit v1.2.3