summaryrefslogtreecommitdiff
path: root/vcl/source/window/window.cxx
diff options
context:
space:
mode:
authorPranav Kant <pranavk@collabora.co.uk>2018-02-07 17:19:58 +0530
committerpranavk <pranavk@collabora.co.uk>2018-02-08 08:40:25 +0100
commit7f9f58f3a304733f7089719a5a65eef8c68c2b8d (patch)
tree3ee9c3b4548304306a7dbd9ed0ab33249d88cc64 /vcl/source/window/window.cxx
parent274825b4180c81540cd0d1b22c5243f1b39fe4db (diff)
sw lok: IME support + unit test
Change-Id: I557493db23dfa3529606050c86161628dbd722e7 Reviewed-on: https://gerrit.libreoffice.org/49354 Reviewed-by: pranavk <pranavk@collabora.co.uk> Tested-by: pranavk <pranavk@collabora.co.uk>
Diffstat (limited to 'vcl/source/window/window.cxx')
-rw-r--r--vcl/source/window/window.cxx20
1 files changed, 19 insertions, 1 deletions
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 22471ada2ff8..a9431e72ac49 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -26,6 +26,7 @@
#include <vcl/help.hxx>
#include <vcl/cursor.hxx>
#include <vcl/svapp.hxx>
+#include <vcl/vclevent.hxx>
#include <vcl/window.hxx>
#include <vcl/syswin.hxx>
#include <vcl/syschild.hxx>
@@ -2069,9 +2070,26 @@ void Window::SetInputContext( const InputContext& rInputContext )
ImplNewInputContext();
}
-void Window::EndExtTextInput()
+void Window::PostExtTextInputEvent(VclEventId nType, const OUString& rText)
{
+ switch (nType)
+ {
+ case VclEventId::ExtTextInput:
+ {
+ SalExtTextInputEvent aEvent { rText, nullptr, rText.getLength(), 0 };
+ ImplWindowFrameProc(this, SalEvent::ExtTextInput, &aEvent);
+ }
+ break;
+ case VclEventId::EndExtTextInput:
+ ImplWindowFrameProc(this, SalEvent::EndExtTextInput, nullptr);
+ break;
+ default:
+ assert(false);
+ }
+}
+void Window::EndExtTextInput()
+{
if ( mpWindowImpl->mbExtTextInput )
ImplGetFrame()->EndExtTextInput( EndExtTextInputFlags::Complete );
}