summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-09-17 15:13:07 +0200
committerEike Rathke <erack@redhat.com>2021-09-17 20:14:25 +0200
commited9c39da0a90ecd4677a4d80a541ca64493994ce (patch)
tree43222c8c7fd5f75703c3be77cc1f69f082a3fbc3 /xmloff
parent0b1d1739aa2ed7e0fbdc79a1403bfdc8dad3958b (diff)
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 <erack@redhat.com>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/style/xmlnumfe.cxx9
1 files changed, 1 insertions, 8 deletions
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 )
{