summaryrefslogtreecommitdiff
path: root/fpdfsdk/pwl/cpwl_edit_ctrl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/pwl/cpwl_edit_ctrl.cpp')
-rw-r--r--fpdfsdk/pwl/cpwl_edit_ctrl.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/fpdfsdk/pwl/cpwl_edit_ctrl.cpp b/fpdfsdk/pwl/cpwl_edit_ctrl.cpp
index a852cb6231..1a7b0e4c49 100644
--- a/fpdfsdk/pwl/cpwl_edit_ctrl.cpp
+++ b/fpdfsdk/pwl/cpwl_edit_ctrl.cpp
@@ -59,9 +59,12 @@ CFX_WideString CPWL_EditCtrl::GetSelectedText() {
return CFX_WideString();
}
-void CPWL_EditCtrl::DeleteSelectedText() {
- if (m_pEdit)
- m_pEdit->ClearSelection();
+void CPWL_EditCtrl::ReplaceSelection(const CFX_WideString& text) {
+ if (!m_pEdit)
+ return;
+
+ m_pEdit->ClearSelection();
+ m_pEdit->InsertText(text, FX_CHARSET_Default);
}
void CPWL_EditCtrl::RePosChildWnd() {