From c5ddccf7376c75ad1f1b963c84f39e7bbc5807ae Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Thu, 23 Jun 2022 23:59:40 +0200 Subject: [PATCH] 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 Tested-by: Jenkins --- sc/source/core/tool/compiler.cxx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index 1f83d27d3c3f..14ae448f06b9 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;