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.
This commit is contained in:
Vladimir Glazounov 2008-07-01 22:02:01 +00:00
parent e5d42d967f
commit 7754a4acde

View file

@ -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<ViewShell> pViewShell = mrBase.GetMainViewShell();
if (pViewShell.get() != NULL)
{
::Window* pWindow = pViewShell->GetActiveWindow();
if (pWindow != NULL)
{
pWindow->Command(rEvent);
}
}
}
} // end of anonymouse namespace
// ====================================================================