summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2015-01-12 16:35:10 +0900
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-01-12 11:06:46 +0100
commit723b6a07e4c4dfb8fdafc186041557514b014014 (patch)
tree92a693499c490822bd813b49bea9e3e030c507ce /desktop
parent9f77740d8b8112de1b157abd892307e057b4f265 (diff)
jni: add postKeyEvent to Office and redirect the call to LOK
Change-Id: I922ce1f735df236d2bdad33820ed98f18fc85963
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/lib/lokandroid.cxx16
1 files changed, 13 insertions, 3 deletions
diff --git a/desktop/source/lib/lokandroid.cxx b/desktop/source/lib/lokandroid.cxx
index 06da8a97d423..773cba54a12f 100644
--- a/desktop/source/lib/lokandroid.cxx
+++ b/desktop/source/lib/lokandroid.cxx
@@ -51,14 +51,16 @@ const char* copyJavaString(JNIEnv* pEnv, jstring aJavaString)
} // anonymous namespace
-extern "C" SAL_JNI_EXPORT jstring JNICALL Java_org_libreoffice_kit_Office_getError(JNIEnv* pEnv, jobject aObject)
+extern "C" SAL_JNI_EXPORT jstring JNICALL Java_org_libreoffice_kit_Office_getError
+ (JNIEnv* pEnv, jobject aObject)
{
LibreOfficeKit* pLibreOfficeKit = getHandle<LibreOfficeKit>(pEnv, aObject);
char* pError = pLibreOfficeKit->pClass->getError(pLibreOfficeKit);
return pEnv->NewStringUTF(pError);
}
-extern "C" SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Office_destroy(JNIEnv* pEnv, jobject aObject)
+extern "C" SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Office_destroy
+ (JNIEnv* pEnv, jobject aObject)
{
LibreOfficeKit* pLibreOfficeKit = getHandle<LibreOfficeKit>(pEnv, aObject);
pLibreOfficeKit->pClass->destroy(pLibreOfficeKit);
@@ -73,6 +75,13 @@ extern "C" SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Office_destroyAn
_exit(0);
}
+extern "C" SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Office_postKeyEvent
+ (JNIEnv* pEnv, jobject aObject, jint nType, jint nCode)
+{
+ LibreOfficeKit* pLibreOfficeKit = getHandle<LibreOfficeKit>(pEnv, aObject);
+ pLibreOfficeKit->pClass->postKeyEvent(pLibreOfficeKit, nType, nCode);
+}
+
namespace
{
@@ -122,7 +131,8 @@ void messageCallback(int nType, const char* pPayload, void* pData)
} // anonymous namespace
-extern "C" SAL_JNI_EXPORT jobject JNICALL Java_org_libreoffice_kit_Office_documentLoadNative(JNIEnv* pEnv, jobject aObject, jstring documentPath)
+extern "C" SAL_JNI_EXPORT jobject JNICALL Java_org_libreoffice_kit_Office_documentLoadNative
+ (JNIEnv* pEnv, jobject aObject, jstring documentPath)
{
const char* aCloneDocumentPath = copyJavaString(pEnv, documentPath);
LibreOfficeKit* pLibreOfficeKit = getHandle<LibreOfficeKit>(pEnv, aObject);