diff options
author | Jan Holesovsky <kendy@collabora.com> | 2014-06-28 18:23:24 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2014-06-30 14:48:03 +0200 |
commit | db89e5ff812e2b807476cdf0a10cd81a3040d79b (patch) | |
tree | 1fa4b8fcd01f3cb5e7c19ad15a98bf65b63bf389 /android | |
parent | 74ab9835f978ae872bd0b737a8d16eb2f63731a7 (diff) |
android: Make use of LibreOfficeKit.
Now the LibreOfficeKit is used to actually attempt to bootstrap LibreOffice;
at the moment fails to do that.
Change-Id: I91220dbff783213bf7702e7213a5646859db4581
Diffstat (limited to 'android')
4 files changed, 11 insertions, 8 deletions
diff --git a/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java b/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java index 9d3bc89f9bed..13d1a23fdfa9 100644 --- a/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java +++ b/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java @@ -60,7 +60,7 @@ public final class Bootstrap // A method that starts a thread to redirect stdout and stderr writes to // the Android logging mechanism, or stops the redirection. - public static native boolean redirect_stdio(boolean state); + public static native void redirect_stdio(boolean state); // The DIB returned by css.awt.XBitmap.getDIB is in BGR_888 form, at least // for Writer documents. We need it in Android's Bitmap.Config.ARGB_888 diff --git a/android/Bootstrap/src/org/libreoffice/android/LibreOfficeKit.java b/android/Bootstrap/src/org/libreoffice/android/LibreOfficeKit.java index 82b889e2548f..e7507d5a1dcf 100644 --- a/android/Bootstrap/src/org/libreoffice/android/LibreOfficeKit.java +++ b/android/Bootstrap/src/org/libreoffice/android/LibreOfficeKit.java @@ -61,7 +61,7 @@ public final class LibreOfficeKit */ // A method that starts a thread to redirect stdout and stderr writes to // the Android logging mechanism, or stops the redirection. - public static native boolean redirect_stdio(boolean state); + public static native void redirect_stdio(boolean state); /* // The DIB returned by css.awt.XBitmap.getDIB is in BGR_888 form, at least // for Writer documents. We need it in Android's Bitmap.Config.ARGB_888 diff --git a/android/experimental/LOAndroid3/Makefile b/android/experimental/LOAndroid3/Makefile index 4db011f13616..5169b2d4eb35 100644 --- a/android/experimental/LOAndroid3/Makefile +++ b/android/experimental/LOAndroid3/Makefile @@ -13,7 +13,7 @@ BOOTSTRAPDIR=../../Bootstrap include $(BOOTSTRAPDIR)/Makefile.shared native-code.cxx: $(SRCDIR)/solenv/bin/native-code.py - $< -g core -g writer > $@ + $< -j -g core -g writer > $@ copy-stuff: # Then "assets". Let the directory structure under assets mimic diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java index d4758443bf13..3d30dcc8e80e 100644 --- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java +++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java @@ -16,7 +16,7 @@ import org.mozilla.gecko.gfx.GeckoSoftwareLayerClient; import org.mozilla.gecko.gfx.LayerController; import org.mozilla.gecko.gfx.LayerView; -import org.libreoffice.android.Bootstrap; +import org.libreoffice.android.LibreOfficeKit; import com.sun.star.frame.XComponentLoader; import com.sun.star.lang.XMultiComponentFactory; @@ -74,18 +74,19 @@ public class LibreOfficeMainActivity extends Activity { super.onCreate(savedInstanceState); try { - Bootstrap.setup(this); - Bootstrap.putenv("SAL_LOG=+WARN+INFO-INFO.legacy.osl"); + LibreOfficeKit.init(this); + LibreOfficeKit.putenv("SAL_LOG=+WARN+INFO-INFO.legacy.osl"); setContentView(R.layout.activity_main); Log.w(LOGTAG, "zerdatime " + SystemClock.uptimeMillis() + " - onCreate"); + /* String input = "/assets/test1.odt"; String[] argv = { "lo-document-loader", input }; - Bootstrap.setCommandArgs(argv); + LibreOfficeKit.setCommandArgs(argv); Bootstrap.initVCL(); @@ -102,7 +103,7 @@ public class LibreOfficeMainActivity extends Activity { componentLoader = (XComponentLoader) UnoRuntime.queryInterface(XComponentLoader.class, desktop); Log.i(LOGTAG, "componentLoader is" + (componentLoader!=null ? " not" : "") + " null"); - + */ } catch (Exception e) { e.printStackTrace(System.err); //finish(); @@ -143,3 +144,5 @@ public class LibreOfficeMainActivity extends Activity { return mLayerController; } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |