summaryrefslogtreecommitdiff
path: root/android/Bootstrap/src/org/libreoffice/kit/Office.java
diff options
context:
space:
mode:
Diffstat (limited to 'android/Bootstrap/src/org/libreoffice/kit/Office.java')
-rw-r--r--android/Bootstrap/src/org/libreoffice/kit/Office.java34
1 files changed, 34 insertions, 0 deletions
diff --git a/android/Bootstrap/src/org/libreoffice/kit/Office.java b/android/Bootstrap/src/org/libreoffice/kit/Office.java
new file mode 100644
index 000000000000..abd98c775e0a
--- /dev/null
+++ b/android/Bootstrap/src/org/libreoffice/kit/Office.java
@@ -0,0 +1,34 @@
+/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+package org.libreoffice.kit;
+
+import android.util.Log;
+
+public class Office {
+
+ private long handle;
+
+ public Office(long handle) {
+ this.handle = handle;
+ }
+
+ public native String getErrorNative();
+
+ private native long documentLoadNative(String url);
+
+ public Document documentLoad(String url) {
+ long handle = documentLoadNative(url);
+ Document document = null;
+ if (handle > 0) {
+ document = new Document(handle);
+ }
+ return document;
+ }
+}