diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-10-25 15:27:58 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-10-27 17:00:59 +0100 |
commit | b9405fbc4e19901c78d136895c5ab0437d8450ac (patch) | |
tree | f42d180c9f6b4450959ff94d6f40a2ae881d8984 /vcl/source/control/edit.cxx | |
parent | 23c30c073495201acb82e6e2e83bb0840f25acce (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.cxx | 10 |
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 |