diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.com> | 2014-07-03 10:45:14 +0200 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.com> | 2014-07-03 10:51:56 +0200 |
commit | a3ccf3eab5e9dbba80490e057d6f30c4288ad467 (patch) | |
tree | 3316b41f1bb88c7e38993511e124de68dac8b43f /android | |
parent | 246cb7e068b0955d407d82279d66c3846ccd9438 (diff) |
lok JNI: no "handle" in funcs & don't wrap some native funcs
Change-Id: If783fecd80a0de05e94c76e23572b567d151bb06
Diffstat (limited to 'android')
-rw-r--r-- | android/Bootstrap/src/org/libreoffice/kit/Document.java | 38 | ||||
-rw-r--r-- | android/Bootstrap/src/org/libreoffice/kit/Office.java | 8 |
2 files changed, 13 insertions, 33 deletions
diff --git a/android/Bootstrap/src/org/libreoffice/kit/Document.java b/android/Bootstrap/src/org/libreoffice/kit/Document.java index 367a314ee65b..27893d2975ce 100644 --- a/android/Bootstrap/src/org/libreoffice/kit/Document.java +++ b/android/Bootstrap/src/org/libreoffice/kit/Document.java @@ -15,43 +15,23 @@ public class Document { private final long handle; - private native void setPartNative(long handle, int part); - private native int getNumberOfPartsNative(long handle); - private native int getDocumentTypeNative(long handle); - private native void paintTileNative(long handle, ByteBuffer buffer, int canvasWidth, int canvasHeight, int tilePositionX, int tilePositionY, int tileWidth, int tileHeight); - private native long getDocumentHeightNative(long handle); - private native long getDocumentWidthNative(long handle); + public native void setPart(int part); + public native int getNumberOfParts(); + public native long getDocumentHeight(); + public native long getDocumentWidth(); + + private native int getDocumentTypeNative(); + private native void paintTileNative(ByteBuffer buffer, int canvasWidth, int canvasHeight, int tilePositionX, int tilePositionY, int tileWidth, int tileHeight); public Document(long handle) { this.handle = handle; } - public boolean saveAs(String url) { - return false; - } - public int getDocumentType() { - return getDocumentTypeNative(handle); - } - - public int getNumberOfParts() { - return getNumberOfPartsNative(handle); - } - - public void setPart(int part) { - setPartNative(handle, part); + return getDocumentTypeNative(); } public void paintTile(ByteBuffer buffer, int canvasWidth, int canvasHeight, int tilePositionX, int tilePositionY, int tileWidth, int tileHeight) { - paintTileNative(handle, buffer, canvasWidth, canvasHeight, tilePositionX, tilePositionY, tileWidth, tileHeight); - } - - public long getDocumentWidth() { - return getDocumentWidthNative(handle); + paintTileNative(buffer, canvasWidth, canvasHeight, tilePositionX, tilePositionY, tileWidth, tileHeight); } - - public long getDocumentHeight() { - return getDocumentHeightNative(handle); - } - } diff --git a/android/Bootstrap/src/org/libreoffice/kit/Office.java b/android/Bootstrap/src/org/libreoffice/kit/Office.java index abd98c775e0a..a680735da9f9 100644 --- a/android/Bootstrap/src/org/libreoffice/kit/Office.java +++ b/android/Bootstrap/src/org/libreoffice/kit/Office.java @@ -19,15 +19,15 @@ public class Office { this.handle = handle; } - public native String getErrorNative(); + public native String getError(); private native long documentLoadNative(String url); public Document documentLoad(String url) { - long handle = documentLoadNative(url); + long documentHandle = documentLoadNative(url); Document document = null; - if (handle > 0) { - document = new Document(handle); + if (documentHandle > 0) { + document = new Document(documentHandle); } return document; } |