From dac29c278531d5474289eb54aa03987c4958ac83 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 16 Sep 2021 11:03:04 +0200 Subject: speedup toUpperCase when called in parallel by removing locking from CharClass, which means we need to make it an immutable class Since SharedStringPool in sc/ stores a pointer to the CharClass in use, we have to tweak SvtSysLocale so that the object does not change location. Change-Id: I2c62d354fa542ebc04e755ce5b9b9e2ddff76a64 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122185 Tested-by: Jenkins Reviewed-by: Noel Grandin --- xmloff/source/style/xmlnumfe.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xmloff') diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx index 990cf15461a7..42a918df4573 100644 --- a/xmloff/source/style/xmlnumfe.cxx +++ b/xmloff/source/style/xmlnumfe.cxx @@ -895,7 +895,7 @@ bool SvXMLNumFmtExport::WriteTextWithCurrency_Impl( const OUString& rString, OUString sCurString, sDummy; pFormatter->GetCompatibilityCurrency( sCurString, sDummy ); - pCharClass->setLanguageTag( aLanguageTag ); + pCharClass.reset( new CharClass( pFormatter->GetComponentContext(), aLanguageTag ) ); OUString sUpperStr = pCharClass->uppercase(rString); sal_Int32 nPos = lcl_FindSymbol( sUpperStr, sCurString ); if ( nPos >= 0 ) -- cgit