diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-12-11 12:59:35 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-12-12 07:31:12 +0100 |
commit | 0dd025a2180e7fb1bf27a71687769a61d608abf2 (patch) | |
tree | cc538f53320916029f87681667af33a0f3239983 /include | |
parent | loplugin:useuniqueptr in editeng (diff) | |
download | core-0dd025a2180e7fb1bf27a71687769a61d608abf2.tar.gz core-0dd025a2180e7fb1bf27a71687769a61d608abf2.zip |
use unique_ptr for SfxChildWinFactory
Change-Id: I4305310ea296a5326838759742b14e687158d426
Reviewed-on: https://gerrit.libreoffice.org/64954
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/sfx2/app.hxx | 2 | ||||
-rw-r--r-- | include/sfx2/childwin.hxx | 6 | ||||
-rw-r--r-- | include/sfx2/module.hxx | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/include/sfx2/app.hxx b/include/sfx2/app.hxx index 701fa90475b3..27653aed3e98 100644 --- a/include/sfx2/app.hxx +++ b/include/sfx2/app.hxx @@ -190,7 +190,7 @@ public: SAL_DLLPRIVATE SfxAppData_Impl* Get_Impl() const { return pImpl.get(); } // Object-Factories/global arrays - SAL_DLLPRIVATE void RegisterChildWindow_Impl(SfxModule*, SfxChildWinFactory*); + SAL_DLLPRIVATE void RegisterChildWindow_Impl(SfxModule*, std::unique_ptr<SfxChildWinFactory>); SAL_DLLPRIVATE void RegisterChildWindowContext_Impl(SfxModule*, sal_uInt16, std::unique_ptr<SfxChildWinContextFactory>); SAL_DLLPRIVATE void RegisterStatusBarControl_Impl(SfxModule*, const SfxStbCtrlFactory&); SAL_DLLPRIVATE void RegisterToolBoxControl_Impl( SfxModule*, const SfxTbxCtrlFactory&); diff --git a/include/sfx2/childwin.hxx b/include/sfx2/childwin.hxx index 74efab5857de..3ddc7a377dae 100644 --- a/include/sfx2/childwin.hxx +++ b/include/sfx2/childwin.hxx @@ -191,7 +191,7 @@ public: virtual SfxChildWinInfo GetInfo() const; void SaveStatus(const SfxChildWinInfo& rInfo); - static void RegisterChildWindow(SfxModule*, SfxChildWinFactory*); + static void RegisterChildWindow(SfxModule*, std::unique_ptr<SfxChildWinFactory>); static SfxChildWindow* CreateChildWindow( sal_uInt16, vcl::Window*, SfxBindings*, SfxChildWinInfo const &); void SetHideNotDelete( bool bOn ); @@ -266,11 +266,11 @@ public: } \ void Class::RegisterChildWindow (bool bVis, SfxModule *pMod, SfxChildWindowFlags nFlags) \ { \ - SfxChildWinFactory *pFact = new SfxChildWinFactory( \ + auto pFact = o3tl::make_unique<SfxChildWinFactory>( \ Class::CreateImpl, MyID, Pos ); \ pFact->aInfo.nFlags |= nFlags; \ pFact->aInfo.bVisible = bVis; \ - SfxChildWindow::RegisterChildWindow(pMod, pFact); \ + SfxChildWindow::RegisterChildWindow(pMod, std::move(pFact)); \ } #define SFX_IMPL_POS_CHILDWINDOW_WITHID(Class, MyID, Pos) \ diff --git a/include/sfx2/module.hxx b/include/sfx2/module.hxx index 842cab05e4e8..5709e4a90fbb 100644 --- a/include/sfx2/module.hxx +++ b/include/sfx2/module.hxx @@ -75,7 +75,7 @@ public: SfxSlotPool* GetSlotPool() const; void RegisterToolBoxControl(const SfxTbxCtrlFactory&); - void RegisterChildWindow(SfxChildWinFactory*); + void RegisterChildWindow(std::unique_ptr<SfxChildWinFactory>); void RegisterStatusBarControl(const SfxStbCtrlFactory&); virtual VclPtr<SfxTabPage> CreateTabPage( sal_uInt16 nId, |