diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/swmodule.hxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/app/appopt.cxx | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/sw/inc/swmodule.hxx b/sw/inc/swmodule.hxx index 71cf3c0f499f..3c7839ffa6ce 100644 --- a/sw/inc/swmodule.hxx +++ b/sw/inc/swmodule.hxx @@ -221,7 +221,7 @@ public: SwFieldUpdateFlags GetFieldUpdateFlags() const; // 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; virtual SfxStyleFamilies* CreateStyleFamilies() override; diff --git a/sw/source/uibase/app/appopt.cxx b/sw/source/uibase/app/appopt.cxx index 732b413e0334..9db1a4b61002 100644 --- a/sw/source/uibase/app/appopt.cxx +++ b/sw/source/uibase/app/appopt.cxx @@ -23,6 +23,7 @@ #include <com/sun/star/i18n/ScriptType.hpp> #include <hintids.hxx> +#include <o3tl/make_unique.hxx> #include <vcl/msgbox.hxx> #include <svl/eitem.hxx> #include <sfx2/request.hxx> @@ -72,7 +73,7 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; -SfxItemSet* SwModule::CreateItemSet( sal_uInt16 nId ) +std::unique_ptr<SfxItemSet> SwModule::CreateItemSet( sal_uInt16 nId ) { bool bTextDialog = (nId == SID_SW_EDITOPTIONS); @@ -96,7 +97,7 @@ SfxItemSet* SwModule::CreateItemSet( sal_uInt16 nId ) } // Options/Edit - SfxItemSet* pRet = new SfxItemSet (GetPool(), FN_PARAM_DOCDISP, FN_PARAM_ELEM, + auto pRet = o3tl::make_unique<SfxItemSet>(GetPool(), FN_PARAM_DOCDISP, FN_PARAM_ELEM, SID_PRINTPREVIEW, SID_PRINTPREVIEW, SID_ATTR_GRID_OPTIONS, SID_ATTR_GRID_OPTIONS, FN_PARAM_PRINTER, FN_PARAM_STDFONTS, |