diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-01-18 14:29:59 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-01-19 08:00:58 +0200 |
commit | 73df118fde5ce5c380a5f9e8867240e2b5abfdcb (patch) | |
tree | 12316a7800593a09bedbe4624e02b1e591060f4f /sfx2 | |
parent | afaa10da25729f2aa5ca7df86d6bbea83d45cccf (diff) |
use rtl::Reference in SfxPopupWindow
instead of storing both a raw pointer and an uno::Reference
Change-Id: I8fc679cd22f2ac24fb3f1c71939318921c1d674b
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/toolbox/tbxitem.cxx | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx index 599a206d8706..15df10869efd 100644 --- a/sfx2/source/toolbox/tbxitem.cxx +++ b/sfx2/source/toolbox/tbxitem.cxx @@ -737,7 +737,6 @@ SfxPopupWindow::SfxPopupWindow( , m_bCascading( false ) , m_nId( nId ) , m_xFrame( rFrame ) - , m_pStatusListener( nullptr ) { vcl::Window* pWindow = GetTopMostParentSystemWindow( this ); if ( pWindow ) @@ -751,7 +750,6 @@ SfxPopupWindow::SfxPopupWindow(sal_uInt16 nId, const OString& rID, const OUStrin , m_bCascading( false ) , m_nId( nId ) , m_xFrame( rFrame ) - , m_pStatusListener( nullptr ) { vcl::Window* pWindow = GetTopMostParentSystemWindow( this ); if ( pWindow ) @@ -768,7 +766,6 @@ SfxPopupWindow::SfxPopupWindow( , m_bCascading( false ) , m_nId( nId ) , m_xFrame( rFrame ) - , m_pStatusListener( nullptr ) { vcl::Window* pWindow = GetTopMostParentSystemWindow( this ); if ( pWindow ) @@ -785,7 +782,6 @@ SfxPopupWindow::SfxPopupWindow( , m_bCascading( false ) , m_nId( nId ) , m_xFrame( rFrame ) - , m_pStatusListener( nullptr ) { vcl::Window* pWindow = GetTopMostParentSystemWindow( this ); if ( pWindow ) @@ -803,7 +799,6 @@ void SfxPopupWindow::dispose() { m_xStatusListener->dispose(); m_xStatusListener.clear(); - m_pStatusListener = nullptr; } vcl::Window* pWindow = GetTopMostParentSystemWindow( this ); @@ -817,14 +812,13 @@ void SfxPopupWindow::AddStatusListener( const OUString& rCommandURL ) { if ( !m_xStatusListener.is() ) { - m_pStatusListener = new SfxFrameStatusListener( + m_xStatusListener = new SfxFrameStatusListener( ::comphelper::getProcessComponentContext(), m_xFrame, this ); - m_xStatusListener.set( static_cast< cppu::OWeakObject* >( m_pStatusListener ), UNO_QUERY ); } if ( m_xStatusListener.is() ) - m_pStatusListener->addStatusListener( rCommandURL ); + m_xStatusListener->addStatusListener( rCommandURL ); } |