diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-04-16 21:05:18 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-04-16 21:31:18 +0100 |
commit | d24f93dcf004dc81d4d5e9acec0b4e663fa09cd8 (patch) | |
tree | fb9dfae53e6b56dedf4e56b0b5fa45f5691ef565 /avmedia | |
parent | 384e705a9e1e41dd859d22a09293c65a28ef6535 (diff) |
make CreateItemWindow return a VclPtr<>.
Change-Id: Id15ff8900376aaee4343d7ee08ae062e1c462ce4
Diffstat (limited to 'avmedia')
-rw-r--r-- | avmedia/source/framework/mediaplayer.cxx | 2 | ||||
-rw-r--r-- | avmedia/source/framework/mediatoolbox.cxx | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/avmedia/source/framework/mediaplayer.cxx b/avmedia/source/framework/mediaplayer.cxx index 7adfb4e83826..28adf1959c8e 100644 --- a/avmedia/source/framework/mediaplayer.cxx +++ b/avmedia/source/framework/mediaplayer.cxx @@ -40,7 +40,7 @@ namespace avmedia MediaPlayer::MediaPlayer( vcl::Window* _pParent, sal_uInt16 nId, SfxBindings* _pBindings, SfxChildWinInfo* pInfo ) : SfxChildWindow( _pParent, nId ) { - pWindow = VclPtr<MediaFloater>::Create( _pBindings, this, _pParent ); + pWindow.reset( VclPtr<MediaFloater>::Create( _pBindings, this, _pParent ) ); eChildAlignment = SfxChildAlignment::NOALIGNMENT; static_cast< MediaFloater* >( pWindow.get() )->Initialize( pInfo ); }; diff --git a/avmedia/source/framework/mediatoolbox.cxx b/avmedia/source/framework/mediatoolbox.cxx index 124da20680ed..4f20a781c676 100644 --- a/avmedia/source/framework/mediatoolbox.cxx +++ b/avmedia/source/framework/mediatoolbox.cxx @@ -124,9 +124,9 @@ void MediaToolBoxControl::StateChanged( sal_uInt16 /* nSID */, SfxItemState eSta -vcl::Window* MediaToolBoxControl::CreateItemWindow( vcl::Window *pParent ) +VclPtr<vcl::Window> MediaToolBoxControl::CreateItemWindow( vcl::Window *pParent ) { - return( pParent ? new MediaToolBoxControl_Impl( *pParent, *this ) : NULL ); + return ( pParent ? VclPtr<MediaToolBoxControl_Impl>::Create( *pParent, *this ) : nullptr ); } |