summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfformfill.cpp
diff options
context:
space:
mode:
authorRyan Harrison <rharrison@chromium.org>2018-01-05 15:40:40 -0500
committerChromium commit bot <commit-bot@chromium.org>2018-01-05 20:55:18 +0000
commit245f80c4ae2bde11de8fdff54e736ec4e4296e0a (patch)
tree4e62bab9aabd17eb1f69e95f9755d5ddb2b144f2 /fpdfsdk/fpdfformfill.cpp
parenta172cfb094fe1012d71d556552977c86f2ae639d (diff)
downloadpdfium-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 'fpdfsdk/fpdfformfill.cpp')
-rw-r--r--fpdfsdk/fpdfformfill.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/fpdfsdk/fpdfformfill.cpp b/fpdfsdk/fpdfformfill.cpp
index d70b678206..3d61336d13 100644
--- a/fpdfsdk/fpdfformfill.cpp
+++ b/fpdfsdk/fpdfformfill.cpp
@@ -500,8 +500,8 @@ FPDF_EXPORT void FPDF_CALLCONV FPDF_Widget_Copy(FPDF_DOCUMENT document,
if (!pContext->ContainsXFAForm())
return;
- WideString wsCpText;
- static_cast<CXFA_FFWidget*>(hWidget)->Copy(wsCpText);
+ WideString wsCpText =
+ static_cast<CXFA_FFWidget*>(hWidget)->Copy().value_or(WideString());
ByteString bsCpText = wsCpText.UTF16LE_Encode();
uint32_t len = bsCpText.GetLength() / sizeof(unsigned short);
@@ -531,8 +531,8 @@ FPDF_EXPORT void FPDF_CALLCONV FPDF_Widget_Cut(FPDF_DOCUMENT document,
if (!pContext->ContainsXFAForm())
return;
- WideString wsCpText;
- static_cast<CXFA_FFWidget*>(hWidget)->Cut(wsCpText);
+ WideString wsCpText =
+ static_cast<CXFA_FFWidget*>(hWidget)->Cut().value_or(WideString());
ByteString bsCpText = wsCpText.UTF16LE_Encode();
uint32_t len = bsCpText.GetLength() / sizeof(unsigned short);