LibreOffice Module desktop (master) 1
lokandroid.cxx
Go to the documentation of this file.
1/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
9
10#include <unistd.h>
11#include <jni.h>
12
13#include <sal/types.h>
14#include <vcl/event.hxx>
15#include <android/log.h>
16
17#include <osl/detail/android-bootstrap.h>
18
19#include <LibreOfficeKit/LibreOfficeKit.h>
20
21/* LibreOfficeKit */
22
23namespace
24{
25
26jfieldID getHandleField(JNIEnv* pEnv, jobject aObject)
27{
28 jclass clazz = pEnv->GetObjectClass(aObject);
29 return pEnv->GetFieldID(clazz, "handle", "Ljava/nio/ByteBuffer;");
30}
31
32template <typename T>
33T* getHandle(JNIEnv* pEnv, jobject aObject)
34{
35 jobject aHandle = pEnv->GetObjectField(aObject, getHandleField(pEnv, aObject));
36 return reinterpret_cast<T*>(pEnv->GetDirectBufferAddress(aHandle));
37}
38
39const char* copyJavaString(JNIEnv* pEnv, jstring aJavaString)
40{
41 const char* pTemp = pEnv->GetStringUTFChars(aJavaString, NULL);
42 const char* pClone = strdup(pTemp);
43 pEnv->ReleaseStringUTFChars(aJavaString, pTemp);
44
45 return pClone;
46}
47
48} // anonymous namespace
49
50extern "C" SAL_JNI_EXPORT jstring JNICALL Java_org_libreoffice_kit_Office_getError
51 (JNIEnv* pEnv, jobject aObject)
52{
53 LibreOfficeKit* pLibreOfficeKit = getHandle<LibreOfficeKit>(pEnv, aObject);
54 char* pError = pLibreOfficeKit->pClass->getError(pLibreOfficeKit);
55 return pEnv->NewStringUTF(pError);
56}
57
58extern "C" SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Office_destroy
59 (JNIEnv* pEnv, jobject aObject)
60{
61 LibreOfficeKit* pLibreOfficeKit = getHandle<LibreOfficeKit>(pEnv, aObject);
62 pLibreOfficeKit->pClass->destroy(pLibreOfficeKit);
63}
64
65extern "C" SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Office_destroyAndExit(JNIEnv* pEnv, jobject aObject)
66{
67 LibreOfficeKit* pLibreOfficeKit = getHandle<LibreOfficeKit>(pEnv, aObject);
68 pLibreOfficeKit->pClass->destroy(pLibreOfficeKit);
69 // Stopgap fix: _exit() to force the OS to restart the LO activity.
70 // Better than to hang.
71 _exit(0);
72}
73
74namespace
75{
76
77struct CallbackData
78{
79 jmethodID aJavaCallbackMethod;
80 jclass aClass;
81 jobject aObject;
82};
83
84static CallbackData gCallbackData;
85static CallbackData gCallbackDataLOKit;
86
90void messageCallback(int nType, const char* pPayload, void* pData)
91{
92 CallbackData* pCallbackData = (CallbackData*) pData;
93
94 JavaVM* pJavaVM = lo_get_javavm();
95 JNIEnv* pEnv;
96 bool bIsAttached = false;
97
98 int status = pJavaVM->GetEnv((void **) &pEnv, JNI_VERSION_1_6);
99
100 if(status < 0)
101 {
102 status = pJavaVM->AttachCurrentThread(&pEnv, NULL);
103 if(status < 0)
104 {
105 return;
106 }
107 bIsAttached = true;
108 }
109
110 jstring sPayload = pEnv->NewStringUTF(pPayload);
111
112 jvalue aParameter[2];
113 aParameter[0].i = nType;
114 aParameter[1].l = sPayload;
115
116 pEnv->CallVoidMethodA(pCallbackData->aObject, pCallbackData->aJavaCallbackMethod, aParameter);
117
118 pEnv->DeleteLocalRef(sPayload);
119
120 if (bIsAttached)
121 {
122 pJavaVM->DetachCurrentThread();
123 }
124}
125
126} // anonymous namespace
127
128extern "C" SAL_JNI_EXPORT jobject JNICALL Java_org_libreoffice_kit_Office_documentLoadNative
129 (JNIEnv* pEnv, jobject aObject, jstring documentPath)
130{
131 const char* aCloneDocumentPath = copyJavaString(pEnv, documentPath);
132 LibreOfficeKit* pLibreOfficeKit = getHandle<LibreOfficeKit>(pEnv, aObject);
133
134 LibreOfficeKitDocument* pDocument = pLibreOfficeKit->pClass->documentLoad(pLibreOfficeKit, aCloneDocumentPath);
135
136 if (pDocument == NULL)
137 return NULL;
138
139 jobject aHandle = pEnv->NewDirectByteBuffer((void*) pDocument, sizeof(LibreOfficeKitDocument));
140
141 return aHandle;
142}
143
144extern "C" SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Office_setDocumentPassword
145 (JNIEnv* pEnv, jobject aObject, jstring sUrl, jstring sPassword)
146{
147 LibreOfficeKit* pLibreOfficeKit = getHandle<LibreOfficeKit>(pEnv, aObject);
148
149 char const* pUrl = copyJavaString(pEnv, sUrl);
150 if (sPassword == NULL) {
151 pLibreOfficeKit->pClass->setDocumentPassword(pLibreOfficeKit, pUrl, nullptr);
152 } else {
153 char const* pPassword = copyJavaString(pEnv, sPassword);
154 pLibreOfficeKit->pClass->setDocumentPassword(pLibreOfficeKit, pUrl, pPassword);
155 }
156}
157
158extern "C" SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Office_setOptionalFeatures
159 (JNIEnv* pEnv, jobject aObject, jlong options)
160{
161 LibreOfficeKit* pLibreOfficeKit = getHandle<LibreOfficeKit>(pEnv, aObject);
162
163 unsigned long long pOptions = (unsigned long long)options;
164
165 pLibreOfficeKit->pClass->setOptionalFeatures(pLibreOfficeKit, pOptions);
166}
167
169extern "C" SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Office_bindMessageCallback
170 (JNIEnv* pEnv, jobject aObject)
171{
172 LibreOfficeKit* pLibreOfficeKit = getHandle<LibreOfficeKit>(pEnv, aObject);
173
174 gCallbackDataLOKit.aObject = (jobject) pEnv->NewGlobalRef(aObject);
175 jclass aClass = pEnv->GetObjectClass(aObject);
176 gCallbackDataLOKit.aClass = (jclass) pEnv->NewGlobalRef(aClass);
177
178 gCallbackDataLOKit.aJavaCallbackMethod = pEnv->GetMethodID(aClass, "messageRetrievedLOKit", "(ILjava/lang/String;)V");
179
180 pLibreOfficeKit->pClass->registerCallback(pLibreOfficeKit, messageCallback, (void*) &gCallbackDataLOKit);
181}
182
183/* Document */
184
186extern "C" SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Document_bindMessageCallback
187 (JNIEnv* pEnv, jobject aObject)
188{
189 LibreOfficeKitDocument* pDocument = getHandle<LibreOfficeKitDocument>(pEnv, aObject);
190
191 gCallbackData.aObject = (jobject) pEnv->NewGlobalRef(aObject);
192 jclass aClass = pEnv->GetObjectClass(aObject);
193 gCallbackData.aClass = (jclass) pEnv->NewGlobalRef(aClass);
194
195 gCallbackData.aJavaCallbackMethod = pEnv->GetMethodID(aClass, "messageRetrieved", "(ILjava/lang/String;)V");
196
197 pDocument->pClass->registerCallback(pDocument, messageCallback, (void*) &gCallbackData);
198}
199
200extern "C" SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Document_destroy
201 (JNIEnv* pEnv, jobject aObject)
202{
203 LibreOfficeKitDocument* pDocument = getHandle<LibreOfficeKitDocument>(pEnv, aObject);
204 pDocument->pClass->destroy(pDocument);
205}
206
207extern "C" SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Document_setPart
208 (JNIEnv* pEnv, jobject aObject, jint aPart)
209{
210 LibreOfficeKitDocument* pDocument = getHandle<LibreOfficeKitDocument>(pEnv, aObject);
211 pDocument->pClass->setPart(pDocument, aPart);
212}
213
214extern "C" SAL_JNI_EXPORT jint JNICALL Java_org_libreoffice_kit_Document_getPart
215 (JNIEnv* pEnv, jobject aObject)
216{
217 LibreOfficeKitDocument* pDocument = getHandle<LibreOfficeKitDocument>(pEnv, aObject);
218 return (jint) pDocument->pClass->getPart(pDocument);
219}
220
221extern "C" SAL_JNI_EXPORT jstring JNICALL Java_org_libreoffice_kit_Document_getPartPageRectangles
222 (JNIEnv* pEnv, jobject aObject)
223{
224 LibreOfficeKitDocument* pDocument = getHandle<LibreOfficeKitDocument>(pEnv, aObject);
225 char* pRectangles = pDocument->pClass->getPartPageRectangles(pDocument);
226 return pEnv->NewStringUTF(pRectangles);
227}
228
229extern "C" SAL_JNI_EXPORT jint JNICALL Java_org_libreoffice_kit_Document_getParts
230 (JNIEnv* pEnv, jobject aObject)
231{
232 LibreOfficeKitDocument* pDocument = getHandle<LibreOfficeKitDocument>(pEnv, aObject);
233 return (jint) pDocument->pClass->getParts(pDocument);
234}
235
236extern "C" SAL_JNI_EXPORT jstring JNICALL Java_org_libreoffice_kit_Document_getPartName
237 (JNIEnv* pEnv, jobject aObject, jint nPartIndex)
238{
239 LibreOfficeKitDocument* pDocument = getHandle<LibreOfficeKitDocument>(pEnv, aObject);
240 char* pPartName = pDocument->pClass->getPartName(pDocument, nPartIndex);
241 return pEnv->NewStringUTF(pPartName);
242}
243
244extern "C" SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Document_setPartMode
245 (JNIEnv* pEnv, jobject aObject, jint nPartMode)
246{
247 LibreOfficeKitDocument* pDocument = getHandle<LibreOfficeKitDocument>(pEnv, aObject);
248
249 pDocument->pClass->setPartMode(pDocument, nPartMode);
250}
251
253 (JNIEnv* pEnv, jobject aObject)
254{
255 LibreOfficeKitDocument* pDocument = getHandle<LibreOfficeKitDocument>(pEnv, aObject);
256 return (jint) pDocument->pClass->getDocumentType(pDocument);
257}
258
259extern "C" SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Document_paintTileNative
260 (JNIEnv* pEnv, jobject aObject, jobject aByteBuffer,
261 jint nCanvasWidth, jint nCanvasHeight, jint nTilePosX, jint nTilePosY,
262 jint nTileWidth, jint nTileHeight)
263{
264 LibreOfficeKitDocument* pDocument = getHandle<LibreOfficeKitDocument>(pEnv, aObject);
265
266 unsigned char* buffer = (unsigned char*) pEnv->GetDirectBufferAddress(aByteBuffer);
267 pDocument->pClass->paintTile(pDocument, buffer, nCanvasWidth, nCanvasHeight, nTilePosX, nTilePosY, nTileWidth, nTileHeight);
268}
269
270extern "C" SAL_JNI_EXPORT jlong JNICALL Java_org_libreoffice_kit_Document_getDocumentHeight
271 (JNIEnv* pEnv, jobject aObject)
272{
273 LibreOfficeKitDocument* pDocument = getHandle<LibreOfficeKitDocument>(pEnv, aObject);
274 long nWidth;
275 long nHeight;
276 pDocument->pClass->getDocumentSize(pDocument, &nWidth, &nHeight);
277 return nHeight;
278}
279
280extern "C" SAL_JNI_EXPORT jlong JNICALL Java_org_libreoffice_kit_Document_getDocumentWidth
281 (JNIEnv* pEnv, jobject aObject)
282{
283 LibreOfficeKitDocument* pDocument = getHandle<LibreOfficeKitDocument>(pEnv, aObject);
284 long nWidth;
285 long nHeight;
286 pDocument->pClass->getDocumentSize(pDocument, &nWidth, &nHeight);
287 return nWidth;
288}
289
291 (JNIEnv* pEnv, jobject aObject)
292{
293 LibreOfficeKitDocument* pDocument = getHandle<LibreOfficeKitDocument>(pEnv, aObject);
294 pDocument->pClass->initializeForRendering(pDocument, NULL);
295}
296
297extern "C" SAL_JNI_EXPORT jint JNICALL Java_org_libreoffice_kit_Document_saveAs
298 (JNIEnv* pEnv, jobject aObject, jstring sUrl, jstring sFormat, jstring sOptions)
299{
300 LibreOfficeKitDocument* pDocument = getHandle<LibreOfficeKitDocument>(pEnv, aObject);
301
302 const char* pUrl = pEnv->GetStringUTFChars(sUrl, NULL);
303 const char* pFormat = pEnv->GetStringUTFChars(sFormat, NULL);
304 const char* pOptions = pEnv->GetStringUTFChars(sOptions, NULL);
305
306 int result = pDocument->pClass->saveAs(pDocument, pUrl, pFormat, pOptions);
307
308 pEnv->ReleaseStringUTFChars(sUrl, pUrl);
309 pEnv->ReleaseStringUTFChars(sFormat, pFormat);
310 pEnv->ReleaseStringUTFChars(sOptions, pOptions);
311
312 return result;
313}
314
315extern "C" SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Document_postKeyEvent
316 (JNIEnv* pEnv, jobject aObject, jint nType, jint nCharCode, jint nKeyCode)
317{
318 LibreOfficeKitDocument* pDocument = getHandle<LibreOfficeKitDocument>(pEnv, aObject);
319 pDocument->pClass->postKeyEvent(pDocument, nType, nCharCode, nKeyCode);
320}
321
322extern "C" SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Document_postMouseEvent
323 (JNIEnv* pEnv, jobject aObject, jint type, jint x, jint y, jint count, jint button, jint modifier)
324{
325 LibreOfficeKitDocument* pDocument = getHandle<LibreOfficeKitDocument>(pEnv, aObject);
326 pDocument->pClass->postMouseEvent(pDocument, type, x, y, count, button, modifier);
327}
328
329extern "C" SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Document_postUnoCommand
330 (JNIEnv* pEnv, jobject aObject, jstring command, jstring arguments, jboolean bNotifyWhenFinished)
331{
332 LibreOfficeKitDocument* pDocument = getHandle<LibreOfficeKitDocument>(pEnv, aObject);
333
334 const char* pCommand = pEnv->GetStringUTFChars(command, NULL);
335 const char* pArguments = nullptr;
336 if (arguments != NULL)
337 pArguments = pEnv->GetStringUTFChars(arguments, NULL);
338
339 pDocument->pClass->postUnoCommand(pDocument, pCommand, pArguments, bNotifyWhenFinished);
340
341 pEnv->ReleaseStringUTFChars(command, pCommand);
342 if (arguments != NULL)
343 pEnv->ReleaseStringUTFChars(arguments, pArguments);
344}
345
346extern "C" SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Document_setTextSelection
347 (JNIEnv* pEnv, jobject aObject, jint type, jint x, jint y)
348{
349 LibreOfficeKitDocument* pDocument = getHandle<LibreOfficeKitDocument>(pEnv, aObject);
350 pDocument->pClass->setTextSelection(pDocument, type, x, y);
351}
352
353extern "C" SAL_JNI_EXPORT jstring JNICALL Java_org_libreoffice_kit_Document_getTextSelection
354 (JNIEnv* pEnv, jobject aObject, jstring mimeType)
355{
356 LibreOfficeKitDocument* pDocument = getHandle<LibreOfficeKitDocument>(pEnv, aObject);
357
358 const char* pMimeType = pEnv->GetStringUTFChars(mimeType, NULL);
359
360 char* pUsedMimeType = 0;
361 LibreOfficeKitDocumentClass* pcls = pDocument->pClass;
362 char* pSelection = pcls->getTextSelection(pDocument, pMimeType, &pUsedMimeType);
363 free(pUsedMimeType);
364
365 pEnv->ReleaseStringUTFChars(mimeType, pMimeType);
366
367 return pEnv->NewStringUTF(pSelection);
368}
369
370extern "C" SAL_JNI_EXPORT jboolean JNICALL Java_org_libreoffice_kit_Document_paste
371 (JNIEnv* pEnv, jobject aObject, jstring mimeType, jstring data)
372{
373 LibreOfficeKitDocument* pDocument = getHandle<LibreOfficeKitDocument>(pEnv, aObject);
374
375 const char* pMimeType = pEnv->GetStringUTFChars(mimeType, NULL);
376 const char* pData = pEnv->GetStringUTFChars(data, NULL);
377 const size_t nSize = pEnv->GetStringLength(data);
378
379 LibreOfficeKitDocumentClass* pcls = pDocument->pClass;
380 bool result = pcls->paste(pDocument, pMimeType, pData, nSize);
381 pEnv->ReleaseStringUTFChars(mimeType, pMimeType);
382 pEnv->ReleaseStringUTFChars(data, pData);
383
384 return result;
385}
386
387extern "C" SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Document_setGraphicSelection
388 (JNIEnv* pEnv, jobject aObject, jint type, jint x, jint y)
389{
390 LibreOfficeKitDocument* pDocument = getHandle<LibreOfficeKitDocument>(pEnv, aObject);
391 pDocument->pClass->setGraphicSelection(pDocument, type, x, y);
392}
393
394extern "C" SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Document_resetSelection
395 (JNIEnv* pEnv, jobject aObject)
396{
397 LibreOfficeKitDocument* pDocument = getHandle<LibreOfficeKitDocument>(pEnv, aObject);
398 pDocument->pClass->resetSelection(pDocument);
399}
400
401extern "C" SAL_JNI_EXPORT jstring JNICALL Java_org_libreoffice_kit_Document_getCommandValues
402 (JNIEnv* pEnv, jobject aObject, jstring command)
403{
404 LibreOfficeKitDocument* pDocument = getHandle<LibreOfficeKitDocument>(pEnv, aObject);
405
406 const char* pCommand = pEnv->GetStringUTFChars(command, NULL);
407
408 char* pValue = pDocument->pClass->getCommandValues(pDocument, pCommand);
409
410 pEnv->ReleaseStringUTFChars(command, pCommand);
411
412 return pEnv->NewStringUTF(pValue);
413}
414
415extern "C" SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Document_setClientZoom
416 (JNIEnv* pEnv, jobject aObject, jint nTilePixelWidth, jint nTilePixelHeight, jint nTileTwipWidth, jint nTileTwipHeight)
417{
418 LibreOfficeKitDocument* pDocument = getHandle<LibreOfficeKitDocument>(pEnv, aObject);
419 pDocument->pClass->setClientZoom(pDocument, nTilePixelWidth, nTilePixelHeight, nTileTwipWidth, nTileTwipHeight);
420
421}
422/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
float y
float x
SAL_JNI_EXPORT jstring JNICALL Java_org_libreoffice_kit_Document_getTextSelection(JNIEnv *pEnv, jobject aObject, jstring mimeType)
Definition: lokandroid.cxx:354
SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Office_destroyAndExit(JNIEnv *pEnv, jobject aObject)
Definition: lokandroid.cxx:65
SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Document_bindMessageCallback(JNIEnv *pEnv, jobject aObject)
Implementation of org.libreoffice.kit.Document.bindMessageCallback method.
Definition: lokandroid.cxx:187
SAL_JNI_EXPORT jint JNICALL Java_org_libreoffice_kit_Document_getParts(JNIEnv *pEnv, jobject aObject)
Definition: lokandroid.cxx:230
SAL_JNI_EXPORT jobject JNICALL Java_org_libreoffice_kit_Office_documentLoadNative(JNIEnv *pEnv, jobject aObject, jstring documentPath)
Definition: lokandroid.cxx:129
SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Office_setOptionalFeatures(JNIEnv *pEnv, jobject aObject, jlong options)
Definition: lokandroid.cxx:159
SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Document_destroy(JNIEnv *pEnv, jobject aObject)
Definition: lokandroid.cxx:201
SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Document_postUnoCommand(JNIEnv *pEnv, jobject aObject, jstring command, jstring arguments, jboolean bNotifyWhenFinished)
Definition: lokandroid.cxx:330
SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Document_setClientZoom(JNIEnv *pEnv, jobject aObject, jint nTilePixelWidth, jint nTilePixelHeight, jint nTileTwipWidth, jint nTileTwipHeight)
Definition: lokandroid.cxx:416
SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Document_postMouseEvent(JNIEnv *pEnv, jobject aObject, jint type, jint x, jint y, jint count, jint button, jint modifier)
Definition: lokandroid.cxx:323
SAL_JNI_EXPORT jint JNICALL Java_org_libreoffice_kit_Document_getDocumentTypeNative(JNIEnv *pEnv, jobject aObject)
Definition: lokandroid.cxx:253
SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Office_destroy(JNIEnv *pEnv, jobject aObject)
Definition: lokandroid.cxx:59
SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Document_resetSelection(JNIEnv *pEnv, jobject aObject)
Definition: lokandroid.cxx:395
SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Document_initializeForRendering(JNIEnv *pEnv, jobject aObject)
Definition: lokandroid.cxx:291
SAL_JNI_EXPORT jlong JNICALL Java_org_libreoffice_kit_Document_getDocumentWidth(JNIEnv *pEnv, jobject aObject)
Definition: lokandroid.cxx:281
SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Document_setGraphicSelection(JNIEnv *pEnv, jobject aObject, jint type, jint x, jint y)
Definition: lokandroid.cxx:388
SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Document_paintTileNative(JNIEnv *pEnv, jobject aObject, jobject aByteBuffer, jint nCanvasWidth, jint nCanvasHeight, jint nTilePosX, jint nTilePosY, jint nTileWidth, jint nTileHeight)
Definition: lokandroid.cxx:260
SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Office_setDocumentPassword(JNIEnv *pEnv, jobject aObject, jstring sUrl, jstring sPassword)
Definition: lokandroid.cxx:145
SAL_JNI_EXPORT jlong JNICALL Java_org_libreoffice_kit_Document_getDocumentHeight(JNIEnv *pEnv, jobject aObject)
Definition: lokandroid.cxx:271
SAL_JNI_EXPORT jint JNICALL Java_org_libreoffice_kit_Document_getPart(JNIEnv *pEnv, jobject aObject)
Definition: lokandroid.cxx:215
SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Document_postKeyEvent(JNIEnv *pEnv, jobject aObject, jint nType, jint nCharCode, jint nKeyCode)
Definition: lokandroid.cxx:316
SAL_JNI_EXPORT jstring JNICALL Java_org_libreoffice_kit_Office_getError(JNIEnv *pEnv, jobject aObject)
Definition: lokandroid.cxx:51
SAL_JNI_EXPORT jint JNICALL Java_org_libreoffice_kit_Document_saveAs(JNIEnv *pEnv, jobject aObject, jstring sUrl, jstring sFormat, jstring sOptions)
Definition: lokandroid.cxx:298
SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Office_bindMessageCallback(JNIEnv *pEnv, jobject aObject)
Implementation of org.libreoffice.kit.Office.bindMessageCallback method.
Definition: lokandroid.cxx:170
SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Document_setTextSelection(JNIEnv *pEnv, jobject aObject, jint type, jint x, jint y)
Definition: lokandroid.cxx:347
SAL_JNI_EXPORT jboolean JNICALL Java_org_libreoffice_kit_Document_paste(JNIEnv *pEnv, jobject aObject, jstring mimeType, jstring data)
Definition: lokandroid.cxx:371
SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Document_setPart(JNIEnv *pEnv, jobject aObject, jint aPart)
Definition: lokandroid.cxx:208
SAL_JNI_EXPORT jstring JNICALL Java_org_libreoffice_kit_Document_getPartName(JNIEnv *pEnv, jobject aObject, jint nPartIndex)
Definition: lokandroid.cxx:237
SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Document_setPartMode(JNIEnv *pEnv, jobject aObject, jint nPartMode)
Definition: lokandroid.cxx:245
SAL_JNI_EXPORT jstring JNICALL Java_org_libreoffice_kit_Document_getCommandValues(JNIEnv *pEnv, jobject aObject, jstring command)
Definition: lokandroid.cxx:402
SAL_JNI_EXPORT jstring JNICALL Java_org_libreoffice_kit_Document_getPartPageRectangles(JNIEnv *pEnv, jobject aObject)
Definition: lokandroid.cxx:222
return NULL
std::unique_ptr< sal_Int32[]> pData
QPRO_FUNC_TYPE nType
Any result
ResultType type