From 7754a4acdee910aaefbd9a3e01befd77e66800e9 Mon Sep 17 00:00:00 2001 From: Vladimir Glazounov Date: Tue, 1 Jul 2008 22:02:01 +0000 Subject: [PATCH] INTEGRATION: CWS impress143 (1.42.20); FILE MERGED 2008/05/14 09:53:43 af 1.42.20.1: #i83848# Fixed forwarding of key input. --- sd/source/ui/view/ViewShellBase.cxx | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx index 96cec808127a..64385d1d6785 100644 --- a/sd/source/ui/view/ViewShellBase.cxx +++ b/sd/source/ui/view/ViewShellBase.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: ViewShellBase.cxx,v $ - * $Revision: 1.43 $ + * $Revision: 1.44 $ * * This file is part of OpenOffice.org. * @@ -218,7 +218,8 @@ class FocusForwardingWindow : public ::Window public: FocusForwardingWindow (::Window& rParentWindow, ViewShellBase& rBase); virtual ~FocusForwardingWindow (void); - virtual void KeyInput (const KeyEvent& rKEvt); + virtual void KeyInput (const KeyEvent& rEvent); + virtual void Command (const CommandEvent& rEvent); private: ViewShellBase& mrBase; @@ -1729,10 +1730,28 @@ void FocusForwardingWindow::KeyInput (const KeyEvent& rKEvt) pWindow->GrabFocus(); // Forward the key press as well. pWindow->KeyInput(rKEvt); + ::Window::KeyInput(rKEvt); } } } + + + +void FocusForwardingWindow::Command (const CommandEvent& rEvent) +{ + ::boost::shared_ptr pViewShell = mrBase.GetMainViewShell(); + if (pViewShell.get() != NULL) + { + ::Window* pWindow = pViewShell->GetActiveWindow(); + if (pWindow != NULL) + { + pWindow->Command(rEvent); + } + } +} + + } // end of anonymouse namespace // ====================================================================