summaryrefslogtreecommitdiff
path: root/fpdfsdk/formfiller
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/formfiller')
-rw-r--r--fpdfsdk/formfiller/cffl_interactiveformfiller.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp b/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
index 329224d2b2..cb36de732e 100644
--- a/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
+++ b/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
@@ -718,13 +718,12 @@ void CFFL_InteractiveFormFiller::OnFormat(CPDFSDK_Annot::ObservedPtr* pAnnot,
ASSERT(pWidget);
CPDFSDK_InterForm* pInterForm = pPageView->GetFormFillEnv()->GetInterForm();
- bool bFormatted = false;
- WideString sValue = pInterForm->OnFormat(pWidget->GetFormField(), bFormatted);
+ Optional<WideString> sValue = pInterForm->OnFormat(pWidget->GetFormField());
if (!(*pAnnot))
return;
- if (bFormatted) {
- pInterForm->ResetFieldAppearance(pWidget->GetFormField(), &sValue, true);
+ if (sValue.has_value()) {
+ pInterForm->ResetFieldAppearance(pWidget->GetFormField(), sValue, true);
pInterForm->UpdateField(pWidget->GetFormField());
}