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 /sw | |
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 'sw')
-rw-r--r-- | sw/source/uibase/docvw/SidebarTxtControl.cxx | 7 | ||||
-rw-r--r-- | sw/source/uibase/docvw/SidebarTxtControl.hxx | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/sw/source/uibase/docvw/SidebarTxtControl.cxx b/sw/source/uibase/docvw/SidebarTxtControl.cxx index c33e07e999e1..fde45169248d 100644 --- a/sw/source/uibase/docvw/SidebarTxtControl.cxx +++ b/sw/source/uibase/docvw/SidebarTxtControl.cxx @@ -430,6 +430,13 @@ Selection SidebarTextControl::GetSurroundingTextSelection() const return Selection( 0, 0 ); } +bool SidebarTextControl::DeleteSurroundingText(const Selection& rSelection) +{ + if (OutlinerView* pTextView = GetTextView()) + return pTextView->DeleteSurroundingText(rSelection); + return false; +} + css::uno::Reference< css::accessibility::XAccessible > SidebarTextControl::CreateAccessible() { diff --git a/sw/source/uibase/docvw/SidebarTxtControl.hxx b/sw/source/uibase/docvw/SidebarTxtControl.hxx index ab9c7604ee60..def75229cc01 100644 --- a/sw/source/uibase/docvw/SidebarTxtControl.hxx +++ b/sw/source/uibase/docvw/SidebarTxtControl.hxx @@ -46,6 +46,7 @@ class SidebarTextControl : public Control virtual void RequestHelp(const HelpEvent &rEvt) override; virtual OUString GetSurroundingText() const override; virtual Selection GetSurroundingTextSelection() const override; + virtual bool DeleteSurroundingText(const Selection& rSelection) override; public: SidebarTextControl( sw::annotation::SwAnnotationWin& rSidebarWin, |