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:
parent
e5d42d967f
commit
7754a4acde
1 changed files with 21 additions and 2 deletions
|
@ -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
|
||||
|
||||
// ====================================================================
|
||||
|
|
Loading…
Reference in a new issue