sc/source/core/tool/compiler.cxx |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit 39cd1c5b261262e0c9630f2e047979d64a4e58d6
Author:     Eike Rathke <er...@redhat.com>
AuthorDate: Thu Jun 23 23:59:40 2022 +0200
Commit:     Adolfo Jayme Barrientos <fit...@ubuntu.com>
CommitDate: Fri Jun 24 17:20:18 2022 +0200

    Twice uppercase is one too much
    
    In both cases if ToUpperAsciiOrI18nIsAscii() returned
    bAsciiUpper=true or the pCharClass->uppercase() was executed and
    its CharClass locale differs from ScGlobal::getCharClass(), the
    ScGlobal::getCharClass().uppercase() was executed after. If
    pCharClass has the same locale as ScGlobal::getCharClass()
    (mbCharClassesDiffer==false) that was executed once. In any case
    the result is a ScGlobal::getCharClass() locale's uppercase. Do
    that only once.
    
    Change-Id: I1928b73b35b50068f96d809d9fa0734ec80a446d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136353
    Reviewed-by: Eike Rathke <er...@redhat.com>
    Tested-by: Jenkins
    (cherry picked from commit c5ddccf7376c75ad1f1b963c84f39e7bbc5807ae)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136387
    Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>

diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 2945062f1b37..b1de55436f9c 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -3350,10 +3350,7 @@ bool ScCompiler::ParseSingleReference( const OUString& 
rName, const OUString* pE
             // A named range named e.g. 'num1' is valid with 1k columns, but 
would become a reference
             // when the document is opened later with 16k columns. Resolve the 
conflict by not
             // considering it a reference.
-            OUString aUpper;
-            bool bAsciiUpper = ToUpperAsciiOrI18nIsAscii( aUpper, rName );
-            if (bAsciiUpper || mbCharClassesDiffer)
-                aUpper = ScGlobal::getCharClass().uppercase( rName );
+            OUString aUpper( ScGlobal::getCharClass().uppercase( rName ));
             mnCurrentSheetTab = aAddr.Tab(); // temporarily set for 
ParseNamedRange()
             if(ParseNamedRange( aUpper, true )) // only check
                 return false;

Reply via email to