summaryrefslogtreecommitdiff
path: root/sd/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-06-14 09:35:26 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-06-14 09:35:26 +0200
commit7f6a17756d62226dfa2af1ded365e3b3ac9f8d21 (patch)
tree596ab4f7e4d572b08e9affaefc4fae4e344b5f15 /sd/source
parent9a3a9a393c74872a5ec5f227b7c30ae3d4bcb1aa (diff)
Let CreateItemSet return unique_ptr
...and address resulting loplugin:useuniqueptr Change-Id: Ia79eb8d59ce5092b2d93b656eab687096baedf17
Diffstat (limited to 'sd/source')
-rw-r--r--sd/source/ui/app/sdmod2.cxx5
1 files changed, 3 insertions, 2 deletions
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 <editeng/eeitem.hxx>
#include <editeng/flditem.hxx>
+#include <o3tl/make_unique.hxx>
#include <sfx2/printer.hxx>
#include <sfx2/styfitem.hxx>
#include <svl/inethist.hxx>
@@ -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<SfxItemSet> 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<SfxItemSet>( rPool,
SID_ATTR_METRIC, SID_ATTR_METRIC,
SID_ATTR_DEFTABSTOP, SID_ATTR_DEFTABSTOP,