summaryrefslogtreecommitdiff
path: root/i18nlangtag
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2022-12-28 13:47:26 +0200
committerTor Lillqvist <tml@collabora.com>2022-12-28 13:08:56 +0000
commitde3b4b02008d708a66f8d6a8a365974eac7de3b3 (patch)
tree6155bc059c83706117233e445ce6cc1f78b4c129 /i18nlangtag
parenta510543a466aca0d152f82af24d16563f28455f0 (diff)
Introduce lo_get_app_data_dir() for Emscripten, too
And not just Android. Hardcoded to return "/instdir" to match what is in the emscripten_fs_image. Change-Id: I26d4ec5e02ec9900e35ca47f1565a13ad2b723b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144849 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'i18nlangtag')
-rw-r--r--i18nlangtag/source/languagetag/languagetag.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/i18nlangtag/source/languagetag/languagetag.cxx b/i18nlangtag/source/languagetag/languagetag.cxx
index 92b9b5807e99..b54c2614e7f2 100644
--- a/i18nlangtag/source/languagetag/languagetag.cxx
+++ b/i18nlangtag/source/languagetag/languagetag.cxx
@@ -36,6 +36,10 @@
#include <osl/detail/android-bootstrap.h>
#endif
+#ifdef EMSCRIPTEN
+#include <osl/detail/emscripten-bootstrap.h>
+#endif
+
using namespace com::sun::star;
namespace {
@@ -215,7 +219,7 @@ void LiblangtagDataRef::teardown()
void LiblangtagDataRef::setupDataPath()
{
-#if defined(ANDROID)
+#if defined(ANDROID) || defined(EMSCRIPTEN)
maDataPath = OString(lo_get_app_data_dir()) + "/share/liblangtag";
#else
// maDataPath is assumed to be empty here.