From 7f6a17756d62226dfa2af1ded365e3b3ac9f8d21 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 14 Jun 2017 09:35:26 +0200 Subject: Let CreateItemSet return unique_ptr ...and address resulting loplugin:useuniqueptr Change-Id: Ia79eb8d59ce5092b2d93b656eab687096baedf17 --- sd/source/ui/app/sdmod2.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sd/source') diff --git a/sd/source/ui/app/sdmod2.cxx b/sd/source/ui/app/sdmod2.cxx index 4ddeb6ff5eec..2ddb26a7ee84 100644 --- a/sd/source/ui/app/sdmod2.cxx +++ b/sd/source/ui/app/sdmod2.cxx @@ -19,6 +19,7 @@ #include #include +#include #include #include #include @@ -409,7 +410,7 @@ IMPL_LINK(SdModule, CalcFieldValueHdl, EditFieldInfo*, pInfo, void) /** * virtual methods for option dialog */ -SfxItemSet* SdModule::CreateItemSet( sal_uInt16 nSlot ) +std::unique_ptr SdModule::CreateItemSet( sal_uInt16 nSlot ) { ::sd::FrameView* pFrameView = nullptr; ::sd::DrawDocShell* pDocSh = dynamic_cast< ::sd::DrawDocShell *>( SfxObjectShell::Current() ); @@ -440,7 +441,7 @@ SfxItemSet* SdModule::CreateItemSet( sal_uInt16 nSlot ) SfxItemPool& rPool = GetPool(); rPool.SetDefaultMetric( MapUnit::Map100thMM ); - SfxItemSet* pRet = new SfxItemSet( rPool, + auto pRet = o3tl::make_unique( rPool, SID_ATTR_METRIC, SID_ATTR_METRIC, SID_ATTR_DEFTABSTOP, SID_ATTR_DEFTABSTOP, -- cgit v1.2.3