From ed9c39da0a90ecd4677a4d80a541ca64493994ce Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 17 Sep 2021 15:13:07 +0200 Subject: no need to store a CharClass in SvXMLNumFmtExport we only use it at one site, and at that site we can use the CharClass inside the formatter whose locale we just updated. Spotted by erack. Change-Id: I049c6fc399e62cfe83f3ae396ea8d0e7497e673f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122250 Tested-by: Jenkins Reviewed-by: Eike Rathke --- xmloff/source/style/xmlnumfe.cxx | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'xmloff') diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx index 42a918df4573..1f0639febaa5 100644 --- a/xmloff/source/style/xmlnumfe.cxx +++ b/xmloff/source/style/xmlnumfe.cxx @@ -221,8 +221,6 @@ SvXMLNumFmtExport::SvXMLNumFmtExport( if ( pFormatter ) { - pCharClass.reset( new CharClass( pFormatter->GetComponentContext(), - pFormatter->GetLanguageTag() ) ); pLocaleData.reset( new LocaleDataWrapper( pFormatter->GetComponentContext(), pFormatter->GetLanguageTag() ) ); } @@ -230,7 +228,6 @@ SvXMLNumFmtExport::SvXMLNumFmtExport( { LanguageTag aLanguageTag( MsLangId::getSystemLanguage() ); - pCharClass.reset( new CharClass( rExport.getComponentContext(), aLanguageTag ) ); pLocaleData.reset( new LocaleDataWrapper( rExport.getComponentContext(), aLanguageTag ) ); } @@ -254,8 +251,6 @@ SvXMLNumFmtExport::SvXMLNumFmtExport( if ( pFormatter ) { - pCharClass.reset( new CharClass( pFormatter->GetComponentContext(), - pFormatter->GetLanguageTag() ) ); pLocaleData.reset( new LocaleDataWrapper( pFormatter->GetComponentContext(), pFormatter->GetLanguageTag() ) ); } @@ -263,7 +258,6 @@ SvXMLNumFmtExport::SvXMLNumFmtExport( { LanguageTag aLanguageTag( MsLangId::getSystemLanguage() ); - pCharClass.reset( new CharClass( rExport.getComponentContext(), aLanguageTag ) ); pLocaleData.reset( new LocaleDataWrapper( rExport.getComponentContext(), aLanguageTag ) ); } @@ -895,8 +889,7 @@ bool SvXMLNumFmtExport::WriteTextWithCurrency_Impl( const OUString& rString, OUString sCurString, sDummy; pFormatter->GetCompatibilityCurrency( sCurString, sDummy ); - pCharClass.reset( new CharClass( pFormatter->GetComponentContext(), aLanguageTag ) ); - OUString sUpperStr = pCharClass->uppercase(rString); + OUString sUpperStr = pFormatter->GetCharClass()->uppercase(rString); sal_Int32 nPos = lcl_FindSymbol( sUpperStr, sCurString ); if ( nPos >= 0 ) { -- cgit