diff options
Diffstat (limited to 'xmloff/source/style/xmlnumfe.cxx')
-rw-r--r-- | xmloff/source/style/xmlnumfe.cxx | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx index 1fd79f01be4e..cc7dc555a106 100644 --- a/xmloff/source/style/xmlnumfe.cxx +++ b/xmloff/source/style/xmlnumfe.cxx @@ -229,17 +229,17 @@ SvXMLNumFmtExport::SvXMLNumFmtExport( if ( pFormatter ) { - pCharClass = new CharClass( pFormatter->GetComponentContext(), - pFormatter->GetLanguageTag() ); - pLocaleData = new LocaleDataWrapper( pFormatter->GetComponentContext(), - pFormatter->GetLanguageTag() ); + pCharClass.reset( new CharClass( pFormatter->GetComponentContext(), + pFormatter->GetLanguageTag() ) ); + pLocaleData.reset( new LocaleDataWrapper( pFormatter->GetComponentContext(), + pFormatter->GetLanguageTag() ) ); } else { LanguageTag aLanguageTag( MsLangId::getSystemLanguage() ); - pCharClass = new CharClass( rExport.getComponentContext(), aLanguageTag ); - pLocaleData = new LocaleDataWrapper( rExport.getComponentContext(), aLanguageTag ); + pCharClass.reset( new CharClass( rExport.getComponentContext(), aLanguageTag ) ); + pLocaleData.reset( new LocaleDataWrapper( rExport.getComponentContext(), aLanguageTag ) ); } pUsedList.reset(new SvXMLNumUsedList_Impl); @@ -263,17 +263,17 @@ SvXMLNumFmtExport::SvXMLNumFmtExport( if ( pFormatter ) { - pCharClass = new CharClass( pFormatter->GetComponentContext(), - pFormatter->GetLanguageTag() ); - pLocaleData = new LocaleDataWrapper( pFormatter->GetComponentContext(), - pFormatter->GetLanguageTag() ); + pCharClass.reset( new CharClass( pFormatter->GetComponentContext(), + pFormatter->GetLanguageTag() ) ); + pLocaleData.reset( new LocaleDataWrapper( pFormatter->GetComponentContext(), + pFormatter->GetLanguageTag() ) ); } else { LanguageTag aLanguageTag( MsLangId::getSystemLanguage() ); - pCharClass = new CharClass( rExport.getComponentContext(), aLanguageTag ); - pLocaleData = new LocaleDataWrapper( rExport.getComponentContext(), aLanguageTag ); + pCharClass.reset( new CharClass( rExport.getComponentContext(), aLanguageTag ) ); + pLocaleData.reset( new LocaleDataWrapper( rExport.getComponentContext(), aLanguageTag ) ); } pUsedList.reset(new SvXMLNumUsedList_Impl); @@ -281,8 +281,6 @@ SvXMLNumFmtExport::SvXMLNumFmtExport( SvXMLNumFmtExport::~SvXMLNumFmtExport() { - delete pLocaleData; - delete pCharClass; } // helper methods |