summaryrefslogtreecommitdiff
path: root/UnoControls
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
parent97f0fbe5830a5d2119fe9f5e8142fe45b255c2ac (diff)
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')
-rw-r--r--UnoControls/inc/basecontrol.hxx2
-rw-r--r--UnoControls/source/base/basecontrol.cxx48
2 files changed, 19 insertions, 31 deletions
diff --git a/UnoControls/inc/basecontrol.hxx b/UnoControls/inc/basecontrol.hxx
index f78686e483fb..fbf1686d2a51 100644
--- a/UnoControls/inc/basecontrol.hxx
+++ b/UnoControls/inc/basecontrol.hxx
@@ -379,8 +379,6 @@ protected:
private:
- void impl_releasePeer();
-
OMRCListenerMultiplexerHelper* impl_getMultiplexer();
css::uno::Reference< css::uno::XComponentContext > m_xComponentContext;
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()