summaryrefslogtreecommitdiff
path: root/desktop/source/lib/init.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 /desktop/source/lib/init.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 'desktop/source/lib/init.cxx')
-rw-r--r--desktop/source/lib/init.cxx19
1 files changed, 19 insertions, 0 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index ab7b72d526dc..2165a781725a 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -540,6 +540,9 @@ static void doc_postKeyEvent(LibreOfficeKitDocument* pThis,
int nType,
int nCharCode,
int nKeyCode);
+static void doc_postExtTextInputEvent(LibreOfficeKitDocument* pThis,
+ int nType,
+ const char* pText);
static void doc_postWindowKeyEvent(LibreOfficeKitDocument* pThis,
unsigned nLOKWindowId,
int nType,
@@ -633,6 +636,7 @@ LibLODocument_Impl::LibLODocument_Impl(const uno::Reference <css::lang::XCompone
m_pDocumentClass->initializeForRendering = doc_initializeForRendering;
m_pDocumentClass->registerCallback = doc_registerCallback;
m_pDocumentClass->postKeyEvent = doc_postKeyEvent;
+ m_pDocumentClass->postExtTextInputEvent = doc_postExtTextInputEvent;
m_pDocumentClass->postWindowKeyEvent = doc_postWindowKeyEvent;
m_pDocumentClass->postMouseEvent = doc_postMouseEvent;
m_pDocumentClass->postWindowMouseEvent = doc_postWindowMouseEvent;
@@ -2288,9 +2292,24 @@ static void doc_postKeyEvent(LibreOfficeKitDocument* pThis, int nType, int nChar
gImpl->maLastExceptionMsg = "Document doesn't support tiled rendering";
return;
}
+
pDoc->postKeyEvent(nType, nCharCode, nKeyCode);
}
+static void doc_postExtTextInputEvent(LibreOfficeKitDocument* pThis, int nType, const char* pText)
+{
+ SolarMutexGuard aGuard;
+
+ ITiledRenderable* pDoc = getTiledRenderable(pThis);
+ if (!pDoc)
+ {
+ gImpl->maLastExceptionMsg = "Document doesn't support tiled rendering";
+ return;
+ }
+
+ pDoc->postExtTextInputEvent(nType, OUString::fromUtf8(OString(pText, strlen(pText))));
+}
+
static void doc_postWindowKeyEvent(LibreOfficeKitDocument* /*pThis*/, unsigned nLOKWindowId, int nType, int nCharCode, int nKeyCode)
{
SolarMutexGuard aGuard;