diff options
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/inc/Window.hxx | 2 | ||||
-rw-r--r-- | sd/source/ui/inc/unomodel.hxx | 2 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unomodel.cxx | 28 |
3 files changed, 31 insertions, 1 deletions
diff --git a/sd/source/ui/inc/Window.hxx b/sd/source/ui/inc/Window.hxx index be2bb1af4e11..dca72fbdc519 100644 --- a/sd/source/ui/inc/Window.hxx +++ b/sd/source/ui/inc/Window.hxx @@ -147,6 +147,7 @@ public: */ void SetUseDropScroll (bool bUseDropScroll); void DropScroll (const Point& rMousePos); + virtual void KeyInput(const KeyEvent& rKEvt) SAL_OVERRIDE; protected: ::sd::Window* mpShareWin; Point maWinPos; @@ -171,7 +172,6 @@ protected: virtual void Resize() SAL_OVERRIDE; virtual void PrePaint() SAL_OVERRIDE; virtual void Paint(const Rectangle& rRect) SAL_OVERRIDE; - virtual void KeyInput(const KeyEvent& rKEvt) SAL_OVERRIDE; virtual void MouseMove(const MouseEvent& rMEvt) SAL_OVERRIDE; virtual void MouseButtonUp(const MouseEvent& rMEvt) SAL_OVERRIDE; virtual void MouseButtonDown(const MouseEvent& rMEvt) SAL_OVERRIDE; diff --git a/sd/source/ui/inc/unomodel.hxx b/sd/source/ui/inc/unomodel.hxx index bb840f2b1983..b9c17ac4ba4e 100644 --- a/sd/source/ui/inc/unomodel.hxx +++ b/sd/source/ui/inc/unomodel.hxx @@ -245,6 +245,8 @@ public: virtual void initializeForTiledRendering() SAL_OVERRIDE; /// @see vcl::ITiledRenderable::registerCallback(). virtual void registerCallback(LibreOfficeKitCallback pCallback, void* pData) SAL_OVERRIDE; + /// @see vcl::ITiledRenderable::postKeyEvent(). + virtual void postKeyEvent(int nType, int nCharCode, int nKeyCode) SAL_OVERRIDE; /// @see vcl::ITiledRenderable::postMouseEvent(). virtual void postMouseEvent(int nType, int nX, int nY, int nCount) SAL_OVERRIDE; /// @see vcl::ITiledRenderable::setTextSelection(). diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index 9cb8df9acd93..e2ab4f8bde16 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -2378,6 +2378,34 @@ void SdXImpressDocument::registerCallback(LibreOfficeKitCallback pCallback, void mpDoc->registerLibreOfficeKitCallback(pCallback, pData); } +void SdXImpressDocument::postKeyEvent(int nType, int nCharCode, int nKeyCode) +{ + SolarMutexGuard aGuard; + + DrawViewShell* pViewShell = GetViewShell(); + if (!pViewShell) + return; + + sd::Window* pWindow = pViewShell->GetActiveWindow(); + if (!pWindow) + return; + + KeyEvent aEvent(nCharCode, nKeyCode, 0); + + switch (nType) + { + case LOK_KEYEVENT_KEYINPUT: + pWindow->KeyInput(aEvent); + break; + case LOK_KEYEVENT_KEYUP: + pWindow->KeyUp(aEvent); + break; + default: + assert(false); + break; + } +} + void SdXImpressDocument::postMouseEvent(int nType, int nX, int nY, int nCount) { SolarMutexGuard aGuard; |