[Libreoffice-commits] core.git: i18nlangtag/source
Jan Holesovsky (via logerrit)
logerrit at kemper.freedesktop.org
Sat Feb 1 08:27:34 UTC 2020
i18nlangtag/source/languagetag/languagetag.cxx | 8 ++++++++
1 file changed, 8 insertions(+)
New commits:
commit 322f31dcf5c07025cf96b3de3fb1f258acce27c7
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:26:59 2020 +0100
android: Set the correct path for the liblangtag data.
Change-Id: I8b8bf76f086812c5f995c6ef513f0b7f773475ba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87787
Tested-by: Jenkins
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
diff --git a/i18nlangtag/source/languagetag/languagetag.cxx b/i18nlangtag/source/languagetag/languagetag.cxx
index 36b4a1eddb96..403981a30768 100644
--- a/i18nlangtag/source/languagetag/languagetag.cxx
+++ b/i18nlangtag/source/languagetag/languagetag.cxx
@@ -31,6 +31,10 @@
#endif
#include <liblangtag/langtag.h>
+#ifdef ANDROID
+#include <osl/detail/android-bootstrap.h>
+#endif
+
using namespace com::sun::star;
namespace {
@@ -198,6 +202,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