summaryrefslogtreecommitdiff
path: root/vcl/source/control/edit.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-10-25 15:27:58 +0000
committerCaolán McNamara <caolanm@redhat.com>2020-10-27 17:00:59 +0100
commitb9405fbc4e19901c78d136895c5ab0437d8450ac (patch)
treef42d180c9f6b4450959ff94d6f40a2ae881d8984 /vcl/source/control/edit.cxx
parent23c30c073495201acb82e6e2e83bb0840f25acce (diff)
Resolves: tdf#137620 add DeleteSurroundingText at vcl::Window level
a) give it a default implementation based on the current one b) re-use code introduced for WeldEditView::DeleteSurroundingText for the EditView containing vcl::Window in impress/draw and various similar Annotation windows Change-Id: I55547c70e90ee394795b5545450cf8131538fad8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104781 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source/control/edit.cxx')
-rw-r--r--vcl/source/control/edit.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 18f4fb70ee66..27eaddaf1949 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -2908,7 +2908,15 @@ OUString Edit::GetSurroundingText() const
Selection Edit::GetSurroundingTextSelection() const
{
- return GetSelection();
+ return GetSelection();
+}
+
+bool Edit::DeleteSurroundingText(const Selection& rSelection)
+{
+ SetSelection(rSelection);
+ DeleteSelected();
+ // maybe we should update mpIMEInfos here
+ return true;
}
FactoryFunction Edit::GetUITestFactory() const