if LOK_ALLOWLIST_LANGUAGES is not defined, allow all languages

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>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195660
Tested-by: Jenkins
Reviewed-by: Andras Timar <andras.timar@collabora.com>
This commit is contained in:
Andras Timar
2025-12-15 18:14:17 +01:00
parent 17c7e080bb
commit 348161ac8c
+7
View File
@@ -285,6 +285,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;
@@ -295,6 +299,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))