diff options
author | Ryan Harrison <rharrison@chromium.org> | 2018-01-05 15:40:40 -0500 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-01-05 20:55:18 +0000 |
commit | 245f80c4ae2bde11de8fdff54e736ec4e4296e0a (patch) | |
tree | 4e62bab9aabd17eb1f69e95f9755d5ddb2b144f2 /xfa/fxfa/cxfa_ffcombobox.cpp | |
parent | a172cfb094fe1012d71d556552977c86f2ae639d (diff) | |
download | pdfium-245f80c4ae2bde11de8fdff54e736ec4e4296e0a.tar.xz |
Convert CFWL_Edit Cut & Copy out param to return
Change-Id: I99776deb809609f69275848ddb81706e2cc82c82
Reviewed-on: https://pdfium-review.googlesource.com/22370
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_ffcombobox.cpp')
-rw-r--r-- | xfa/fxfa/cxfa_ffcombobox.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/xfa/fxfa/cxfa_ffcombobox.cpp b/xfa/fxfa/cxfa_ffcombobox.cpp index 58a0f94f9d..13bda7adbb 100644 --- a/xfa/fxfa/cxfa_ffcombobox.cpp +++ b/xfa/fxfa/cxfa_ffcombobox.cpp @@ -232,13 +232,15 @@ bool CXFA_FFComboBox::CanSelectAll() { return ToComboBox(m_pNormalWidget.get())->EditCanSelectAll(); } -bool CXFA_FFComboBox::Copy(WideString& wsCopy) { - return ToComboBox(m_pNormalWidget.get())->EditCopy(wsCopy); +Optional<WideString> CXFA_FFComboBox::Copy() { + return ToComboBox(m_pNormalWidget.get())->EditCopy(); } -bool CXFA_FFComboBox::Cut(WideString& wsCut) { - return m_pDataAcc->IsChoiceListAllowTextEntry() && - ToComboBox(m_pNormalWidget.get())->EditCut(wsCut); +Optional<WideString> CXFA_FFComboBox::Cut() { + if (!m_pDataAcc->IsChoiceListAllowTextEntry()) + return {}; + + return ToComboBox(m_pNormalWidget.get())->EditCut(); } bool CXFA_FFComboBox::Paste(const WideString& wsPaste) { |