[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - i18nlangtag/source
Jan Holesovsky (via logerrit)
logerrit at kemper.freedesktop.org
Sat Feb 1 08:29:40 UTC 2020
i18nlangtag/source/languagetag/languagetag.cxx | 8 ++++++++
1 file changed, 8 insertions(+)
New commits:
commit 312a7d8173c2fe35c3c635f4046df8433abb68ad
Author: Jan Holesovsky <kendy at collabora.com>
AuthorDate: Fri Jan 31 21:35:30 2020 +0100
Commit: Jan Holesovsky <kendy at collabora.com>
CommitDate: Sat Feb 1 09:29:11 2020 +0100
android: Set the correct path for the liblangtag data.
Change-Id: I8b8bf76f086812c5f995c6ef513f0b7f773475ba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87785
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
diff --git a/i18nlangtag/source/languagetag/languagetag.cxx b/i18nlangtag/source/languagetag/languagetag.cxx
index ef34402d02de..1dd6981bd0fc 100644
--- a/i18nlangtag/source/languagetag/languagetag.cxx
+++ b/i18nlangtag/source/languagetag/languagetag.cxx
@@ -30,6 +30,10 @@
#endif
#include <liblangtag/langtag.h>
+#ifdef ANDROID
+#include <osl/detail/android-bootstrap.h>
+#endif
+
using namespace com::sun::star;
@@ -197,6 +201,9 @@ void LiblangtagDataRef::teardown()
void LiblangtagDataRef::setupDataPath()
{
+#if defined(ANDROID)
+ maDataPath = OString(lo_get_app_data_dir()) + "/share/liblangtag";
+#else
// maDataPath is assumed to be empty here.
OUString aURL("$BRAND_BASE_DIR/" LIBO_SHARE_FOLDER "/liblangtag");
rtl::Bootstrap::expandMacros(aURL); //TODO: detect failure
@@ -212,6 +219,7 @@ void LiblangtagDataRef::setupDataPath()
if (osl::FileBase::getSystemPathFromFileURL( aURL, aPath) == osl::FileBase::E_None)
maDataPath = OUStringToOString( aPath, RTL_TEXTENCODING_UTF8);
}
+#endif
if (maDataPath.isEmpty())
maDataPath = "|"; // assume system
else
More information about the Libreoffice-commits
mailing list