[Libreoffice-commits] core.git: Branch 'feature/tiled-editing' - android/Bootstrap desktop/source

Tomaž Vajngerl tomaz.vajngerl at collabora.co.uk
Sun Jan 11 23:43:14 PST 2015


 android/Bootstrap/src/org/libreoffice/kit/Office.java |    2 ++
 desktop/source/lib/lokandroid.cxx                     |   16 +++++++++++++---
 2 files changed, 15 insertions(+), 3 deletions(-)

New commits:
commit d1b6b3f33d8aa667cb383099b3b8e466f50d516c
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date:   Mon Jan 12 16:35:10 2015 +0900

    jni: add postKeyEvent to Office and redirect the call to LOK
    
    Change-Id: I922ce1f735df236d2bdad33820ed98f18fc85963

diff --git a/android/Bootstrap/src/org/libreoffice/kit/Office.java b/android/Bootstrap/src/org/libreoffice/kit/Office.java
index e7d26c5..8759e85 100644
--- a/android/Bootstrap/src/org/libreoffice/kit/Office.java
+++ b/android/Bootstrap/src/org/libreoffice/kit/Office.java
@@ -32,6 +32,8 @@ public class Office {
         return document;
     }
 
+    public native void postKeyEvent(int type, int code);
+
     public native void destroy();
     public native void destroyAndExit();
 }
diff --git a/desktop/source/lib/lokandroid.cxx b/desktop/source/lib/lokandroid.cxx
index 06da8a9..773cba5 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);


More information about the Libreoffice-commits mailing list