diff options
-rw-r--r-- | include/xmloff/xmlnumfe.hxx | 3 | ||||
-rw-r--r-- | xmloff/source/style/xmlnumfe.cxx | 5 |
2 files changed, 4 insertions, 4 deletions
diff --git a/include/xmloff/xmlnumfe.hxx b/include/xmloff/xmlnumfe.hxx index 8e47ff6dfbba..be72e4b3ac98 100644 --- a/include/xmloff/xmlnumfe.hxx +++ b/include/xmloff/xmlnumfe.hxx @@ -26,6 +26,7 @@ #include <com/sun/star/util/XNumberFormatsSupplier.hpp> #include <com/sun/star/uno/Sequence.h> #include <rtl/ustrbuf.hxx> +#include <memory> #define XML_WRITTENNUMBERSTYLES "WrittenNumberStyles" @@ -49,7 +50,7 @@ private: OUString sPrefix; SvNumberFormatter* pFormatter; OUStringBuffer sTextContent; - SvXMLNumUsedList_Impl* pUsedList; + std::unique_ptr<SvXMLNumUsedList_Impl> pUsedList; CharClass* pCharClass; LocaleDataWrapper* pLocaleData; diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx index dc785d07e585..78bd915f4dc5 100644 --- a/xmloff/source/style/xmlnumfe.cxx +++ b/xmloff/source/style/xmlnumfe.cxx @@ -254,7 +254,7 @@ SvXMLNumFmtExport::SvXMLNumFmtExport( pLocaleData = new LocaleDataWrapper( rExport.getComponentContext(), aLanguageTag ); } - pUsedList = new SvXMLNumUsedList_Impl; + pUsedList.reset(new SvXMLNumUsedList_Impl); } SvXMLNumFmtExport::SvXMLNumFmtExport( @@ -288,12 +288,11 @@ SvXMLNumFmtExport::SvXMLNumFmtExport( pLocaleData = new LocaleDataWrapper( rExport.getComponentContext(), aLanguageTag ); } - pUsedList = new SvXMLNumUsedList_Impl; + pUsedList.reset(new SvXMLNumUsedList_Impl); } SvXMLNumFmtExport::~SvXMLNumFmtExport() { - delete pUsedList; delete pLocaleData; delete pCharClass; } |