diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-01 13:54:31 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-02 11:21:36 +0100 |
commit | 1b67ad6ff8979d8851db1223886bb03745845755 (patch) | |
tree | f68fd6e34fcb3f1bb2b55b61e44cf0690a9f5f0a /connectivity/source/commontools | |
parent | e91aa231ee934b2f18b387f37a6e9017b05f2256 (diff) |
remove connectivity OSubComponent
push the logic that is still necessary down into the subclasses
Change-Id: I99424f0b3c654c5652991a4140b17ceb02224e50
Reviewed-on: https://gerrit.libreoffice.org/49087
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity/source/commontools')
-rw-r--r-- | connectivity/source/commontools/dbtools.cxx | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx index daca0a341c63..834c7ba9aeda 100644 --- a/connectivity/source/commontools/dbtools.cxx +++ b/connectivity/source/commontools/dbtools.cxx @@ -81,7 +81,6 @@ #include <cppuhelper/implbase.hxx> #include <strings.hrc> #include <resource/sharedresources.hxx> -#include <connectivity/OSubComponent.hxx> #include <algorithm> #include <iterator> @@ -1944,48 +1943,6 @@ void getBooleanComparisonPredicate( const OUString& _rExpression, const bool _bV namespace connectivity { -void release(oslInterlockedCount& _refCount, - ::cppu::OBroadcastHelper& rBHelper, - Reference< XInterface >& _xInterface, - css::lang::XComponent* _pObject) throw () -{ - if (osl_atomic_decrement( &_refCount ) == 0) - { - osl_atomic_increment( &_refCount ); - - if (!rBHelper.bDisposed && !rBHelper.bInDispose) - { - // remember the parent - Reference< XInterface > xParent; - { - ::osl::MutexGuard aGuard( rBHelper.rMutex ); - xParent = _xInterface; - _xInterface = nullptr; - } - - // First dispose - try { - _pObject->dispose(); - } catch (css::uno::RuntimeException & e) { - SAL_WARN( - "connectivity.commontools", "Caught exception during dispose, " << e); - } - - // only the alive ref holds the object - OSL_ASSERT( _refCount == 1 ); - - // release the parent in the ~ - if (xParent.is()) - { - ::osl::MutexGuard aGuard( rBHelper.rMutex ); - _xInterface = xParent; - } - } - } - else - osl_atomic_increment( &_refCount ); -} - void checkDisposed(bool _bThrow) { if (_bThrow) |