diff options
author | Tor Lillqvist <tlillqvist@suse.com> | 2012-03-26 17:51:45 +0300 |
---|---|---|
committer | Tor Lillqvist <tlillqvist@suse.com> | 2012-03-26 17:53:22 +0300 |
commit | 10f5ab71a71ec8683e18d37b3b325beff9a5fd6a (patch) | |
tree | 893114972003f061501f18a39e64b272f2134eda /sal/rtl | |
parent | e56c5b511c84a032baecc6c67bb90f13646e939d (diff) |
Hardcode default inifile as /assets/rc on Android
Diffstat (limited to 'sal/rtl')
-rw-r--r-- | sal/rtl/source/bootstrap.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sal/rtl/source/bootstrap.cxx b/sal/rtl/source/bootstrap.cxx index dc8d02df74b3..a62f3f3cc41e 100644 --- a/sal/rtl/source/bootstrap.cxx +++ b/sal/rtl/source/bootstrap.cxx @@ -396,7 +396,7 @@ Bootstrap_Impl * BootstrapMap::getBaseIni() { if (baseIni_ == 0) { rtl::OUString uri; if (baseIniUri_.isEmpty()) { -#ifdef IOS +#if defined IOS // On iOS hardcode the inifile as "rc" in the .app // directory. Apps are self-contained anyway, there is no // possibility to have several "applications" in the same @@ -404,6 +404,12 @@ Bootstrap_Impl * BootstrapMap::getBaseIni() { const char *inifile = [[@"vnd.sun.star.pathname:" stringByAppendingString: [[[NSBundle mainBundle] bundlePath] stringByAppendingPathComponent: @"rc"]] UTF8String]; uri = rtl::OUString(inifile, strlen(inifile), RTL_TEXTENCODING_UTF8); resolvePathnameUrl(&uri); +#elif defined ANDROID + // Apps are self-contained on Android, too, can as well hardcode + // it as "rc" in the "/assets" directory, i.e. inside the app's + // .apk (zip) archive as the /assets/rc file. + uri = rtl::OUString("vnd.sun.star.pathname:/assets/rc"); + resolvePathnameUrl(&uri); #else if (CommandLineParameters::get().get( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("INIFILENAME")), |