summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
Diffstat (limited to 'starmath')
-rw-r--r--starmath/inc/smmod.hxx2
-rw-r--r--starmath/source/smmod.cxx9
2 files changed, 7 insertions, 4 deletions
diff --git a/starmath/inc/smmod.hxx b/starmath/inc/smmod.hxx
index 6c06c79e5aad..0ddb2e7cd5cd 100644
--- a/starmath/inc/smmod.hxx
+++ b/starmath/inc/smmod.hxx
@@ -112,7 +112,7 @@ public:
VirtualDevice & GetDefaultVirtualDev();
//virtual methods for options dialog
- virtual SfxItemSet* CreateItemSet( sal_uInt16 nId ) override;
+ virtual std::unique_ptr<SfxItemSet> CreateItemSet( sal_uInt16 nId ) override;
virtual void ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet ) override;
virtual VclPtr<SfxTabPage> CreateTabPage( sal_uInt16 nId, vcl::Window* pParent, const SfxItemSet& rSet ) override;
};
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,