summaryrefslogtreecommitdiffstats
path: root/UnoControls/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-10-25 11:47:17 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-10-25 11:16:02 +0000
commitc5498c310f6765ec9857e34169fd4a8d48953eb7 (patch)
treecd89d0c906677e80b6953c5a4fd7746ee59eff52 /UnoControls/source
parenttdf#103409: No selection outline displayed when SUM button is clicked (diff)
downloadcore-c5498c310f6765ec9857e34169fd4a8d48953eb7.tar.gz
core-c5498c310f6765ec9857e34169fd4a8d48953eb7.zip
loplugin:expandablemethods in UnoControls..vbahelper
Change-Id: I7e607df2a1f6d4eb207ee0d3eb30f41fac44a0c6 Reviewed-on: https://gerrit.libreoffice.org/30262 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'UnoControls/source')
-rw-r--r--UnoControls/source/base/basecontrol.cxx48
1 files changed, 19 insertions, 29 deletions
diff --git a/UnoControls/source/base/basecontrol.cxx b/UnoControls/source/base/basecontrol.cxx
index b9c7e4cf0052..457dd5cb7821 100644
--- a/UnoControls/source/base/basecontrol.cxx
+++ b/UnoControls/source/base/basecontrol.cxx
@@ -231,7 +231,25 @@ void SAL_CALL BaseControl::dispose() throw( RuntimeException, std::exception )
// release context and peer
m_xContext.clear();
- impl_releasePeer();
+ if ( m_xPeer.is() )
+ {
+ if ( m_xGraphicsPeer.is() )
+ {
+ removePaintListener( this );
+ removeWindowListener( this );
+ m_xGraphicsPeer.clear();
+ }
+
+ m_xPeer->dispose();
+ m_xPeerWindow.clear();
+ m_xPeer.clear();
+
+ if ( m_pMultiplexer != nullptr )
+ {
+ // take changes on multiplexer
+ m_pMultiplexer->setPeer( Reference< XWindow >() );
+ }
+ }
// release view
if ( m_xGraphicsView.is() )
@@ -741,34 +759,6 @@ void BaseControl::impl_recalcLayout( const WindowEvent& /*aEvent*/ )
// But we make it not pure virtual because it's not necessary for all derived classes!
}
-// protected method
-
-
-// private method
-
-void BaseControl::impl_releasePeer()
-{
- if ( m_xPeer.is() )
- {
- if ( m_xGraphicsPeer.is() )
- {
- removePaintListener( this );
- removeWindowListener( this );
- m_xGraphicsPeer.clear();
- }
-
- m_xPeer->dispose();
- m_xPeerWindow.clear();
- m_xPeer.clear();
-
- if ( m_pMultiplexer != nullptr )
- {
- // take changes on multiplexer
- m_pMultiplexer->setPeer( Reference< XWindow >() );
- }
- }
-}
-
// private method
OMRCListenerMultiplexerHelper* BaseControl::impl_getMultiplexer()