summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-02-01 13:54:31 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-02-02 11:21:36 +0100
commit1b67ad6ff8979d8851db1223886bb03745845755 (patch)
treef68fd6e34fcb3f1bb2b55b61e44cf0690a9f5f0a /connectivity/source/drivers
parente91aa231ee934b2f18b387f37a6e9017b05f2256 (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/drivers')
-rw-r--r--connectivity/source/drivers/ado/AConnection.cxx10
-rw-r--r--connectivity/source/drivers/ado/AStatement.cxx4
-rw-r--r--connectivity/source/drivers/evoab2/NConnection.cxx9
-rw-r--r--connectivity/source/drivers/evoab2/NConnection.hxx6
-rw-r--r--connectivity/source/drivers/evoab2/NResultSet.hxx1
-rw-r--r--connectivity/source/drivers/evoab2/NStatement.cxx4
-rw-r--r--connectivity/source/drivers/evoab2/NStatement.hxx7
-rw-r--r--connectivity/source/drivers/file/FConnection.cxx11
-rw-r--r--connectivity/source/drivers/file/FStatement.cxx4
-rw-r--r--connectivity/source/drivers/firebird/Connection.cxx7
-rw-r--r--connectivity/source/drivers/firebird/Connection.hxx8
-rw-r--r--connectivity/source/drivers/firebird/ResultSet.hxx1
-rw-r--r--connectivity/source/drivers/firebird/StatementCommonBase.hxx1
-rw-r--r--connectivity/source/drivers/jdbc/JConnection.cxx7
-rw-r--r--connectivity/source/drivers/jdbc/JStatement.cxx7
-rw-r--r--connectivity/source/drivers/macab/MacabConnection.cxx11
-rw-r--r--connectivity/source/drivers/macab/MacabConnection.hxx10
-rw-r--r--connectivity/source/drivers/mork/MConnection.cxx10
-rw-r--r--connectivity/source/drivers/mork/MConnection.hxx8
-rw-r--r--connectivity/source/drivers/mork/MStatement.cxx4
-rw-r--r--connectivity/source/drivers/mork/MStatement.hxx4
-rw-r--r--connectivity/source/drivers/odbc/OConnection.cxx10
-rw-r--r--connectivity/source/drivers/odbc/OStatement.cxx9
23 files changed, 15 insertions, 138 deletions
diff --git a/connectivity/source/drivers/ado/AConnection.cxx b/connectivity/source/drivers/ado/AConnection.cxx
index ad02964b85e3..049989f44786 100644
--- a/connectivity/source/drivers/ado/AConnection.cxx
+++ b/connectivity/source/drivers/ado/AConnection.cxx
@@ -45,8 +45,7 @@ using namespace com::sun::star::sdbcx;
IMPLEMENT_SERVICE_INFO(OConnection,"com.sun.star.sdbcx.AConnection","com.sun.star.sdbc.Connection");
OConnection::OConnection(ODriver* _pDriver)
- : OSubComponent<OConnection, OConnection_BASE>(static_cast<cppu::OWeakObject*>(_pDriver), this),
- m_xCatalog(nullptr),
+ : m_xCatalog(nullptr),
m_pDriver(_pDriver),
m_pAdoConnection(nullptr),
m_pCatalog(nullptr),
@@ -153,11 +152,6 @@ void OConnection::construct(const OUString& url,const Sequence< PropertyValue >&
osl_atomic_decrement( &m_refCount );
}
-void SAL_CALL OConnection::release() throw()
-{
- release_ChildImpl();
-}
-
Reference< XStatement > SAL_CALL OConnection::createStatement( )
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -490,8 +484,6 @@ void OConnection::disposing()
delete m_pAdoConnection;
m_pAdoConnection = nullptr;
-
- dispose_ChildImpl();
}
sal_Int64 SAL_CALL OConnection::getSomething( const css::uno::Sequence< sal_Int8 >& rId )
diff --git a/connectivity/source/drivers/ado/AStatement.cxx b/connectivity/source/drivers/ado/AStatement.cxx
index 5bdf386468c4..f2ed68a78070 100644
--- a/connectivity/source/drivers/ado/AStatement.cxx
+++ b/connectivity/source/drivers/ado/AStatement.cxx
@@ -53,7 +53,6 @@ using namespace ::std;
OStatement_Base::OStatement_Base(OConnection* _pConnection ) : OStatement_BASE(m_aMutex)
,OPropertySetHelper(OStatement_BASE::rBHelper)
- ,OSubComponent<OStatement_Base, OStatement_BASE>(static_cast<cppu::OWeakObject*>(_pConnection), this)
,m_pConnection(_pConnection)
,m_nMaxRows(0)
,m_nFetchSize(1)
@@ -104,13 +103,12 @@ void OStatement_Base::disposing()
if (m_pConnection)
m_pConnection->release();
- dispose_ChildImpl();
OStatement_BASE::disposing();
}
void SAL_CALL OStatement_Base::release() throw()
{
- release_ChildImpl();
+ OStatement_BASE::release();
}
Any SAL_CALL OStatement_Base::queryInterface( const Type & rType )
diff --git a/connectivity/source/drivers/evoab2/NConnection.cxx b/connectivity/source/drivers/evoab2/NConnection.cxx
index fa6fd275e5b6..2971992b9dc1 100644
--- a/connectivity/source/drivers/evoab2/NConnection.cxx
+++ b/connectivity/source/drivers/evoab2/NConnection.cxx
@@ -41,8 +41,7 @@ using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::lang;
OEvoabConnection::OEvoabConnection(OEvoabDriver& _rDriver)
- : OSubComponent<OEvoabConnection, OConnection_BASE>( static_cast<cppu::OWeakObject*>(&_rDriver), this )
- , m_rDriver(_rDriver)
+ : m_rDriver(_rDriver)
, m_eSDBCAddressType(SDBCAddress::EVO_LOCAL)
, m_xCatalog(nullptr)
{
@@ -59,11 +58,6 @@ OEvoabConnection::~OEvoabConnection()
}
-void SAL_CALL OEvoabConnection::release() throw()
-{
- release_ChildImpl();
-}
-
// XServiceInfo
IMPLEMENT_SERVICE_INFO(OEvoabConnection, "com.sun.star.sdbc.drivers.evoab.Connection", "com.sun.star.sdbc.Connection")
@@ -198,7 +192,6 @@ void OEvoabConnection::disposing()
// we noticed that we should be destroyed in near future so we have to dispose our statements
::osl::MutexGuard aGuard(m_aMutex);
OConnection_BASE::disposing();
- dispose_ChildImpl();
}
// -------------------------------- stubbed methods ------------------------------------------------
diff --git a/connectivity/source/drivers/evoab2/NConnection.hxx b/connectivity/source/drivers/evoab2/NConnection.hxx
index 3156985020ae..b7860bce0a3d 100644
--- a/connectivity/source/drivers/evoab2/NConnection.hxx
+++ b/connectivity/source/drivers/evoab2/NConnection.hxx
@@ -23,7 +23,6 @@
#include "NDriver.hxx"
#include <com/sun/star/sdbc/SQLWarning.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
-#include <connectivity/OSubComponent.hxx>
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
#include <connectivity/CommonTools.hxx>
#include <connectivity/warningscontainer.hxx>
@@ -49,10 +48,7 @@ namespace connectivity
typedef connectivity::OMetaConnection OConnection_BASE; // implements basics and text encoding
class OEvoabConnection :public OConnection_BASE
- ,public connectivity::OSubComponent<OEvoabConnection, OConnection_BASE>
{
- friend class connectivity::OSubComponent<OEvoabConnection, OConnection_BASE>;
-
private:
const OEvoabDriver& m_rDriver;
SDBCAddress::sdbc_address_type m_eSDBCAddressType;
@@ -78,8 +74,6 @@ namespace connectivity
// OComponentHelper
virtual void SAL_CALL disposing() override;
- // XInterface
- virtual void SAL_CALL release() throw() override;
// XServiceInfo
DECLARE_SERVICE_INFO();
diff --git a/connectivity/source/drivers/evoab2/NResultSet.hxx b/connectivity/source/drivers/evoab2/NResultSet.hxx
index f1128a77bd7b..40b0027cfe48 100644
--- a/connectivity/source/drivers/evoab2/NResultSet.hxx
+++ b/connectivity/source/drivers/evoab2/NResultSet.hxx
@@ -40,7 +40,6 @@
#include <connectivity/FValue.hxx>
#include <connectivity/warningscontainer.hxx>
#include "NStatement.hxx"
-#include <connectivity/OSubComponent.hxx>
#include "NResultSetMetaData.hxx"
namespace connectivity
diff --git a/connectivity/source/drivers/evoab2/NStatement.cxx b/connectivity/source/drivers/evoab2/NStatement.cxx
index 17643d55f045..d21f41c10e56 100644
--- a/connectivity/source/drivers/evoab2/NStatement.cxx
+++ b/connectivity/source/drivers/evoab2/NStatement.cxx
@@ -70,7 +70,6 @@ EBookQuery * createTest( const OUString &aColumnName,
OCommonStatement::OCommonStatement(OEvoabConnection* _pConnection)
: OCommonStatement_IBase(m_aMutex)
, ::comphelper::OPropertyContainer(OCommonStatement_IBase::rBHelper)
- , OStatement_CBase( static_cast<cppu::OWeakObject*>(_pConnection), this )
, m_xResultSet(nullptr)
, m_xConnection(_pConnection)
, m_aParser(_pConnection->getDriver().getComponentContext())
@@ -126,7 +125,6 @@ void OCommonStatement::disposing()
m_xConnection.clear();
- dispose_ChildImpl();
OCommonStatement_IBase::disposing();
}
@@ -532,7 +530,7 @@ void SAL_CALL OCommonStatement::acquire() throw()
void SAL_CALL OCommonStatement::release() throw()
{
- release_ChildImpl();
+ OCommonStatement_IBase::release();
}
diff --git a/connectivity/source/drivers/evoab2/NStatement.hxx b/connectivity/source/drivers/evoab2/NStatement.hxx
index 65938fe47c9f..a2f918af0b9b 100644
--- a/connectivity/source/drivers/evoab2/NStatement.hxx
+++ b/connectivity/source/drivers/evoab2/NStatement.hxx
@@ -34,7 +34,6 @@
#include <connectivity/sqliterator.hxx>
#include <connectivity/sqlparse.hxx>
#include <connectivity/FValue.hxx>
-#include <connectivity/OSubComponent.hxx>
#include <com/sun/star/util/XCancellable.hpp>
#include <cppuhelper/compbase.hxx>
#include <comphelper/propertycontainer.hxx>
@@ -147,17 +146,11 @@ namespace connectivity
//************ Class: OCommonStatement
// is a base class for the normal statement and for the prepared statement
- class OCommonStatement;
- typedef OSubComponent< OCommonStatement, OCommonStatement_IBase > OStatement_CBase;
-
class OCommonStatement :public cppu::BaseMutex
,public OCommonStatement_IBase
,public ::comphelper::OPropertyContainer
,public ::comphelper::OPropertyArrayUsageHelper< OCommonStatement >
- ,public OStatement_CBase
{
- friend class OSubComponent< OCommonStatement, OCommonStatement_IBase >;
-
private:
css::uno::WeakReference< css::sdbc::XResultSet> m_xResultSet; // The last ResultSet created
rtl::Reference<OEvoabConnection> m_xConnection;
diff --git a/connectivity/source/drivers/file/FConnection.cxx b/connectivity/source/drivers/file/FConnection.cxx
index ba5822a9696c..8012a33b31ed 100644
--- a/connectivity/source/drivers/file/FConnection.cxx
+++ b/connectivity/source/drivers/file/FConnection.cxx
@@ -56,8 +56,7 @@ using namespace ::ucbhelper;
typedef connectivity::OMetaConnection OConnection_BASE;
OConnection::OConnection(OFileDriver* _pDriver)
- : OSubComponent<OConnection, OConnection_BASE>(static_cast<cppu::OWeakObject*>(_pDriver), this)
- , m_pDriver(_pDriver)
+ : m_pDriver(_pDriver)
, m_bAutoCommit(false)
, m_bReadOnly(false)
, m_bShowDeleted(false)
@@ -74,12 +73,6 @@ OConnection::~OConnection()
close();
}
-void SAL_CALL OConnection::release() throw()
-{
- release_ChildImpl();
-}
-
-
bool OConnection::matchesExtension( const OUString& _rExt ) const
{
if ( isCaseSensitiveExtension() )
@@ -371,8 +364,6 @@ void OConnection::disposing()
m_xDir.clear();
m_xContent.clear();
m_xCatalog = WeakReference< XTablesSupplier>();
-
- dispose_ChildImpl();
}
Reference< XTablesSupplier > OConnection::createCatalog()
diff --git a/connectivity/source/drivers/file/FStatement.cxx b/connectivity/source/drivers/file/FStatement.cxx
index e0ed9a16c35e..8c4c8bc2988e 100644
--- a/connectivity/source/drivers/file/FStatement.cxx
+++ b/connectivity/source/drivers/file/FStatement.cxx
@@ -122,8 +122,6 @@ void OStatement_BASE2::disposing()
m_pConnection.clear();
- dispose_ChildImpl();
-
if ( m_pParseTree )
{
delete m_pParseTree;
@@ -140,7 +138,7 @@ void SAL_CALL OStatement_Base::acquire() throw()
void SAL_CALL OStatement_BASE2::release() throw()
{
- release_ChildImpl();
+ OStatement_BASE::release();
}
Any SAL_CALL OStatement_Base::queryInterface( const Type & rType )
diff --git a/connectivity/source/drivers/firebird/Connection.cxx b/connectivity/source/drivers/firebird/Connection.cxx
index 9cb9fc340cc8..3c4ba3522020 100644
--- a/connectivity/source/drivers/firebird/Connection.cxx
+++ b/connectivity/source/drivers/firebird/Connection.cxx
@@ -83,7 +83,6 @@ static const OUStringLiteral our_sFBKLocation( "firebird.fbk" );
Connection::Connection(FirebirdDriver* _pDriver)
: Connection_BASE(m_aMutex)
- , OSubComponent<Connection, Connection_BASE>(static_cast<cppu::OWeakObject*>(_pDriver), this)
, m_xDriver(_pDriver)
, m_sConnectionURL()
, m_sFirebirdURL()
@@ -112,11 +111,6 @@ Connection::~Connection()
close();
}
-void SAL_CALL Connection::release() throw()
-{
- release_ChildImpl();
-}
-
struct ConnectionGuard
{
oslInterlockedCount& m_refCount;
@@ -928,7 +922,6 @@ void Connection::disposing()
}
// TODO: write to storage again?
- dispose_ChildImpl();
cppu::WeakComponentImplHelperBase::disposing();
m_xDriver.clear();
diff --git a/connectivity/source/drivers/firebird/Connection.hxx b/connectivity/source/drivers/firebird/Connection.hxx
index e3c69e7e99c7..8f84b3f00113 100644
--- a/connectivity/source/drivers/firebird/Connection.hxx
+++ b/connectivity/source/drivers/firebird/Connection.hxx
@@ -27,7 +27,6 @@
#include <ibase.h>
#include <connectivity/CommonTools.hxx>
-#include <connectivity/OSubComponent.hxx>
#include <cppuhelper/compbase.hxx>
#include <cppuhelper/weakref.hxx>
#include <map>
@@ -67,11 +66,8 @@ namespace connectivity
typedef std::vector< ::connectivity::OTypeInfo> TTypeInfoVector;
typedef std::vector< css::uno::WeakReferenceHelper > OWeakRefArray;
- class Connection : public Connection_BASE,
- public connectivity::OSubComponent<Connection, Connection_BASE>
+ class Connection : public Connection_BASE
{
- friend class connectivity::OSubComponent<Connection, Connection_BASE>;
-
::osl::Mutex m_aMutex;
TTypeInfoVector m_aTypeInfo; // vector containing an entry
@@ -218,8 +214,6 @@ namespace connectivity
// OComponentHelper
virtual void SAL_CALL disposing() override;
- // XInterface
- virtual void SAL_CALL release() throw() override;
// XServiceInfo
DECLARE_SERVICE_INFO();
diff --git a/connectivity/source/drivers/firebird/ResultSet.hxx b/connectivity/source/drivers/firebird/ResultSet.hxx
index aa7d2083c762..f6aac2e1dc1f 100644
--- a/connectivity/source/drivers/firebird/ResultSet.hxx
+++ b/connectivity/source/drivers/firebird/ResultSet.hxx
@@ -25,7 +25,6 @@
#include <ibase.h>
#include <connectivity/FValue.hxx>
-#include <connectivity/OSubComponent.hxx>
#include <cppuhelper/compbase.hxx>
#include <comphelper/proparrhlp.hxx>
#include <comphelper/propertycontainer.hxx>
diff --git a/connectivity/source/drivers/firebird/StatementCommonBase.hxx b/connectivity/source/drivers/firebird/StatementCommonBase.hxx
index 856ebc807ff9..a127d42dfd09 100644
--- a/connectivity/source/drivers/firebird/StatementCommonBase.hxx
+++ b/connectivity/source/drivers/firebird/StatementCommonBase.hxx
@@ -24,7 +24,6 @@
#include <ibase.h>
-#include <connectivity/OSubComponent.hxx>
#include <cppuhelper/compbase.hxx>
#include <list>
diff --git a/connectivity/source/drivers/jdbc/JConnection.cxx b/connectivity/source/drivers/jdbc/JConnection.cxx
index 9ccc934255ee..5fdc586cc038 100644
--- a/connectivity/source/drivers/jdbc/JConnection.cxx
+++ b/connectivity/source/drivers/jdbc/JConnection.cxx
@@ -259,7 +259,6 @@ jclass java_sql_Connection::theClass = nullptr;
java_sql_Connection::java_sql_Connection( const java_sql_Driver& _rDriver )
:java_lang_Object()
- ,OSubComponent<java_sql_Connection, java_sql_Connection_BASE>(static_cast<cppu::OWeakObject*>(const_cast<java_sql_Driver *>(&_rDriver)), this)
,m_xContext( _rDriver.getContext() )
,m_pDriver( &_rDriver )
,m_pDriverobject(nullptr)
@@ -291,18 +290,12 @@ java_sql_Connection::~java_sql_Connection()
}
}
-void SAL_CALL java_sql_Connection::release() throw()
-{
- release_ChildImpl();
-}
-
void java_sql_Connection::disposing()
{
::osl::MutexGuard aGuard(m_aMutex);
m_aLogger.log( LogLevel::INFO, STR_LOG_SHUTDOWN_CONNECTION );
- dispose_ChildImpl();
java_sql_Connection_BASE::disposing();
if ( object )
diff --git a/connectivity/source/drivers/jdbc/JStatement.cxx b/connectivity/source/drivers/jdbc/JStatement.cxx
index 16fbd290c197..fbbb0c9a36c9 100644
--- a/connectivity/source/drivers/jdbc/JStatement.cxx
+++ b/connectivity/source/drivers/jdbc/JStatement.cxx
@@ -89,7 +89,6 @@ void SAL_CALL OStatement_BASE2::disposing()
::comphelper::disposeComponent(m_xGeneratedStatement);
m_pConnection.clear();
- dispose_ChildImpl();
java_sql_Statement_Base::disposing();
}
@@ -109,12 +108,6 @@ void SAL_CALL java_sql_Statement_Base::disposing()
}
-void SAL_CALL OStatement_BASE2::release() throw()
-{
- release_ChildImpl();
-}
-
-
Any SAL_CALL java_sql_Statement_Base::queryInterface( const Type & rType )
{
if ( m_pConnection.is() && !m_pConnection->isAutoRetrievingEnabled() && rType == cppu::UnoType<XGeneratedResultSet>::get())
diff --git a/connectivity/source/drivers/macab/MacabConnection.cxx b/connectivity/source/drivers/macab/MacabConnection.cxx
index fb3710df034d..eeea86def136 100644
--- a/connectivity/source/drivers/macab/MacabConnection.cxx
+++ b/connectivity/source/drivers/macab/MacabConnection.cxx
@@ -38,8 +38,7 @@ using namespace com::sun::star::sdbcx;
IMPLEMENT_SERVICE_INFO(MacabConnection, "com.sun.star.sdbc.drivers.MacabConnection", "com.sun.star.sdbc.Connection")
MacabConnection::MacabConnection(MacabDriver* _pDriver)
- : OSubComponent<MacabConnection, MacabConnection_BASE>(static_cast<cppu::OWeakObject*>(_pDriver), this),
- m_pAddressBook(nullptr),
+ : m_pAddressBook(nullptr),
m_pDriver(_pDriver)
{
m_pDriver->acquire();
@@ -54,11 +53,6 @@ MacabConnection::~MacabConnection()
m_pDriver = nullptr;
}
-void SAL_CALL MacabConnection::release() throw()
-{
- release_ChildImpl();
-}
-
void MacabConnection::construct(const OUString&, const Sequence< PropertyValue >&)
{
osl_atomic_increment( &m_refCount );
@@ -279,9 +273,8 @@ void MacabConnection::disposing()
m_pAddressBook = nullptr;
}
- m_xMetaData = css::uno::WeakReference< css::sdbc::XDatabaseMetaData>();
+ m_xMetaData.clear();
- dispose_ChildImpl();
MacabConnection_BASE::disposing();
}
diff --git a/connectivity/source/drivers/macab/MacabConnection.hxx b/connectivity/source/drivers/macab/MacabConnection.hxx
index 38b41a13c0b3..976e2fde3758 100644
--- a/connectivity/source/drivers/macab/MacabConnection.hxx
+++ b/connectivity/source/drivers/macab/MacabConnection.hxx
@@ -21,7 +21,6 @@
#define INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_MACAB_MACABCONNECTION_HXX
#include <map>
-#include <connectivity/OSubComponent.hxx>
#include <connectivity/CommonTools.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/sdbc/SQLWarning.hpp>
@@ -45,16 +44,12 @@ namespace connectivity
class MacabDriver;
class MacabAddressBook;
- //typedef OMetaConnection_BASE MacabConnection_BASE; // implements basics and text encoding
typedef std::vector< css::uno::WeakReferenceHelper > OWeakRefArray;
typedef connectivity::OMetaConnection MacabConnection_BASE;
- class MacabConnection : public MacabConnection_BASE,
- public OSubComponent<MacabConnection, MacabConnection_BASE>
+ class MacabConnection : public MacabConnection_BASE
{
- friend class OSubComponent<MacabConnection, MacabConnection_BASE>;
-
protected:
// Data attributes
@@ -74,9 +69,6 @@ namespace connectivity
// OComponentHelper
virtual void SAL_CALL disposing() override;
- // XInterface
- virtual void SAL_CALL release() throw() override;
-
// XServiceInfo
DECLARE_SERVICE_INFO();
diff --git a/connectivity/source/drivers/mork/MConnection.cxx b/connectivity/source/drivers/mork/MConnection.cxx
index 8ede63eb25fb..6dc6f2b19349 100644
--- a/connectivity/source/drivers/mork/MConnection.cxx
+++ b/connectivity/source/drivers/mork/MConnection.cxx
@@ -38,8 +38,7 @@ static const int defaultScope = 0x80;
OConnection::OConnection(MorkDriver* _pDriver)
- :OSubComponent<OConnection, OConnection_BASE>(static_cast<cppu::OWeakObject*>(_pDriver), this)
- ,m_xDriver(_pDriver)
+ :m_xDriver(_pDriver)
,m_aColumnAlias( _pDriver->getFactory() )
{
m_pBook = new MorkParser();
@@ -54,12 +53,6 @@ OConnection::~OConnection()
delete m_pHistory;
}
-void SAL_CALL OConnection::release() throw()
-{
- release_ChildImpl();
-}
-
-
void OConnection::construct(const OUString& url)
{
SAL_INFO("connectivity.mork", "=> OConnection::construct()" );
@@ -349,7 +342,6 @@ void OConnection::disposing()
{
// we noticed that we should be destroyed in near future so we have to dispose our statements
::osl::MutexGuard aGuard(m_aMutex);
- dispose_ChildImpl();
m_xCatalog.clear();
}
diff --git a/connectivity/source/drivers/mork/MConnection.hxx b/connectivity/source/drivers/mork/MConnection.hxx
index 3c2b2f179b10..6c7e8a7fac87 100644
--- a/connectivity/source/drivers/mork/MConnection.hxx
+++ b/connectivity/source/drivers/mork/MConnection.hxx
@@ -10,7 +10,6 @@
#ifndef INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_MORK_MCONNECTION_HXX
#define INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_MORK_MCONNECTION_HXX
-#include <connectivity/OSubComponent.hxx>
#include <TConnection.hxx>
#include "MColumnAlias.hxx"
@@ -28,11 +27,8 @@ namespace connectivity
typedef connectivity::OMetaConnection OConnection_BASE; // implements basics and text encoding
- class OConnection final : public OConnection_BASE,
- public connectivity::OSubComponent<OConnection, OConnection_BASE>
+ class OConnection final : public OConnection_BASE
{
- friend class connectivity::OSubComponent<OConnection, OConnection_BASE>;
-
// Data attributes
rtl::Reference<MorkDriver> m_xDriver; // Pointer to the owning
@@ -56,8 +52,6 @@ namespace connectivity
// OComponentHelper
virtual void SAL_CALL disposing() override;
- // XInterface
- virtual void SAL_CALL release() throw() override;
// XServiceInfo
DECLARE_SERVICE_INFO();
diff --git a/connectivity/source/drivers/mork/MStatement.cxx b/connectivity/source/drivers/mork/MStatement.cxx
index 34e94fa3f6e4..425eef8b898d 100644
--- a/connectivity/source/drivers/mork/MStatement.cxx
+++ b/connectivity/source/drivers/mork/MStatement.cxx
@@ -54,7 +54,6 @@ OStatement::OStatement( OConnection* _pConnection) : OCommonStatement( _pConnect
OCommonStatement::OCommonStatement(OConnection* _pConnection )
:OCommonStatement_IBASE(m_aMutex)
,OPropertySetHelper(OCommonStatement_IBASE::rBHelper)
- ,OCommonStatement_SBASE(static_cast<cppu::OWeakObject*>(_pConnection), this)
,m_pTable(nullptr)
,m_pConnection(_pConnection)
,m_aParser( comphelper::getComponentContext(_pConnection->getDriver()->getFactory()) )
@@ -82,7 +81,6 @@ void OCommonStatement::disposing()
m_pSQLIterator->dispose();
delete m_pParseTree;
- dispose_ChildImpl();
OCommonStatement_IBASE::disposing();
}
@@ -372,7 +370,7 @@ void SAL_CALL OCommonStatement::acquire() throw()
void SAL_CALL OCommonStatement::release() throw()
{
- release_ChildImpl();
+ OCommonStatement_IBASE::release();
}
void SAL_CALL OStatement::acquire() throw()
diff --git a/connectivity/source/drivers/mork/MStatement.hxx b/connectivity/source/drivers/mork/MStatement.hxx
index dc4717915b45..71d980468ee5 100644
--- a/connectivity/source/drivers/mork/MStatement.hxx
+++ b/connectivity/source/drivers/mork/MStatement.hxx
@@ -43,16 +43,12 @@ namespace connectivity
// is a base class for the normal statement and for the prepared statement
class OCommonStatement;
- typedef ::connectivity::OSubComponent< OCommonStatement, OCommonStatement_IBASE > OCommonStatement_SBASE;
class OCommonStatement :public cppu::BaseMutex
,public OCommonStatement_IBASE
,public ::cppu::OPropertySetHelper
,public ::comphelper::OPropertyArrayUsageHelper< OCommonStatement >
- ,public OCommonStatement_SBASE
{
- friend class ::connectivity::OSubComponent< OCommonStatement, OCommonStatement_IBASE >;
-
private:
css::sdbc::SQLWarning m_aLastWarning;
diff --git a/connectivity/source/drivers/odbc/OConnection.cxx b/connectivity/source/drivers/odbc/OConnection.cxx
index 5ec273fc82b3..d2fbcb436693 100644
--- a/connectivity/source/drivers/odbc/OConnection.cxx
+++ b/connectivity/source/drivers/odbc/OConnection.cxx
@@ -45,8 +45,7 @@ using namespace com::sun::star::beans;
using namespace com::sun::star::sdbc;
OConnection::OConnection(const SQLHANDLE _pDriverHandle,ODBCDriver* _pDriver)
- : OSubComponent<OConnection, OConnection_BASE>(static_cast<cppu::OWeakObject*>(_pDriver), this)
- ,m_xDriver(_pDriver)
+ :m_xDriver(_pDriver)
,m_aConnectionHandle(nullptr)
,m_pDriverHandleCopy(_pDriverHandle)
,m_nStatementCount(0)
@@ -78,11 +77,6 @@ OConnection::~OConnection()
}
}
-void SAL_CALL OConnection::release() throw()
-{
- release_ChildImpl();
-}
-
oslGenericFunction OConnection::getOdbcFunction(ODBC3SQLFunctionId _nIndex) const
{
OSL_ENSURE(m_xDriver.get(),"OConnection::getOdbcFunction: m_xDriver is null!");
@@ -480,8 +474,6 @@ void OConnection::disposing()
if(!m_bClosed)
N3SQLDisconnect(m_aConnectionHandle);
m_bClosed = true;
-
- dispose_ChildImpl();
}
SQLHANDLE OConnection::createStatementHandle()
diff --git a/connectivity/source/drivers/odbc/OStatement.cxx b/connectivity/source/drivers/odbc/OStatement.cxx
index 4ea8f46358b3..5f40aca6a69a 100644
--- a/connectivity/source/drivers/odbc/OStatement.cxx
+++ b/connectivity/source/drivers/odbc/OStatement.cxx
@@ -112,17 +112,10 @@ void SAL_CALL OStatement_Base::disposing()
void OStatement_BASE2::disposing()
{
- ::osl::MutexGuard aGuard(m_aMutex);
-
- dispose_ChildImpl();
+ ::osl::MutexGuard aGuard1(m_aMutex);
OStatement_Base::disposing();
}
-void SAL_CALL OStatement_BASE2::release() throw()
-{
- release_ChildImpl();
-}
-
Any SAL_CALL OStatement_Base::queryInterface( const Type & rType )
{
if ( m_pConnection.is() && !m_pConnection->isAutoRetrievingEnabled() && rType == cppu::UnoType<XGeneratedResultSet>::get())