summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_ffwidgethandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/cxfa_ffwidgethandler.cpp')
-rw-r--r--xfa/fxfa/cxfa_ffwidgethandler.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/xfa/fxfa/cxfa_ffwidgethandler.cpp b/xfa/fxfa/cxfa_ffwidgethandler.cpp
index 8988cf1903..79e48bab9b 100644
--- a/xfa/fxfa/cxfa_ffwidgethandler.cpp
+++ b/xfa/fxfa/cxfa_ffwidgethandler.cpp
@@ -150,9 +150,7 @@ WideString CXFA_FFWidgetHandler::GetSelectedText(CXFA_FFWidget* widget) {
if (!widget->CanCopy())
return WideString();
- WideString val;
- widget->Copy(val);
- return val;
+ return widget->Copy().value_or(WideString());
}
void CXFA_FFWidgetHandler::PasteText(CXFA_FFWidget* widget,