diff options
Diffstat (limited to 'sd/source/ui/view/sdwindow.cxx')
-rw-r--r-- | sd/source/ui/view/sdwindow.cxx | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/sd/source/ui/view/sdwindow.cxx b/sd/source/ui/view/sdwindow.cxx index 434e55483c53..e3c3ab3a7e95 100644 --- a/sd/source/ui/view/sdwindow.cxx +++ b/sd/source/ui/view/sdwindow.cxx @@ -37,6 +37,9 @@ #include <sfx2/viewfrm.hxx> +#include <svx/outliner.hxx>
+
+#include <svx/editview.hxx> #include "app.hrc" #include "helpids.h" @@ -1206,4 +1209,38 @@ void Window::DropScroll(const Point& rMousePos) } } +XubString Window::GetSurroundingText() const
+{
+ if ( mpViewShell->GetShellType() == ViewShell::ST_OUTLINE )
+ {
+ return XubString();
+ }
+ else if ( mpViewShell->GetView()->IsTextEdit() )
+ {
+ OutlinerView *pOLV = mpViewShell->GetView()->GetTextEditOutlinerView();
+ return pOLV->GetEditView().GetSurroundingText();
+ }
+ else
+ {
+ return XubString();
+ }
+}
+
+Selection Window::GetSurroundingTextSelection() const
+{
+ if ( mpViewShell->GetShellType() == ViewShell::ST_OUTLINE )
+ {
+ return Selection( 0, 0 );
+ }
+ else if ( mpViewShell->GetView()->IsTextEdit() )
+ {
+ OutlinerView *pOLV = mpViewShell->GetView()->GetTextEditOutlinerView();
+ return pOLV->GetEditView().GetSurroundingTextSelection();
+ }
+ else
+ {
+ return Selection( 0, 0 );
+ }
+}
+ } // end of namespace sd |