Kaydet (Commit) cba65fe0 authored tarafından Jan Holesovsky's avatar Jan Holesovsky

android: Attempt to load the test file we have in the .apk.

Change-Id: Ib438e8d7de90c202a3be6ad01bd8b7a8341527c1
üst b046b687
...@@ -82,11 +82,11 @@ public class LibreOfficeMainActivity extends Activity { ...@@ -82,11 +82,11 @@ public class LibreOfficeMainActivity extends Activity {
LibreOfficeKit.putenv("SAL_LOG=+WARN+INFO-INFO.legacy.osl"); LibreOfficeKit.putenv("SAL_LOG=+WARN+INFO-INFO.legacy.osl");
LibreOfficeKit.init(this); LibreOfficeKit.init(this);
Log.w(LOGTAG, "LOK Handle:" + handle);
Office office = new Office(LibreOfficeKit.getLibreOfficeKitHandle()); Office office = new Office(LibreOfficeKit.getLibreOfficeKitHandle());
File file = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS); //File file = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);
String input = file.getPath() + "/test.odt"; //String input = file.getPath() + "/test.odt";
String input = "/assets/test1.odt";
Document document = office.documentLoad(input); Document document = office.documentLoad(input);
if (document == null) { if (document == null) {
Log.w(LOGTAG, "LOK Document error:" + office.getErrorNative()); Log.w(LOGTAG, "LOK Document error:" + office.getErrorNative());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment