Related: tdf#142293 Use the same locale to lowercase as was to uppercase

... so a #NAME? bad token isn't mixed up like it was with the
stored loaded from document
com.sun.star.sheet.addin.Analysis.getEdate
upper-cased in tr-TR to
COM.SUN.STAR.SHEET.ADDİN.ANALYSİS.GETEDATE
and then lower-cased in en-US to
com.sun.star.sheet.addİn.analysİs.getedate
which confusingly was the user-visible token string.

Change-Id: I341648fcf34fa1cae164d24ad2023bd74573bd3c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136071
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 34accc2..301d90e 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -4617,7 +4617,8 @@ Label_Rewind:
    // Provide single token information and continue. Do not set an error, that
    // would prematurely end compilation. Simple unknown names are handled by
    // the interpreter.
    aUpper = pCharClass->lowercase( aUpper );
    // Use the same CharClass that was used for uppercase.
    aUpper = (mbCharClassesDiffer ? ScGlobal::getCharClass() : *pCharClass).lowercase( aUpper );
    svl::SharedString aSS = rDoc.GetSharedStringPool().intern(aUpper);
    maRawToken.SetString(aSS.getData(), aSS.getDataIgnoreCase());
    maRawToken.NewOpCode( ocBad );