summaryrefslogtreecommitdiff
path: root/fpdfsdk/pwl/cpwl_appstream.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/pwl/cpwl_appstream.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/pwl/cpwl_appstream.h')
-rw-r--r--fpdfsdk/pwl/cpwl_appstream.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/fpdfsdk/pwl/cpwl_appstream.h b/fpdfsdk/pwl/cpwl_appstream.h
index 810e79c9e7..1c3afab592 100644
--- a/fpdfsdk/pwl/cpwl_appstream.h
+++ b/fpdfsdk/pwl/cpwl_appstream.h
@@ -9,6 +9,7 @@
#include "core/fxcrt/fx_string.h"
#include "core/fxcrt/unowned_ptr.h"
+#include "third_party/base/optional.h"
class CPDFSDK_Widget;
class CPDF_Dictionary;
@@ -22,9 +23,9 @@ class CPWL_AppStream {
void SetAsPushButton();
void SetAsCheckBox();
void SetAsRadioButton();
- void SetAsComboBox(const WideString* sValue);
+ void SetAsComboBox(Optional<WideString> sValue);
void SetAsListBox();
- void SetAsTextField(const WideString* sValue);
+ void SetAsTextField(Optional<WideString> sValue);
private:
void AddImage(const ByteString& sAPType, CPDF_Stream* pImage);
@@ -36,8 +37,8 @@ class CPWL_AppStream {
ByteString GetBackgroundAppStream() const;
ByteString GetBorderAppStream() const;
- UnownedPtr<CPDFSDK_Widget> widget_;
- UnownedPtr<CPDF_Dictionary> dict_;
+ UnownedPtr<CPDFSDK_Widget> const widget_;
+ UnownedPtr<CPDF_Dictionary> const dict_;
};
#endif // FPDFSDK_PWL_CPWL_APPSTREAM_H_