diff options
author | Pranav Kant <pranavk@collabora.co.uk> | 2018-02-14 17:33:16 +0530 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2018-03-25 19:59:22 +0200 |
commit | 6fd8f91fad9a5bbd906b1d9a94ff3376e18f0ef2 (patch) | |
tree | cb84349782706623e2917ef8285a1f5270a995f1 /sd/source | |
parent | d19d5a89158cc05c3b6972a36dffe64a2656339f (diff) |
lok IME: support dialogs as well
Change-Id: Ic78da45dadaa5a4e1ca78e20d04974108581121e
Reviewed-on: https://gerrit.libreoffice.org/49714
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: pranavk <pranavk@collabora.co.uk>
(cherry picked from commit 712540224d7c5c8cdb4a5214e2d7963a314c1928)
Diffstat (limited to 'sd/source')
-rw-r--r-- | sd/source/ui/inc/unomodel.hxx | 3 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unomodel.cxx | 36 |
2 files changed, 11 insertions, 28 deletions
diff --git a/sd/source/ui/inc/unomodel.hxx b/sd/source/ui/inc/unomodel.hxx index ff55748e3122..586f3279e06b 100644 --- a/sd/source/ui/inc/unomodel.hxx +++ b/sd/source/ui/inc/unomodel.hxx @@ -239,6 +239,7 @@ public: virtual int getParts() override; virtual OUString getPartName( int nPart ) override; virtual OUString getPartHash( int nPart ) override; + virtual VclPtr<vcl::Window> getDocWindow() override; virtual void setPartMode( int nPartMode ) override; @@ -246,8 +247,6 @@ public: virtual void initializeForTiledRendering(const css::uno::Sequence<css::beans::PropertyValue>& rArguments) override; /// @see vcl::ITiledRenderable::postKeyEvent(). virtual void postKeyEvent(int nType, int nCharCode, int nKeyCode) override; - /// @see vcl::ITiledRenderable::postExtTextInputEvent(). - virtual void postExtTextInputEvent(int nType, const OUString& rText) override; /// @see vcl::ITiledRenderable::postMouseEvent(). virtual void postMouseEvent(int nType, int nX, int nY, int nCount, int nButtons, int nModifier) override; /// @see vcl::ITiledRenderable::setTextSelection(). diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index adb6efc8d8d4..af019e5ffdff 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -2337,6 +2337,16 @@ OUString SdXImpressDocument::getPartHash( int nPart ) return OUString::number(pPage->GetHashCode()); } +VclPtr<vcl::Window> SdXImpressDocument::getDocWindow() +{ + SolarMutexGuard aGuard; + DrawViewShell* pViewShell = GetViewShell(); + VclPtr<vcl::Window> pWindow; + if (pViewShell) + pWindow = pViewShell->GetActiveWindow(); + return pWindow; +} + void SdXImpressDocument::setPartMode( int nPartMode ) { DrawViewShell* pViewSh = GetViewShell(); @@ -2487,32 +2497,6 @@ void SdXImpressDocument::postKeyEvent(int nType, int nCharCode, int nKeyCode) } } -void SdXImpressDocument::postExtTextInputEvent(int nType, const OUString& rText) -{ - SolarMutexGuard aGuard; - - DrawViewShell* pViewShell = GetViewShell(); - if (!pViewShell) - return; - - vcl::Window* pWindow = pViewShell->GetActiveWindow(); - if (!pWindow) - return; - - CommandExtTextInputData aTextInputData(rText, nullptr, 0, 0, false); - switch (nType) - { - case LOK_EXT_TEXTINPUT: - pWindow->PostExtTextInputEvent(VclEventId::ExtTextInput, rText); - break; - case LOK_EXT_TEXTINPUT_END: - pWindow->PostExtTextInputEvent(VclEventId::EndExtTextInput, ""); - break; - default: - assert(false && "Unhandled External Text input event!"); - } -} - void SdXImpressDocument::postMouseEvent(int nType, int nX, int nY, int nCount, int nButtons, int nModifier) { SolarMutexGuard aGuard; |