summaryrefslogtreecommitdiff
path: root/sd/source/ui/view/outlview.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/view/outlview.cxx')
-rw-r--r--sd/source/ui/view/outlview.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx
index cd78739dfaac..f8f97bffc26c 100644
--- a/sd/source/ui/view/outlview.cxx
+++ b/sd/source/ui/view/outlview.cxx
@@ -65,6 +65,7 @@
#include "strings.hrc"
#include "EventMultiplexer.hxx"
#include "ViewShellBase.hxx"
+#include "ViewShellManager.hxx"
#include "undo/undoobjects.hxx"
#include "undo/undomanager.hxx"
#include "stlsheet.hxx"
@@ -208,7 +209,15 @@ OutlineView::~OutlineView()
void OutlineView::ConnectToApplication (void)
{
- mrOutlineViewShell.GetActiveWindow()->GrabFocus();
+ // When the mode is switched to outline the main view shell grabs focus.
+ // This is done for getting cut/copy/paste commands on slides in the left
+ // pane (slide sorter view shell) to work properly.
+ SfxShell* pTopViewShell = mrOutlineViewShell.GetViewShellBase().GetViewShellManager()->GetTopViewShell();
+ if (pTopViewShell && pTopViewShell == &mrOutlineViewShell)
+ {
+ mrOutlineViewShell.GetActiveWindow()->GrabFocus();
+ }
+
Application::AddEventListener(LINK(this, OutlineView, AppEventListenerHdl));
}