[Libreoffice-commits] core.git: include/xmloff xmloff/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Fri Sep 17 18:15:03 UTC 2021
include/xmloff/xmlnumfe.hxx | 1 -
xmloff/source/style/xmlnumfe.cxx | 9 +--------
2 files changed, 1 insertion(+), 9 deletions(-)
New commits:
commit ed9c39da0a90ecd4677a4d80a541ca64493994ce
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Fri Sep 17 15:13:07 2021 +0200
Commit: Eike Rathke <erack at redhat.com>
CommitDate: Fri Sep 17 20:14:25 2021 +0200
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 at redhat.com>
diff --git a/include/xmloff/xmlnumfe.hxx b/include/xmloff/xmlnumfe.hxx
index 28bfe8d1a2ad..2949aed76679 100644
--- a/include/xmloff/xmlnumfe.hxx
+++ b/include/xmloff/xmlnumfe.hxx
@@ -53,7 +53,6 @@ private:
OUStringBuffer sTextContent;
bool bHasText;
std::unique_ptr<SvXMLNumUsedList_Impl> pUsedList;
- std::unique_ptr<CharClass> pCharClass;
std::unique_ptr<LocaleDataWrapper> pLocaleData;
SAL_DLLPRIVATE void AddCalendarAttr_Impl( const OUString& rCalendar );
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 )
{
More information about the Libreoffice-commits
mailing list