[Libreoffice-commits] core.git: sc/source

Eike Rathke (via logerrit) logerrit at kemper.freedesktop.org
Tue Sep 29 00:22:39 UTC 2020


 sc/source/core/tool/compiler.cxx |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

New commits:
commit d41c45a522c5e973d7043d36bc6c82e77735ab9b
Author:     Eike Rathke <erack at redhat.com>
AuthorDate: Tue Sep 29 01:31:39 2020 +0200
Commit:     Eike Rathke <erack at redhat.com>
CommitDate: Tue Sep 29 02:21:55 2020 +0200

    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 at redhat.com>
    Tested-by: Jenkins

diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 2050a2100579..f4967ec2381f 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;


More information about the Libreoffice-commits mailing list