summaryrefslogtreecommitdiff
path: root/fpdfsdk/cpdfsdk_interform.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-08-16 20:53:58 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-08-16 20:53:58 +0000
commitb2e6b4c44a38ea2ca9e021df31cd27eb67a45e35 (patch)
tree8e9392c73c3905d38d9e9e636adf8df9c7af072e /fpdfsdk/cpdfsdk_interform.cpp
parentaa987a9a895d42749c0f5e4092618fe7ded6667e (diff)
downloadpdfium-b2e6b4c44a38ea2ca9e021df31cd27eb67a45e35.tar.xz
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>
Diffstat (limited to 'fpdfsdk/cpdfsdk_interform.cpp')
-rw-r--r--fpdfsdk/cpdfsdk_interform.cpp10
1 files changed, 4 insertions, 6 deletions
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<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 @@ 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<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(