diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-09-15 15:54:19 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-09-16 08:30:26 +0000 |
commit | a2b77b43685884fb4e9be04152a49294fa50db36 (patch) | |
tree | 00d599e81a653dc5c663f9dd179970b3e6aa11f2 /extensions | |
parent | 389939b02bde4ea72268960310bbd1f2984200bf (diff) |
loplugin:singlevalfields in basic..idl
Also fix obvious bug in the initialisation of the
connectivity::odbc::OConnection::m_bClosed field.
Probably closes some kind of connection leak there.
Change-Id: I04579cf91bcd6d6c51c697d83971da4142743a82
Reviewed-on: https://gerrit.libreoffice.org/28932
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/source/bibliography/loadlisteneradapter.cxx | 11 | ||||
-rw-r--r-- | extensions/source/bibliography/loadlisteneradapter.hxx | 5 |
2 files changed, 5 insertions, 11 deletions
diff --git a/extensions/source/bibliography/loadlisteneradapter.cxx b/extensions/source/bibliography/loadlisteneradapter.cxx index bb81feb8d53a..d25c7f030041 100644 --- a/extensions/source/bibliography/loadlisteneradapter.cxx +++ b/extensions/source/bibliography/loadlisteneradapter.cxx @@ -62,7 +62,6 @@ namespace bib OComponentAdapterBase::OComponentAdapterBase( const Reference< XComponent >& _rxComp ) :m_xComponent( _rxComp ) ,m_pListener( nullptr ) - ,m_nLockCount( 0 ) ,m_bListening( false ) { OSL_ENSURE( m_xComponent.is(), "OComponentAdapterBase::OComponentAdapterBase: invalid component!" ); @@ -166,35 +165,35 @@ namespace bib void SAL_CALL OLoadListenerAdapter::loaded( const EventObject& _rEvent ) throw (RuntimeException, std::exception) { - if ( !locked() && getLoadListener( ) ) + if ( getLoadListener( ) ) getLoadListener( )->_loaded( _rEvent ); } void SAL_CALL OLoadListenerAdapter::unloading( const EventObject& _rEvent ) throw (RuntimeException, std::exception) { - if ( !locked() && getLoadListener( ) ) + if ( getLoadListener( ) ) getLoadListener( )->_unloading( _rEvent ); } void SAL_CALL OLoadListenerAdapter::unloaded( const EventObject& _rEvent ) throw (RuntimeException, std::exception) { - if ( !locked() && getLoadListener( ) ) + if ( getLoadListener( ) ) getLoadListener( )->_unloaded( _rEvent ); } void SAL_CALL OLoadListenerAdapter::reloading( const EventObject& _rEvent ) throw (RuntimeException, std::exception) { - if ( !locked() && getLoadListener( ) ) + if ( getLoadListener( ) ) getLoadListener( )->_reloading( _rEvent ); } void SAL_CALL OLoadListenerAdapter::reloaded( const EventObject& _rEvent ) throw (RuntimeException, std::exception) { - if ( !locked() && getLoadListener( ) ) + if ( getLoadListener( ) ) getLoadListener( )->_reloaded( _rEvent ); } diff --git a/extensions/source/bibliography/loadlisteneradapter.hxx b/extensions/source/bibliography/loadlisteneradapter.hxx index 1b84c65f14f5..8aa5165d18bf 100644 --- a/extensions/source/bibliography/loadlisteneradapter.hxx +++ b/extensions/source/bibliography/loadlisteneradapter.hxx @@ -59,7 +59,6 @@ namespace bib private: css::uno::Reference< css::lang::XComponent > m_xComponent; OComponentListener* m_pListener; - sal_Int32 m_nLockCount; bool m_bListening : 1; // impl method for dispose - virtual, 'cause you at least need to remove the listener from the broadcaster @@ -90,10 +89,6 @@ namespace bib virtual void SAL_CALL acquire( ) throw () = 0; virtual void SAL_CALL release( ) throw () = 0; - // helper - /// get the lock count - sal_Int32 locked() const { return m_nLockCount; } - /// dispose the object - stop listening and such void dispose(); |