diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-12-12 09:47:18 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-12-12 09:54:07 +0100 |
commit | 0bab9c02285ead494edbc456a96f38545823bb10 (patch) | |
tree | 86543e7d7db14858f057411e0b055a0f0b9bb8aa /include | |
parent | m_EntryList just shadows ComboBox entries (diff) | |
download | core-0bab9c02285ead494edbc456a96f38545823bb10.tar.gz core-0bab9c02285ead494edbc456a96f38545823bb10.zip |
use unique_ptr in SfxChildWinCtor
Change-Id: I155036f6a47c765595938ff325ede6bbe6dd5c48
Reviewed-on: https://gerrit.libreoffice.org/65000
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/sfx2/childwin.hxx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/include/sfx2/childwin.hxx b/include/sfx2/childwin.hxx index 3ddc7a377dae..03f7f20292b2 100644 --- a/include/sfx2/childwin.hxx +++ b/include/sfx2/childwin.hxx @@ -82,7 +82,7 @@ struct SAL_DLLPUBLIC_RTTI SfxChildWinInfo }; // ChildWindow factory methods -typedef SfxChildWindow* (*SfxChildWinCtor)( vcl::Window *pParentWindow, +typedef std::unique_ptr<SfxChildWindow> (*SfxChildWinCtor)( vcl::Window *pParentWindow, sal_uInt16 nId, SfxBindings *pBindings, SfxChildWinInfo *pInfo); @@ -193,7 +193,7 @@ public: static void RegisterChildWindow(SfxModule*, std::unique_ptr<SfxChildWinFactory>); - static SfxChildWindow* CreateChildWindow( sal_uInt16, vcl::Window*, SfxBindings*, SfxChildWinInfo const &); + static std::unique_ptr<SfxChildWindow> CreateChildWindow( sal_uInt16, vcl::Window*, SfxBindings*, SfxChildWinInfo const &); void SetHideNotDelete( bool bOn ); bool IsHideNotDelete() const; bool IsVisible() const; @@ -242,7 +242,7 @@ public: #define SFX_DECL_CHILDWINDOW(Class) \ public : \ - static SfxChildWindow* CreateImpl(vcl::Window *pParent, sal_uInt16 nId, \ + static std::unique_ptr<SfxChildWindow> CreateImpl(vcl::Window *pParent, sal_uInt16 nId, \ SfxBindings *pBindings, SfxChildWinInfo* pInfo ); \ static void RegisterChildWindow (bool bVisible=false, SfxModule *pMod=nullptr, SfxChildWindowFlags nFlags=SfxChildWindowFlags::NONE); \ virtual SfxChildWinInfo GetInfo() const override @@ -258,11 +258,10 @@ public: SFX_IMPL_POS_CHILDWINDOW_WITHID(Class, MyID, CHILDWIN_NOPOS) #define SFX_IMPL_POS_CHILDWINDOW(Class, MyID, Pos) \ - SfxChildWindow* Class::CreateImpl( vcl::Window *pParent, \ + std::unique_ptr<SfxChildWindow> Class::CreateImpl( vcl::Window *pParent, \ sal_uInt16 nId, SfxBindings *pBindings, SfxChildWinInfo* pInfo ) \ { \ - SfxChildWindow *pWin = new Class(pParent, nId, pBindings, pInfo);\ - return pWin; \ + return o3tl::make_unique<Class>(pParent, nId, pBindings, pInfo);\ } \ void Class::RegisterChildWindow (bool bVis, SfxModule *pMod, SfxChildWindowFlags nFlags) \ { \ |