From b2e6b4c44a38ea2ca9e021df31cd27eb67a45e35 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Thu, 16 Aug 2018 20:53:58 +0000 Subject: Replace optional bool bNotify with enum type. Adds clarity to the call sites. Change-Id: Id4deed9adda2ad79f0847d618792429044d4f7d6 Reviewed-on: https://pdfium-review.googlesource.com/40351 Reviewed-by: Lei Zhang Commit-Queue: Tom Sepez --- fpdfsdk/cpdfsdk_interform.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'fpdfsdk/cpdfsdk_interform.cpp') diff --git a/fpdfsdk/cpdfsdk_interform.cpp b/fpdfsdk/cpdfsdk_interform.cpp index b9256aac35..0e44268b39 100644 --- a/fpdfsdk/cpdfsdk_interform.cpp +++ b/fpdfsdk/cpdfsdk_interform.cpp @@ -327,7 +327,7 @@ void CPDFSDK_InterForm::OnCalculate(CPDF_FormField* pFormField) { Optional err = pContext->RunScript(csJS); if (!err && bRC && sValue.Compare(sOldValue) != 0) - pField->SetValue(sValue, true); + pField->SetValue(sValue, NotificationOption::kNotify); } } @@ -557,19 +557,17 @@ ByteString CPDFSDK_InterForm::ExportFormToFDFTextBuf() { void CPDFSDK_InterForm::DoAction_ResetForm(const CPDF_Action& action) { ASSERT(action.GetDict()); - const CPDF_Dictionary* pActionDict = action.GetDict(); if (!pActionDict->KeyExist("Fields")) { - m_pInterForm->ResetForm(true); + m_pInterForm->ResetForm(NotificationOption::kNotify); return; } - CPDF_ActionFields af(&action); uint32_t dwFlags = action.GetFlags(); - std::vector fieldObjects = af.GetAllFields(); std::vector fields = GetFieldFromObjects(fieldObjects); - m_pInterForm->ResetForm(fields, !(dwFlags & 0x01), true); + m_pInterForm->ResetForm(fields, !(dwFlags & 0x01), + NotificationOption::kNotify); } std::vector CPDFSDK_InterForm::GetFieldFromObjects( -- cgit v1.2.3