use std::unique_ptr
Change-Id: I71627aa2a524a59180e8934df9561cf67a1c6126
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include <xmloff/xmluconv.hxx>
|
||||
#include "ximpnote.hxx"
|
||||
#include <tools/debug.hxx>
|
||||
#include <o3tl/make_unique.hxx>
|
||||
#include <osl/diagnose.h>
|
||||
|
||||
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
|
||||
@@ -923,14 +924,8 @@ SdXMLStylesContext::SdXMLStylesContext(
|
||||
mbIsAutoStyle(bIsAutoStyle)
|
||||
{
|
||||
Reference< uno::XComponentContext > xContext = rImport.GetComponentContext();
|
||||
mpNumFormatter = new SvNumberFormatter( xContext, LANGUAGE_SYSTEM );
|
||||
mpNumFmtHelper = new SvXMLNumFmtHelper( mpNumFormatter, xContext );
|
||||
}
|
||||
|
||||
SdXMLStylesContext::~SdXMLStylesContext()
|
||||
{
|
||||
delete mpNumFmtHelper;
|
||||
delete mpNumFormatter;
|
||||
mpNumFormatter = o3tl::make_unique<SvNumberFormatter>( xContext, LANGUAGE_SYSTEM );
|
||||
mpNumFmtHelper = o3tl::make_unique<SvXMLNumFmtHelper>( mpNumFormatter.get(), xContext );
|
||||
}
|
||||
|
||||
SvXMLStyleContext* SdXMLStylesContext::CreateStyleChildContext(
|
||||
|
@@ -25,6 +25,7 @@
|
||||
#include "ximppage.hxx"
|
||||
#include <xmloff/xmlstyle.hxx>
|
||||
#include <com/sun/star/view/PaperOrientation.hpp>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
class SvNumberFormatter;
|
||||
@@ -176,8 +177,8 @@ class SdXMLStylesContext : public SvXMLStylesContext
|
||||
{
|
||||
rtl::Reference< SvXMLImportPropertyMapper > xPresImpPropMapper;
|
||||
bool mbIsAutoStyle;
|
||||
SvXMLNumFmtHelper* mpNumFmtHelper;
|
||||
SvNumberFormatter* mpNumFormatter;
|
||||
std::unique_ptr<SvXMLNumFmtHelper> mpNumFmtHelper;
|
||||
std::unique_ptr<SvNumberFormatter> mpNumFormatter;
|
||||
|
||||
const SdXMLImport& GetSdImport() const { return static_cast<const SdXMLImport&>(GetImport()); }
|
||||
SdXMLImport& GetSdImport() { return static_cast<SdXMLImport&>(GetImport()); }
|
||||
@@ -211,7 +212,6 @@ public:
|
||||
const OUString& rLName,
|
||||
const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList,
|
||||
bool bIsAutoStyle);
|
||||
virtual ~SdXMLStylesContext();
|
||||
|
||||
virtual sal_uInt16 GetFamily( const OUString& rFamily ) const override;
|
||||
virtual void EndElement() override;
|
||||
|
Reference in New Issue
Block a user