[Libreoffice-commits] core.git: desktop/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Mar 11 16:46:52 UTC 2019
desktop/source/lib/init.cxx | 9 +++++++++
1 file changed, 9 insertions(+)
New commits:
commit e745b06352cfe358ba927c9b4ef938452907a14f
Author: Jan Holesovsky <kendy at collabora.com>
AuthorDate: Fri Feb 15 16:04:51 2019 +0100
Commit: Jan Holesovsky <kendy at collabora.com>
CommitDate: Mon Mar 11 17:46:27 2019 +0100
android: Set the program path sensibly when we've got nullptr.
Change-Id: I4415459ca5d758d06d866faeca85e1cf154d0567
Reviewed-on: https://gerrit.libreoffice.org/67877
Tested-by: Jenkins
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 65da82f294ad..0ec7bdf3bad7 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -24,6 +24,10 @@
#include <postmac.h>
#endif
+#ifdef ANDROID
+#include <osl/detail/android-bootstrap.h>
+#endif
+
#include <algorithm>
#include <memory>
#include <iostream>
@@ -4457,11 +4461,16 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char
}
else
{
+#ifdef ANDROID
+ aAppPath = OUString::fromUtf8(lo_get_app_data_dir()) + "/program";
+#else
// Fun conversion dance back and forth between URLs and system paths...
OUString aAppURL;
::osl::Module::getUrlFromAddress( reinterpret_cast< oslGenericFunction >(lo_initialize),
aAppURL);
osl::FileBase::getSystemPathFromFileURL( aAppURL, aAppPath );
+#endif
+
#ifdef IOS
// The above gives something like
// "/private/var/containers/Bundle/Application/953AA851-CC15-4C60-A2CB-C2C6F24E6F71/Foo.app/Foo",
More information about the Libreoffice-commits
mailing list