Current sytem locale's CharClass for user defined names, tdf#137091 follow-up
Change-Id: I5f025a12ca183acb3f80d2a7527677aceb9ffbd5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103593
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 2050a21..f4967ec 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -4411,8 +4411,14 @@ bool ScCompiler::NextNewToken( bool bInArray )
return true;
// User defined names and such do need i18n upper also in ODF.
if (bAsciiUpper)
aUpper = pCharClass->uppercase( aOrg );
if (bAsciiUpper || pCharClass->getLanguageTag() != ScGlobal::getCharClassPtr()->getLanguageTag())
{
// Use current system locale here because user defined symbols are
// more likely in that localized language than in the formula
// language. This in corner cases needs to continue to work for
// existing documents and environments.
aUpper = ScGlobal::getCharClassPtr()->uppercase( aOrg );
}
if (IsNamedRange( aUpper ))
return true;