summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.com>2014-07-02 11:07:29 +0200
committerTomaž Vajngerl <tomaz.vajngerl@collabora.com>2014-07-02 11:14:17 +0200
commitc5777b4edd971463b7ccf667a448015f6bb17b3f (patch)
tree452d4e3755ef1683e13f01494a7f9bdb86bc1265 /desktop
parent263039f30b3cf8a1684cec3c9d1d174755f35973 (diff)
android lok: fix paintTile JNI method
Change-Id: Ife12b8bc49d722ae614b7de253bb2061bea5bb7f
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/lib/lokandroid.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/desktop/source/lib/lokandroid.cxx b/desktop/source/lib/lokandroid.cxx
index 5b0559147cee..c23415feed6f 100644
--- a/desktop/source/lib/lokandroid.cxx
+++ b/desktop/source/lib/lokandroid.cxx
@@ -64,7 +64,6 @@ extern "C" SAL_JNI_EXPORT jlong JNICALL Java_org_libreoffice_kit_Office_document
pEnv->ReleaseStringUTFChars(documentPath, aCharDocumentPath);
LibreOfficeKit* pLibreOfficeKit = getHandle<LibreOfficeKit>(pEnv, aObject);
- LOGI("D( %s ): %d", aCloneDocumentPath, (int) pLibreOfficeKit);
LibreOfficeKitDocument* pDocument = pLibreOfficeKit->pClass->documentLoad(pLibreOfficeKit, aCloneDocumentPath);
return (jlong) (intptr_t) pDocument;
@@ -93,12 +92,17 @@ extern "C" SAL_JNI_EXPORT jint JNICALL Java_org_libreoffice_kit_Document_getDocu
}
extern "C" SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Document_paintTileNative
- (JNIEnv* pEnv, jobject aObject, jobject /*aByteBuffer*/,
+ (JNIEnv* pEnv, jobject aObject, jobject aByteBuffer,
jint nCanvasWidth, jint nCanvasHeight, jint nTilePosX, jint nTilePosY,
jint nTileWidth, jint nTileHeight)
{
LibreOfficeKitDocument* pDocument = getHandle<LibreOfficeKitDocument>(pEnv, aObject);
- return pDocument->pClass->paintTile(pDocument, NULL, nCanvasWidth, nCanvasHeight, NULL, nTilePosX, nTilePosY, nTileWidth, nTileHeight);
+
+ unsigned char* buffer = (unsigned char*) pEnv->GetDirectBufferAddress(aByteBuffer);
+ jlong capacity = pEnv->GetDirectBufferCapacity(aByteBuffer);
+ int nStride = 0;
+ pDocument->pClass->paintTile(pDocument, buffer, nCanvasWidth, nCanvasHeight, &nStride, nTilePosX, nTilePosY, nTileWidth, nTileHeight);
+ (void) nStride;
}
extern "C" SAL_JNI_EXPORT jlong JNICALL Java_org_libreoffice_kit_Document_getDocumentHeightNative