summaryrefslogtreecommitdiff
path: root/starmath/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 /starmath/source
parent9a3a9a393c74872a5ec5f227b7c30ae3d4bcb1aa (diff)
Let CreateItemSet return unique_ptr
...and address resulting loplugin:useuniqueptr Change-Id: Ia79eb8d59ce5092b2d93b656eab687096baedf17
Diffstat (limited to 'starmath/source')
-rw-r--r--starmath/source/smmod.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/starmath/source/smmod.cxx b/starmath/source/smmod.cxx
index 50ae3d252f5d..e4ce32a4baeb 100644
--- a/starmath/source/smmod.cxx
+++ b/starmath/source/smmod.cxx
@@ -17,6 +17,9 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <o3tl/make_unique.hxx>
#include <sfx2/objface.hxx>
#include <svl/whiter.hxx>
#include <sfx2/sfx.hrc>
@@ -239,12 +242,12 @@ void SmModule::GetState(SfxItemSet &rSet)
}
}
-SfxItemSet* SmModule::CreateItemSet( sal_uInt16 nId )
+std::unique_ptr<SfxItemSet> SmModule::CreateItemSet( sal_uInt16 nId )
{
- SfxItemSet* pRet = nullptr;
+ std::unique_ptr<SfxItemSet> pRet;
if(nId == SID_SM_EDITOPTIONS)
{
- pRet = new SfxItemSet(GetPool(),
+ pRet = o3tl::make_unique<SfxItemSet>(GetPool(),
//TP_SMPRINT
SID_PRINTSIZE, SID_PRINTSIZE,
SID_PRINTZOOM, SID_PRINTZOOM,