From d24f93dcf004dc81d4d5e9acec0b4e663fa09cd8 Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Thu, 16 Apr 2015 21:05:18 +0100 Subject: make CreateItemWindow return a VclPtr<>. Change-Id: Id15ff8900376aaee4343d7ee08ae062e1c462ce4 --- basctl/source/basicide/basicbox.cxx | 8 ++++---- basctl/source/basicide/basicbox.hxx | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'basctl') diff --git a/basctl/source/basicide/basicbox.cxx b/basctl/source/basicide/basicbox.cxx index 615aed48c4aa..a774c1bd796d 100644 --- a/basctl/source/basicide/basicbox.cxx +++ b/basctl/source/basicide/basicbox.cxx @@ -65,9 +65,9 @@ void LibBoxControl::StateChanged( sal_uInt16, SfxItemState eState, const SfxPool -vcl::Window* LibBoxControl::CreateItemWindow( vcl::Window *pParent ) +VclPtr LibBoxControl::CreateItemWindow( vcl::Window *pParent ) { - return new LibBox( pParent, m_xFrame ); + return VclPtr::Create( pParent, m_xFrame ); } @@ -362,9 +362,9 @@ void LanguageBoxControl::StateChanged( sal_uInt16 nID, SfxItemState eState, cons } } -vcl::Window* LanguageBoxControl::CreateItemWindow( vcl::Window *pParent ) +VclPtr LanguageBoxControl::CreateItemWindow( vcl::Window *pParent ) { - return new LanguageBox( pParent ); + return VclPtr::Create( pParent ); } // class basctl::LanguageBox ----------------------------------------------- diff --git a/basctl/source/basicide/basicbox.hxx b/basctl/source/basicide/basicbox.hxx index f13e0ea6e85f..1f87750cea4e 100644 --- a/basctl/source/basicide/basicbox.hxx +++ b/basctl/source/basicide/basicbox.hxx @@ -36,7 +36,7 @@ public: virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) SAL_OVERRIDE; - virtual vcl::Window* CreateItemWindow( vcl::Window *pParent ) SAL_OVERRIDE; + virtual VclPtr CreateItemWindow( vcl::Window *pParent ) SAL_OVERRIDE; }; /** base class for list boxes which need to update their content according to the list @@ -110,7 +110,7 @@ public: LanguageBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ); virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) SAL_OVERRIDE; - virtual vcl::Window* CreateItemWindow( vcl::Window *pParent ) SAL_OVERRIDE; + virtual VclPtr CreateItemWindow( vcl::Window *pParent ) SAL_OVERRIDE; }; class LanguageBox : public DocListenerBox -- cgit