diff options
Diffstat (limited to 'sd/source')
-rw-r--r-- | sd/source/ui/annotations/annotationwindow.cxx | 7 | ||||
-rw-r--r-- | sd/source/ui/annotations/annotationwindow.hxx | 1 | ||||
-rw-r--r-- | sd/source/ui/inc/Window.hxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/sdwindow.cxx | 17 |
4 files changed, 27 insertions, 0 deletions
diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx index 5bafcbf1e6d5..b9297961f82a 100644 --- a/sd/source/ui/annotations/annotationwindow.cxx +++ b/sd/source/ui/annotations/annotationwindow.cxx @@ -228,6 +228,13 @@ Selection AnnotationTextWindow::GetSurroundingTextSelection() const return Selection( 0, 0 ); } +bool AnnotationTextWindow::DeleteSurroundingText(const Selection& rSelection) +{ + if( mpOutlinerView ) + return mpOutlinerView->DeleteSurroundingText(rSelection); + return false; +} + /************** AnnotationWindow***********************************++*/ AnnotationWindow::AnnotationWindow( AnnotationManagerImpl& rManager, DrawDocShell* pDocShell, vcl::Window* pParent ) diff --git a/sd/source/ui/annotations/annotationwindow.hxx b/sd/source/ui/annotations/annotationwindow.hxx index c57b4bdfce93..3d84202023f2 100644 --- a/sd/source/ui/annotations/annotationwindow.hxx +++ b/sd/source/ui/annotations/annotationwindow.hxx @@ -64,6 +64,7 @@ public: virtual OUString GetSurroundingText() const override; virtual Selection GetSurroundingTextSelection() const override; + virtual bool DeleteSurroundingText(const Selection& rSelection) override; }; class AnnotationWindow : public FloatingWindow diff --git a/sd/source/ui/inc/Window.hxx b/sd/source/ui/inc/Window.hxx index a33b009e1b1c..cbbe7311c086 100644 --- a/sd/source/ui/inc/Window.hxx +++ b/sd/source/ui/inc/Window.hxx @@ -191,6 +191,8 @@ protected: OUString GetSurroundingText() const override; Selection GetSurroundingTextSelection() const override; + bool DeleteSurroundingText(const Selection& rSelection) override; + /// @see Window::LogicInvalidate(). void LogicInvalidate(const ::tools::Rectangle* pRectangle) override; /// Same as MouseButtonDown(), but coordinates are in logic unit. diff --git a/sd/source/ui/view/sdwindow.cxx b/sd/source/ui/view/sdwindow.cxx index bb71ade2f70f..1f99312b51ad 100644 --- a/sd/source/ui/view/sdwindow.cxx +++ b/sd/source/ui/view/sdwindow.cxx @@ -1003,6 +1003,23 @@ Selection Window::GetSurroundingTextSelection() const } } +bool Window::DeleteSurroundingText(const Selection& rSelection) +{ + if ( mpViewShell->GetShellType() == ViewShell::ST_OUTLINE ) + { + return false; + } + else if ( mpViewShell->GetView()->IsTextEdit() ) + { + OutlinerView *pOLV = mpViewShell->GetView()->GetTextEditOutlinerView(); + return pOLV->GetEditView().DeleteSurroundingText(rSelection); + } + else + { + return false; + } +} + void Window::LogicInvalidate(const ::tools::Rectangle* pRectangle) { DrawViewShell* pDrawViewShell = dynamic_cast<DrawViewShell*>(mpViewShell); |