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 <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/fpdfsdk/cpdfsdk_interform.cpp b/fpdfsdk/cpdfsdk_interform.cpp
index b9256aa..0e44268 100644
--- a/fpdfsdk/cpdfsdk_interform.cpp
+++ b/fpdfsdk/cpdfsdk_interform.cpp
@@ -327,7 +327,7 @@
Optional<IJS_Runtime::JS_Error> err = pContext->RunScript(csJS);
if (!err && bRC && sValue.Compare(sOldValue) != 0)
- pField->SetValue(sValue, true);
+ pField->SetValue(sValue, NotificationOption::kNotify);
}
}
@@ -557,19 +557,17 @@
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<const CPDF_Object*> fieldObjects = af.GetAllFields();
std::vector<CPDF_FormField*> fields = GetFieldFromObjects(fieldObjects);
- m_pInterForm->ResetForm(fields, !(dwFlags & 0x01), true);
+ m_pInterForm->ResetForm(fields, !(dwFlags & 0x01),
+ NotificationOption::kNotify);
}
std::vector<CPDF_FormField*> CPDFSDK_InterForm::GetFieldFromObjects(