summaryrefslogtreecommitdiff
path: root/fpdfsdk/cpdfsdk_interform.h
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-10-10 18:44:45 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-10-10 18:44:45 +0000
commit4f261fffddddd97602e88fe462fef1a18a0b4782 (patch)
treee3a93a859d189a5fe46791d7954396b2b394cbd4 /fpdfsdk/cpdfsdk_interform.h
parentb353f8c32b2d17cbea5ace6eb5f7edb8663e37be (diff)
downloadpdfium-4f261fffddddd97602e88fe462fef1a18a0b4782.tar.xz
Get rid of non-const ref parameter in CPDFSDK_InterForm::OnFormat().
Return Optional<WideString> instead. Change the call stack to accept Optional<WideString>. Change-Id: I020589fac8a1de4974070268a19b4acad64c4092 Reviewed-on: https://pdfium-review.googlesource.com/c/43601 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fpdfsdk/cpdfsdk_interform.h')
-rw-r--r--fpdfsdk/cpdfsdk_interform.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/fpdfsdk/cpdfsdk_interform.h b/fpdfsdk/cpdfsdk_interform.h
index 1862fdbe2c..2a34c23748 100644
--- a/fpdfsdk/cpdfsdk_interform.h
+++ b/fpdfsdk/cpdfsdk_interform.h
@@ -16,6 +16,7 @@
#include "core/fxcrt/unowned_ptr.h"
#include "core/fxge/fx_dib.h"
#include "fpdfsdk/cpdfsdk_widget.h"
+#include "third_party/base/optional.h"
class CPDF_Dictionary;
class CPDF_FormControl;
@@ -66,10 +67,10 @@ class CPDFSDK_InterForm final : public IPDF_FormNotify {
bool OnKeyStrokeCommit(CPDF_FormField* pFormField, const WideString& csValue);
bool OnValidate(CPDF_FormField* pFormField, const WideString& csValue);
void OnCalculate(CPDF_FormField* pFormField);
- WideString OnFormat(CPDF_FormField* pFormField, bool& bFormatted);
+ Optional<WideString> OnFormat(CPDF_FormField* pFormField);
void ResetFieldAppearance(CPDF_FormField* pFormField,
- const WideString* sValue,
+ Optional<WideString> sValue,
bool bValueChanged);
void UpdateField(CPDF_FormField* pFormField);