summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndras Timar <andras.timar@collabora.com>2025-11-04 16:02:58 +0100
committerMiklos Vajna <vmiklos@collabora.com>2025-11-05 08:35:31 +0100
commitf845435a8a1fef2daa24abd87e5cfdea1fa9a7dc (patch)
tree6dadc7c20615d11ecde405c9571042f1057b7bdc
parentf60ee00edcc5b0fdee5227bb695448119cddb013 (diff)
if LOK_ALLOWLIST_LANGUAGES is not defined, allow all languagesco-25.04.7-1
Change-Id: I7cab7b87dea84449ceae65896841909362390235 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193425 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
-rw-r--r--comphelper/source/misc/lok.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/comphelper/source/misc/lok.cxx b/comphelper/source/misc/lok.cxx
index 4e06e0cfb2cd..4dc3afaf01d5 100644
--- a/comphelper/source/misc/lok.cxx
+++ b/comphelper/source/misc/lok.cxx
@@ -275,6 +275,10 @@ bool isAllowlistedLanguage(const OUString& lang)
}
std::cerr << std::endl;
}
+ else
+ {
+ aList.emplace_back("*"); // LOK_ALLOWLIST_LANGUAGES not defined, allow all
+ }
if (aList.empty())
std::cerr << "No language allowlisted, turning off the language support." << std::endl;
@@ -285,6 +289,9 @@ bool isAllowlistedLanguage(const OUString& lang)
if (aAllowlist.empty())
return false;
+ if (aAllowlist.size() == 1 && aAllowlist[0] == "*")
+ return true;
+
for (const auto& entry : aAllowlist)
{
if (lang.startsWith(entry))