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

Change-Id: Ib438e8d7de90c202a3be6ad01bd8b7a8341527c1
This commit is contained in:
Jan Holesovsky 2014-07-01 09:55:52 +02:00
parent b046b687f9
commit cba65fe064

View File

@ -82,11 +82,11 @@ public class LibreOfficeMainActivity extends Activity {
LibreOfficeKit.putenv("SAL_LOG=+WARN+INFO-INFO.legacy.osl");
LibreOfficeKit.init(this);
Log.w(LOGTAG, "LOK Handle:" + handle);
Office office = new Office(LibreOfficeKit.getLibreOfficeKitHandle());
File file = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);
String input = file.getPath() + "/test.odt";
//File file = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);
//String input = file.getPath() + "/test.odt";
String input = "/assets/test1.odt";
Document document = office.documentLoad(input);
if (document == null) {
Log.w(LOGTAG, "LOK Document error:" + office.getErrorNative());