summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-04-16 21:05:18 +0100
committerMichael Meeks <michael.meeks@collabora.com>2015-04-16 21:31:18 +0100
commitd24f93dcf004dc81d4d5e9acec0b4e663fa09cd8 (patch)
treefb9dfae53e6b56dedf4e56b0b5fa45f5691ef565 /sfx2
parent384e705a9e1e41dd859d22a09293c65a28ef6535 (diff)
make CreateItemWindow return a VclPtr<>.
Change-Id: Id15ff8900376aaee4343d7ee08ae062e1c462ce4
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/inc/inettbc.hxx2
-rw-r--r--sfx2/source/inet/inettbc.cxx7
-rw-r--r--sfx2/source/toolbox/tbxitem.cxx4
3 files changed, 6 insertions, 7 deletions
diff --git a/sfx2/inc/inettbc.hxx b/sfx2/inc/inettbc.hxx
index 9bcfe6aeed57..dcc6b1120076 100644
--- a/sfx2/inc/inettbc.hxx
+++ b/sfx2/inc/inettbc.hxx
@@ -53,7 +53,7 @@ public:
SfxURLToolBoxControl_Impl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rBox );
virtual ~SfxURLToolBoxControl_Impl();
- virtual vcl::Window* CreateItemWindow( vcl::Window* pParent ) SAL_OVERRIDE;
+ virtual VclPtr<vcl::Window> CreateItemWindow( vcl::Window* pParent ) SAL_OVERRIDE;
virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) SAL_OVERRIDE;
};
diff --git a/sfx2/source/inet/inettbc.cxx b/sfx2/source/inet/inettbc.cxx
index 29a5168987f0..81f89fbf3aa3 100644
--- a/sfx2/source/inet/inettbc.cxx
+++ b/sfx2/source/inet/inettbc.cxx
@@ -152,13 +152,12 @@ IMPL_STATIC_LINK_NOINSTANCE( SfxURLToolBoxControl_Impl, ExecuteHdl_Impl, Execute
}
-vcl::Window* SfxURLToolBoxControl_Impl::CreateItemWindow( vcl::Window* pParent )
+VclPtr<vcl::Window> SfxURLToolBoxControl_Impl::CreateItemWindow( vcl::Window* pParent )
{
- SvtURLBox* pURLBox = new SvtURLBox( pParent );
+ VclPtrInstance<SvtURLBox> pURLBox( pParent );
pURLBox->SetOpenHdl( LINK( this, SfxURLToolBoxControl_Impl, OpenHdl ) );
pURLBox->SetSelectHdl( LINK( this, SfxURLToolBoxControl_Impl, SelectHdl ) );
-
- return pURLBox;
+ return pURLBox.get();
}
IMPL_LINK_NOARG(SfxURLToolBoxControl_Impl, SelectHdl)
diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx
index 4fedbfaa334d..f229d8d6a5ab 100644
--- a/sfx2/source/toolbox/tbxitem.cxx
+++ b/sfx2/source/toolbox/tbxitem.cxx
@@ -989,9 +989,9 @@ SfxPopupWindow* SfxToolBoxControl::CreatePopupWindowCascading()
-vcl::Window* SfxToolBoxControl::CreateItemWindow( vcl::Window * )
+VclPtr<vcl::Window> SfxToolBoxControl::CreateItemWindow( vcl::Window * )
{
- return 0;
+ return VclPtr<vcl::Window>();
}