From 81f1c259275a43308636d8e9a4c48e67eadaae60 Mon Sep 17 00:00:00 2001 From: Tomaž Vajngerl Date: Sun, 10 Aug 2014 22:16:24 +0200 Subject: LOKit android: add support for setPartMode and getPartName Change-Id: Idd8bd4d4b148e88c7badd06fefb7cfcfc24ec9ea --- desktop/source/lib/lokandroid.cxx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'desktop') diff --git a/desktop/source/lib/lokandroid.cxx b/desktop/source/lib/lokandroid.cxx index 68ebfdf4d2ac..16e7217627a0 100644 --- a/desktop/source/lib/lokandroid.cxx +++ b/desktop/source/lib/lokandroid.cxx @@ -89,6 +89,22 @@ extern "C" SAL_JNI_EXPORT jint JNICALL Java_org_libreoffice_kit_Document_getPart return (jint) pDocument->pClass->getParts(pDocument); } +extern "C" SAL_JNI_EXPORT jstring JNICALL Java_org_libreoffice_kit_Document_getPartName + (JNIEnv* pEnv, jobject aObject, jint nPartIndex) +{ + LibreOfficeKitDocument* pDocument = getHandle(pEnv, aObject); + char* pPartName = pDocument->pClass->getPartName(pDocument, nPartIndex); + return pEnv->NewStringUTF(pPartName); +} + +extern "C" SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Document_setPartMode + (JNIEnv* pEnv, jobject aObject, jint nPartMode) +{ + LibreOfficeKitDocument* pDocument = getHandle(pEnv, aObject); + + pDocument->pClass->setPartMode(pDocument, (LibreOfficeKitPartMode) nPartMode); +} + extern "C" SAL_JNI_EXPORT jint JNICALL Java_org_libreoffice_kit_Document_getDocumentTypeNative (JNIEnv* pEnv, jobject aObject) { -- cgit