summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@collabora.co.uk>2023-01-16 10:41:34 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-01-16 10:19:16 +0000
commitf025dcc44cffc38720ea1b39c456cf562f1d144d (patch)
tree25193df86b112533546e5f000559bd1bd4180c16 /connectivity
parent0250d6c643f2866c4de7e3c943248ffda9205d05 (diff)
XUnoTunnel->dynamic_cast in connectivityy
Change-Id: Ibe5e87a1ef1bdc11451e8fe240d017f1ef60dfe6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145556 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/ado/AColumn.cxx14
-rw-r--r--connectivity/source/drivers/ado/AColumns.cxx2
-rw-r--r--connectivity/source/drivers/ado/AGroup.cxx15
-rw-r--r--connectivity/source/drivers/ado/AGroups.cxx2
-rw-r--r--connectivity/source/drivers/ado/AIndex.cxx14
-rw-r--r--connectivity/source/drivers/ado/AIndexes.cxx2
-rw-r--r--connectivity/source/drivers/ado/AKey.cxx14
-rw-r--r--connectivity/source/drivers/ado/AKeys.cxx2
-rw-r--r--connectivity/source/drivers/ado/ATable.cxx16
-rw-r--r--connectivity/source/drivers/ado/ATables.cxx2
-rw-r--r--connectivity/source/drivers/ado/AUser.cxx15
-rw-r--r--connectivity/source/drivers/ado/AUsers.cxx2
-rw-r--r--connectivity/source/drivers/ado/AView.cxx15
-rw-r--r--connectivity/source/drivers/ado/AViews.cxx2
-rw-r--r--connectivity/source/drivers/calc/CTable.cxx14
-rw-r--r--connectivity/source/drivers/component/CTable.cxx3
-rw-r--r--connectivity/source/drivers/dbase/DDatabaseMetaData.cxx2
-rw-r--r--connectivity/source/drivers/dbase/DIndex.cxx14
-rw-r--r--connectivity/source/drivers/dbase/DIndexes.cxx11
-rw-r--r--connectivity/source/drivers/dbase/DResultSet.cxx2
-rw-r--r--connectivity/source/drivers/dbase/DTable.cxx28
-rw-r--r--connectivity/source/drivers/dbase/DTables.cxx6
-rw-r--r--connectivity/source/drivers/file/FDatabaseMetaData.cxx2
-rw-r--r--connectivity/source/drivers/file/FResultSet.cxx3
-rw-r--r--connectivity/source/drivers/file/FStatement.cxx2
-rw-r--r--connectivity/source/drivers/file/FTable.cxx14
-rw-r--r--connectivity/source/drivers/flat/ETable.cxx16
-rw-r--r--connectivity/source/drivers/hsqldb/HTable.cxx13
-rw-r--r--connectivity/source/drivers/mysql_jdbc/YTable.cxx14
-rw-r--r--connectivity/source/drivers/writer/WTable.cxx12
-rw-r--r--connectivity/source/inc/ado/AColumn.hxx3
-rw-r--r--connectivity/source/inc/ado/AGroup.hxx4
-rw-r--r--connectivity/source/inc/ado/AIndex.hxx3
-rw-r--r--connectivity/source/inc/ado/AKey.hxx4
-rw-r--r--connectivity/source/inc/ado/ATable.hxx3
-rw-r--r--connectivity/source/inc/ado/AUser.hxx3
-rw-r--r--connectivity/source/inc/ado/AView.hxx4
-rw-r--r--connectivity/source/inc/calc/CTable.hxx4
-rw-r--r--connectivity/source/inc/dbase/DIndex.hxx4
-rw-r--r--connectivity/source/inc/dbase/DTable.hxx3
-rw-r--r--connectivity/source/inc/file/FTable.hxx4
-rw-r--r--connectivity/source/inc/flat/ETable.hxx4
-rw-r--r--connectivity/source/inc/hsqldb/HTable.hxx3
-rw-r--r--connectivity/source/inc/mysql/YTable.hxx3
-rw-r--r--connectivity/source/inc/writer/WTable.hxx4
-rw-r--r--connectivity/source/sdbcx/VCollection.cxx2
-rw-r--r--connectivity/source/sdbcx/VDescriptor.cxx25
47 files changed, 28 insertions, 325 deletions
diff --git a/connectivity/source/drivers/ado/AColumn.cxx b/connectivity/source/drivers/ado/AColumn.cxx
index a521586b9551..a40c4f72346a 100644
--- a/connectivity/source/drivers/ado/AColumn.cxx
+++ b/connectivity/source/drivers/ado/AColumn.cxx
@@ -66,20 +66,6 @@ OAdoColumn::OAdoColumn(bool _bCase,OConnection* _pConnection)
}
-Sequence< sal_Int8 > OAdoColumn::getUnoTunnelId()
-{
- static const comphelper::UnoIdInit implId;
- return implId.getSeq();
-}
-
-// css::lang::XUnoTunnel
-
-sal_Int64 OAdoColumn::getSomething( const Sequence< sal_Int8 > & rId )
-{
- return comphelper::getSomethingImpl(rId, this,
- comphelper::FallbackToGetSomethingOf<OColumn_ADO>{});
-}
-
void OAdoColumn::construct()
{
sal_Int32 nAttrib = isNew() ? 0 : PropertyAttribute::READONLY;
diff --git a/connectivity/source/drivers/ado/AColumns.cxx b/connectivity/source/drivers/ado/AColumns.cxx
index 229903502fa1..f56a6d8d007a 100644
--- a/connectivity/source/drivers/ado/AColumns.cxx
+++ b/connectivity/source/drivers/ado/AColumns.cxx
@@ -62,7 +62,7 @@ Reference< XPropertySet > OColumns::createDescriptor()
// XAppend
sdbcx::ObjectType OColumns::appendObject( const OUString&, const Reference< XPropertySet >& descriptor )
{
- rtl::Reference<OAdoColumn> pColumn = getFromUnoTunnel<OAdoColumn>( descriptor );
+ rtl::Reference<OAdoColumn> pColumn = dynamic_cast<OAdoColumn*>( descriptor.get() );
Reference< XPropertySet > xColumn;
if ( !pColumn.is() )
{
diff --git a/connectivity/source/drivers/ado/AGroup.cxx b/connectivity/source/drivers/ado/AGroup.cxx
index a347fb96de70..02cd239d7682 100644
--- a/connectivity/source/drivers/ado/AGroup.cxx
+++ b/connectivity/source/drivers/ado/AGroup.cxx
@@ -69,21 +69,6 @@ void OAdoGroup::refreshUsers()
m_pUsers.reset(new OUsers(m_pCatalog, m_aMutex, aVector, aUsers, isCaseSensitive()));
}
-Sequence< sal_Int8 > OAdoGroup::getUnoTunnelId()
-{
- static const comphelper::UnoIdInit implId;
- return implId.getSeq();
-}
-
-// css::lang::XUnoTunnel
-
-sal_Int64 OAdoGroup::getSomething( const Sequence< sal_Int8 > & rId )
-{
- return comphelper::getSomethingImpl(rId, this,
- comphelper::FallbackToGetSomethingOf<OGroup_ADO>{});
-}
-
-
void OAdoGroup::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue)
{
if(m_aGroup.IsValid())
diff --git a/connectivity/source/drivers/ado/AGroups.cxx b/connectivity/source/drivers/ado/AGroups.cxx
index e3fb165b0a34..6f7c8b2da8d0 100644
--- a/connectivity/source/drivers/ado/AGroups.cxx
+++ b/connectivity/source/drivers/ado/AGroups.cxx
@@ -58,7 +58,7 @@ Reference< XPropertySet > OGroups::createDescriptor()
// XAppend
sdbcx::ObjectType OGroups::appendObject( const OUString& _rForName, const Reference< XPropertySet >& descriptor )
{
- OAdoGroup* pGroup = getFromUnoTunnel<OAdoGroup>(descriptor);
+ OAdoGroup* pGroup = dynamic_cast<OAdoGroup*>(descriptor.get());
if ( pGroup == nullptr )
m_pCatalog->getConnection()->throwGenericSQLException( STR_INVALID_GROUP_DESCRIPTOR_ERROR,static_cast<XTypeProvider*>(this) );
diff --git a/connectivity/source/drivers/ado/AIndex.cxx b/connectivity/source/drivers/ado/AIndex.cxx
index af643a4368b0..b183d49c2435 100644
--- a/connectivity/source/drivers/ado/AIndex.cxx
+++ b/connectivity/source/drivers/ado/AIndex.cxx
@@ -70,20 +70,6 @@ void OAdoIndex::refreshColumns()
}
-Sequence< sal_Int8 > OAdoIndex::getUnoTunnelId()
-{
- static const comphelper::UnoIdInit implId;
- return implId.getSeq();
-}
-
-// css::lang::XUnoTunnel
-
-sal_Int64 OAdoIndex::getSomething( const Sequence< sal_Int8 > & rId )
-{
- return comphelper::getSomethingImpl(rId, this,
- comphelper::FallbackToGetSomethingOf<sdbcx::OIndex>{});
-}
-
void SAL_CALL OAdoIndex::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue)
{
if(m_aIndex.IsValid())
diff --git a/connectivity/source/drivers/ado/AIndexes.cxx b/connectivity/source/drivers/ado/AIndexes.cxx
index 621ddec60d79..1e427a2f0782 100644
--- a/connectivity/source/drivers/ado/AIndexes.cxx
+++ b/connectivity/source/drivers/ado/AIndexes.cxx
@@ -58,7 +58,7 @@ Reference< XPropertySet > OIndexes::createDescriptor()
// XAppend
sdbcx::ObjectType OIndexes::appendObject( const OUString& _rForName, const Reference< XPropertySet >& descriptor )
{
- OAdoIndex* pIndex = getFromUnoTunnel<OAdoIndex>(descriptor);
+ OAdoIndex* pIndex = dynamic_cast<OAdoIndex*>(descriptor.get());
if ( pIndex == nullptr )
m_pConnection->throwGenericSQLException( STR_INVALID_INDEX_DESCRIPTOR_ERROR,static_cast<XTypeProvider*>(this) );
diff --git a/connectivity/source/drivers/ado/AKey.cxx b/connectivity/source/drivers/ado/AKey.cxx
index b74103d830d6..9c2734ede8f1 100644
--- a/connectivity/source/drivers/ado/AKey.cxx
+++ b/connectivity/source/drivers/ado/AKey.cxx
@@ -66,20 +66,6 @@ void OAdoKey::refreshColumns()
m_pColumns.reset(new OColumns(*this, m_aMutex, aVector, aColumns, isCaseSensitive(), m_pConnection));
}
-Sequence< sal_Int8 > OAdoKey::getUnoTunnelId()
-{
- static const comphelper::UnoIdInit implId;
- return implId.getSeq();
-}
-
-// css::lang::XUnoTunnel
-
-sal_Int64 OAdoKey::getSomething( const Sequence< sal_Int8 > & rId )
-{
- return comphelper::getSomethingImpl(rId, this,
- comphelper::FallbackToGetSomethingOf<OKey_ADO>{});
-}
-
void OAdoKey::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue)
{
if(m_aKey.IsValid())
diff --git a/connectivity/source/drivers/ado/AKeys.cxx b/connectivity/source/drivers/ado/AKeys.cxx
index f0d938d397d6..32d02bc743e7 100644
--- a/connectivity/source/drivers/ado/AKeys.cxx
+++ b/connectivity/source/drivers/ado/AKeys.cxx
@@ -58,7 +58,7 @@ Reference< XPropertySet > OKeys::createDescriptor()
// XAppend
sdbcx::ObjectType OKeys::appendObject( const OUString&, const Reference< XPropertySet >& descriptor )
{
- OAdoKey* pKey = getFromUnoTunnel<OAdoKey>( descriptor );
+ OAdoKey* pKey = dynamic_cast<OAdoKey*>( descriptor.get() );
if ( pKey == nullptr)
m_pConnection->throwGenericSQLException( STR_INVALID_KEY_DESCRIPTOR_ERROR,static_cast<XTypeProvider*>(this) );
diff --git a/connectivity/source/drivers/ado/ATable.cxx b/connectivity/source/drivers/ado/ATable.cxx
index f048f3ec09ba..47e22e125398 100644
--- a/connectivity/source/drivers/ado/ATable.cxx
+++ b/connectivity/source/drivers/ado/ATable.cxx
@@ -127,20 +127,6 @@ void OAdoTable::refreshIndexes()
m_xIndexes.reset(new OIndexes(*this,m_aMutex,aVector,aIndexes,isCaseSensitive(),m_pCatalog->getConnection()));
}
-Sequence< sal_Int8 > OAdoTable::getUnoTunnelId()
-{
- static const comphelper::UnoIdInit implId;
- return implId.getSeq();
-}
-
-// css::lang::XUnoTunnel
-
-sal_Int64 OAdoTable::getSomething( const Sequence< sal_Int8 > & rId )
-{
- return comphelper::getSomethingImpl(rId, this,
- comphelper::FallbackToGetSomethingOf<OTable_TYPEDEF>{});
-}
-
// XRename
void SAL_CALL OAdoTable::rename( const OUString& newName )
{
@@ -165,7 +151,7 @@ void SAL_CALL OAdoTable::alterColumnByName( const OUString& colName, const Refer
checkDisposed(OTableDescriptor_BASE_TYPEDEF::rBHelper.bDisposed);
bool bError = true;
- OAdoColumn* pColumn = comphelper::getFromUnoTunnel<OAdoColumn>(descriptor);
+ OAdoColumn* pColumn = dynamic_cast<OAdoColumn*>(descriptor.get());
if(pColumn != nullptr)
{
WpADOColumns aColumns = m_aTable.get_Columns();
diff --git a/connectivity/source/drivers/ado/ATables.cxx b/connectivity/source/drivers/ado/ATables.cxx
index 234a41fa59cd..07910462fb17 100644
--- a/connectivity/source/drivers/ado/ATables.cxx
+++ b/connectivity/source/drivers/ado/ATables.cxx
@@ -65,7 +65,7 @@ Reference< XPropertySet > OTables::createDescriptor()
// XAppend
sdbcx::ObjectType OTables::appendObject( const OUString&, const Reference< XPropertySet >& descriptor )
{
- OAdoTable* pTable = getFromUnoTunnel<OAdoTable>( descriptor );
+ OAdoTable* pTable = dynamic_cast<OAdoTable*>( descriptor.get() );
if ( pTable == nullptr )
m_pCatalog->getConnection()->throwGenericSQLException( STR_INVALID_TABLE_DESCRIPTOR_ERROR,static_cast<XTypeProvider*>(this) );
diff --git a/connectivity/source/drivers/ado/AUser.cxx b/connectivity/source/drivers/ado/AUser.cxx
index 42f7240f8729..eb7a5803f60c 100644
--- a/connectivity/source/drivers/ado/AUser.cxx
+++ b/connectivity/source/drivers/ado/AUser.cxx
@@ -65,21 +65,6 @@ void OAdoUser::refreshGroups()
m_pGroups.reset(new OGroups(m_pCatalog, m_aMutex, aVector, aGroups, isCaseSensitive()));
}
-Sequence< sal_Int8 > OAdoUser::getUnoTunnelId()
-{
- static const comphelper::UnoIdInit implId;
- return implId.getSeq();
-}
-
-// css::lang::XUnoTunnel
-
-sal_Int64 OAdoUser::getSomething( const Sequence< sal_Int8 > & rId )
-{
- return comphelper::getSomethingImpl(rId, this,
- comphelper::FallbackToGetSomethingOf<OUser_TYPEDEF>{});
-}
-
-
void OAdoUser::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue)
{
if(m_aUser.IsValid())
diff --git a/connectivity/source/drivers/ado/AUsers.cxx b/connectivity/source/drivers/ado/AUsers.cxx
index 4074330915a6..4b050d239237 100644
--- a/connectivity/source/drivers/ado/AUsers.cxx
+++ b/connectivity/source/drivers/ado/AUsers.cxx
@@ -57,7 +57,7 @@ Reference< XPropertySet > OUsers::createDescriptor()
// XAppend
sdbcx::ObjectType OUsers::appendObject( const OUString& _rForName, const Reference< XPropertySet >& descriptor )
{
- OUserExtend* pUser = getFromUnoTunnel<OUserExtend>( descriptor );
+ OUserExtend* pUser = dynamic_cast<OUserExtend*>( descriptor.get() );
if ( pUser == nullptr )
m_pCatalog->getConnection()->throwGenericSQLException( STR_INVALID_USER_DESCRIPTOR_ERROR,static_cast<XTypeProvider*>(this) );
diff --git a/connectivity/source/drivers/ado/AView.cxx b/connectivity/source/drivers/ado/AView.cxx
index 3b88116bcf2e..10a5524db95b 100644
--- a/connectivity/source/drivers/ado/AView.cxx
+++ b/connectivity/source/drivers/ado/AView.cxx
@@ -42,21 +42,6 @@ OAdoView::OAdoView(bool _bCase,ADOView* _pView) : OView_ADO(_bCase,nullptr)
{
}
-Sequence< sal_Int8 > OAdoView::getUnoTunnelId()
-{
- static const comphelper::UnoIdInit implId;
- return implId.getSeq();
-}
-
-// css::lang::XUnoTunnel
-
-sal_Int64 OAdoView::getSomething( const Sequence< sal_Int8 > & rId )
-{
- return comphelper::getSomethingImpl(rId, this,
- comphelper::FallbackToGetSomethingOf<OView_ADO>{});
-}
-
-
void OAdoView::getFastPropertyValue(Any& rValue,sal_Int32 nHandle) const
{
if(m_aView.IsValid())
diff --git a/connectivity/source/drivers/ado/AViews.cxx b/connectivity/source/drivers/ado/AViews.cxx
index 38f9ae4d7a36..943422289627 100644
--- a/connectivity/source/drivers/ado/AViews.cxx
+++ b/connectivity/source/drivers/ado/AViews.cxx
@@ -63,7 +63,7 @@ Reference< XPropertySet > OViews::createDescriptor()
// XAppend
sdbcx::ObjectType OViews::appendObject( const OUString& _rForName, const Reference< XPropertySet >& descriptor )
{
- OAdoView* pView = getFromUnoTunnel<OAdoView>( descriptor );
+ OAdoView* pView = dynamic_cast<OAdoView*>( descriptor.get() );
if ( pView == nullptr )
m_pCatalog->getConnection()->throwGenericSQLException( STR_INVALID_VIEW_DESCRIPTOR_ERROR,static_cast<XTypeProvider*>(this) );
diff --git a/connectivity/source/drivers/calc/CTable.cxx b/connectivity/source/drivers/calc/CTable.cxx
index 53a8c8eeb855..1225e8ace3f0 100644
--- a/connectivity/source/drivers/calc/CTable.cxx
+++ b/connectivity/source/drivers/calc/CTable.cxx
@@ -608,20 +608,6 @@ void SAL_CALL OCalcTable::disposing()
}
-const Sequence< sal_Int8 > & OCalcTable::getUnoTunnelId()
-{
- static const comphelper::UnoIdInit implId;
- return implId.getSeq();
-}
-
-// css::lang::XUnoTunnel
-
-sal_Int64 OCalcTable::getSomething( const Sequence< sal_Int8 > & rId )
-{
- return comphelper::getSomethingImpl(rId, this,
- comphelper::FallbackToGetSomethingOf<OCalcTable_BASE>{});
-}
-
bool OCalcTable::fetchRow( OValueRefRow& _rRow, const OSQLColumns & _rCols,
bool bRetrieveData )
{
diff --git a/connectivity/source/drivers/component/CTable.cxx b/connectivity/source/drivers/component/CTable.cxx
index 83dbf8a68830..819ce7a97063 100644
--- a/connectivity/source/drivers/component/CTable.cxx
+++ b/connectivity/source/drivers/component/CTable.cxx
@@ -104,8 +104,7 @@ Any SAL_CALL OComponentTable::queryInterface( const Type & rType )
rType == cppu::UnoType<XDataDescriptorFactory>::get())
return Any();
- const Any aRet = ::cppu::queryInterface(rType,static_cast< css::lang::XUnoTunnel*> (this));
- return aRet.hasValue() ? aRet : OTable_TYPEDEF::queryInterface(rType);
+ return OTable_TYPEDEF::queryInterface(rType);
}
diff --git a/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx b/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx
index bbf3b408ae01..26c2ad880c04 100644
--- a/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx
@@ -294,7 +294,7 @@ Reference< XResultSet > SAL_CALL ODbaseDatabaseMetaData::getIndexInfo(
aRow[4] = new ORowSetValueDecorator(ORowSetValue(getBOOL(xIndex->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISUNIQUE)))));
aRow[6] = new ORowSetValueDecorator(*pBegin);
- auto pIndex = comphelper::getFromUnoTunnel<ODbaseIndex>(xIndex);
+ auto pIndex = dynamic_cast<ODbaseIndex*>(xIndex.get());
if(pIndex)
{
aRow[11] = new ORowSetValueDecorator(static_cast<sal_Int32>(pIndex->getHeader().db_maxkeys));
diff --git a/connectivity/source/drivers/dbase/DIndex.cxx b/connectivity/source/drivers/dbase/DIndex.cxx
index 9e28a20d0682..ad1f9a5090cf 100644
--- a/connectivity/source/drivers/dbase/DIndex.cxx
+++ b/connectivity/source/drivers/dbase/DIndex.cxx
@@ -99,20 +99,6 @@ void ODbaseIndex::refreshColumns()
m_pColumns.reset(new ODbaseIndexColumns(this,m_aMutex,aVector));
}
-const Sequence< sal_Int8 > & ODbaseIndex::getUnoTunnelId()
-{
- static const comphelper::UnoIdInit implId;
- return implId.getSeq();
-}
-
-// XUnoTunnel
-
-sal_Int64 ODbaseIndex::getSomething( const Sequence< sal_Int8 > & rId )
-{
- return comphelper::getSomethingImpl(rId, this,
- comphelper::FallbackToGetSomethingOf<ODbaseIndex_BASE>{});
-}
-
ONDXPagePtr const & ODbaseIndex::getRoot()
{
openIndexFile();
diff --git a/connectivity/source/drivers/dbase/DIndexes.cxx b/connectivity/source/drivers/dbase/DIndexes.cxx
index 7f47085c6509..c0a4dead506b 100644
--- a/connectivity/source/drivers/dbase/DIndexes.cxx
+++ b/connectivity/source/drivers/dbase/DIndexes.cxx
@@ -92,14 +92,9 @@ Reference< XPropertySet > ODbaseIndexes::createDescriptor()
// XAppend
sdbcx::ObjectType ODbaseIndexes::appendObject( const OUString& _rForName, const Reference< XPropertySet >& descriptor )
{
- Reference<XUnoTunnel> xTunnel(descriptor,UNO_QUERY);
- if(xTunnel.is())
- {
- ODbaseIndex* pIndex = comphelper::getFromUnoTunnel<ODbaseIndex>(xTunnel);
- if(!pIndex)
- throw SQLException();
+ ODbaseIndex* pIndex = dynamic_cast<ODbaseIndex*>(descriptor.get());
+ if(pIndex)
pIndex->CreateImpl();
- }
return createObject( _rForName );
}
@@ -107,7 +102,7 @@ sdbcx::ObjectType ODbaseIndexes::appendObject( const OUString& _rForName, const
// XDrop
void ODbaseIndexes::dropObject(sal_Int32 _nPos, const OUString& /*_sElementName*/)
{
- auto pIndex = comphelper::getFromUnoTunnel<ODbaseIndex>(getObject(_nPos));
+ rtl::Reference<ODbaseIndex> pIndex = dynamic_cast<ODbaseIndex*>(getObject(_nPos).get());
if ( pIndex )
pIndex->DropImpl();
}
diff --git a/connectivity/source/drivers/dbase/DResultSet.cxx b/connectivity/source/drivers/dbase/DResultSet.cxx
index 47b898ada4e2..123a29b8b069 100644
--- a/connectivity/source/drivers/dbase/DResultSet.cxx
+++ b/connectivity/source/drivers/dbase/DResultSet.cxx
@@ -155,7 +155,7 @@ Sequence< sal_Int32 > SAL_CALL ODbaseResultSet::deleteRows( const Sequence< An
bool ODbaseResultSet::fillIndexValues(const Reference< XColumnsSupplier> &_xIndex)
{
- auto pIndex = comphelper::getFromUnoTunnel<dbase::ODbaseIndex>(_xIndex);
+ auto pIndex = dynamic_cast<dbase::ODbaseIndex*>(_xIndex.get());
if(pIndex)
{
std::unique_ptr<dbase::OIndexIterator> pIter = pIndex->createIterator();
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index e194b6a222df..133cf2b2918c 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -761,24 +761,10 @@ Any SAL_CALL ODbaseTable::queryInterface( const Type & rType )
return Any();
Any aRet = OTable_TYPEDEF::queryInterface(rType);
- return aRet.hasValue() ? aRet : ::cppu::queryInterface(rType,static_cast< css::lang::XUnoTunnel*> (this));
+ return aRet;
}
-const Sequence< sal_Int8 > & ODbaseTable::getUnoTunnelId()
-{
- static const comphelper::UnoIdInit implId;
- return implId.getSeq();
-}
-
-// css::lang::XUnoTunnel
-
-sal_Int64 ODbaseTable::getSomething( const Sequence< sal_Int8 > & rId )
-{
- return comphelper::getSomethingImpl(rId, this,
- comphelper::FallbackToGetSomethingOf<ODbaseTable_BASE>{});
-}
-
bool ODbaseTable::fetchRow(OValueRefRow& _rRow, const OSQLColumns & _rCols, bool bRetrieveData)
{
if (!m_pBuffer)
@@ -1597,9 +1583,7 @@ bool ODbaseTable::DeleteRow(const OSQLColumns& _rCols)
{
xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME)) >>= aColName;
- Reference<XUnoTunnel> xTunnel(xIndex,UNO_QUERY);
- OSL_ENSURE(xTunnel.is(),"No TunnelImplementation!");
- ODbaseIndex* pIndex = comphelper::getFromUnoTunnel<ODbaseIndex>(xTunnel);
+ ODbaseIndex* pIndex = dynamic_cast<ODbaseIndex*>(xIndex.get());
assert(pIndex && "ODbaseTable::DeleteRow: No Index returned!");
OSQLColumns::const_iterator aIter = std::find_if(_rCols.begin(), _rCols.end(),
@@ -1703,9 +1687,7 @@ bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, const OValueRefRow& pOrgRo
continue;
else
{
- Reference<XUnoTunnel> xTunnel(xIndex,UNO_QUERY);
- OSL_ENSURE(xTunnel.is(),"No TunnelImplementation!");
- ODbaseIndex* pIndex = comphelper::getFromUnoTunnel<ODbaseIndex>(xTunnel);
+ ODbaseIndex* pIndex = dynamic_cast<ODbaseIndex*>(xIndex.get());
assert(pIndex && "ODbaseTable::UpdateBuffer: No Index returned!");
if (pIndex->Find(0,*rRow[nPos]))
@@ -1811,9 +1793,7 @@ bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, const OValueRefRow& pOrgRo
}
if (aIndexedCols[i].is())
{
- Reference<XUnoTunnel> xTunnel(aIndexedCols[i],UNO_QUERY);
- OSL_ENSURE(xTunnel.is(),"No TunnelImplementation!");
- ODbaseIndex* pIndex = comphelper::getFromUnoTunnel<ODbaseIndex>(xTunnel);
+ ODbaseIndex* pIndex = dynamic_cast<ODbaseIndex*>(aIndexedCols[i].get());
assert(pIndex && "ODbaseTable::UpdateBuffer: No Index returned!");
// Update !!
if (pOrgRow.is() && !thisColIsNull)
diff --git a/connectivity/source/drivers/dbase/DTables.cxx b/connectivity/source/drivers/dbase/DTables.cxx
index 8f63263c1752..81b355f63db8 100644
--- a/connectivity/source/drivers/dbase/DTables.cxx
+++ b/connectivity/source/drivers/dbase/DTables.cxx
@@ -65,7 +65,7 @@ Reference< XPropertySet > ODbaseTables::createDescriptor()
// XAppend
sdbcx::ObjectType ODbaseTables::appendObject( const OUString& _rForName, const Reference< XPropertySet >& descriptor )
{
- auto pTable = comphelper::getFromUnoTunnel<ODbaseTable>(descriptor);
+ auto pTable = dynamic_cast<ODbaseTable*>(descriptor.get());
if(pTable)
{
pTable->setPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME),Any(_rForName));
@@ -90,7 +90,7 @@ sdbcx::ObjectType ODbaseTables::appendObject( const OUString& _rForName, const R
// XDrop
void ODbaseTables::dropObject(sal_Int32 _nPos, const OUString& _sElementName)
{
- Reference< XUnoTunnel> xTunnel;
+ Reference< XInterface > xTunnel;
try
{
xTunnel.set(getObject(_nPos),UNO_QUERY);
@@ -103,7 +103,7 @@ void ODbaseTables::dropObject(sal_Int32 _nPos, const OUString& _sElementName)
if ( xTunnel.is() )
{
- ODbaseTable* pTable = comphelper::getFromUnoTunnel<ODbaseTable>(xTunnel);
+ ODbaseTable* pTable = dynamic_cast<ODbaseTable*>(xTunnel.get());
if(pTable)
pTable->DropImpl();
}
diff --git a/connectivity/source/drivers/file/FDatabaseMetaData.cxx b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
index ef5989749824..95d19d33b1eb 100644
--- a/connectivity/source/drivers/file/FDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
@@ -401,7 +401,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges(
xNames->getByName(*pBegin), css::uno::UNO_QUERY);
if(xTable.is())
{
- auto pTable = comphelper::getFromUnoTunnel<OFileTable>(xTable);
+ auto pTable = dynamic_cast<OFileTable*>(xTable.get());
if(pTable && !pTable->isReadOnly())
{
aRow[6] = ODatabaseMetaDataResultSet::getInsertValue();
diff --git a/connectivity/source/drivers/file/FResultSet.cxx b/connectivity/source/drivers/file/FResultSet.cxx
index bbbee4c3a9a5..3268349a61d9 100644
--- a/connectivity/source/drivers/file/FResultSet.cxx
+++ b/connectivity/source/drivers/file/FResultSet.cxx
@@ -1528,8 +1528,7 @@ Reference< css::beans::XPropertySetInfo > SAL_CALL OResultSet::getPropertySetInf
void OResultSet::doTableSpecials(const OSQLTable& _xTable)
{
- Reference<css::lang::XUnoTunnel> xTunnel(_xTable, UNO_QUERY_THROW);
- m_pTable = comphelper::getFromUnoTunnel<OFileTable>(xTunnel);
+ m_pTable = dynamic_cast<OFileTable*>(_xTable.get());
assert(m_pTable.is());
}
diff --git a/connectivity/source/drivers/file/FStatement.cxx b/connectivity/source/drivers/file/FStatement.cxx
index d97ce47ae404..4520abfeff1d 100644
--- a/connectivity/source/drivers/file/FStatement.cxx
+++ b/connectivity/source/drivers/file/FStatement.cxx
@@ -408,7 +408,7 @@ void OStatement_Base::construct(const OUString& sql)
}
// at this moment we support only one table per select statement
- m_pTable = comphelper::getFromUnoTunnel<OFileTable>(rTabs.begin()->second);
+ m_pTable = dynamic_cast<OFileTable*>(rTabs.begin()->second.get());
OSL_ENSURE(m_pTable.is(),"No table!");
if ( m_pTable.is() )
m_xColNames = m_pTable->getColumns();
diff --git a/connectivity/source/drivers/file/FTable.cxx b/connectivity/source/drivers/file/FTable.cxx
index 6ec776452d8a..06dc187fa20e 100644
--- a/connectivity/source/drivers/file/FTable.cxx
+++ b/connectivity/source/drivers/file/FTable.cxx
@@ -118,20 +118,6 @@ void SAL_CALL OFileTable::disposing()
FileClose();
}
-const Sequence< sal_Int8 > & OFileTable::getUnoTunnelId()
-{
- static const comphelper::UnoIdInit s_Id;
- return s_Id.getSeq();
-}
-
-// css::lang::XUnoTunnel
-
-sal_Int64 OFileTable::getSomething( const Sequence< sal_Int8 > & rId )
-{
- return comphelper::getSomethingImpl(rId, this,
- comphelper::FallbackToGetSomethingOf<OTable_TYPEDEF>{});
-}
-
void OFileTable::FileClose()
{
::osl::MutexGuard aGuard(m_aMutex);
diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx
index bd6be38d7bc2..38cf9296bfe7 100644
--- a/connectivity/source/drivers/flat/ETable.cxx
+++ b/connectivity/source/drivers/flat/ETable.cxx
@@ -545,24 +545,10 @@ Any SAL_CALL OFlatTable::queryInterface( const Type & rType )
return Any();
Any aRet = OTable_TYPEDEF::queryInterface(rType);
- return aRet.hasValue() ? aRet : ::cppu::queryInterface(rType,static_cast< css::lang::XUnoTunnel*> (this));
+ return aRet;
}
-const Sequence< sal_Int8 > & OFlatTable::getUnoTunnelId()
-{
- static const comphelper::UnoIdInit implId;
- return implId.getSeq();
-}
-
-// css::lang::XUnoTunnel
-
-sal_Int64 OFlatTable::getSomething( const Sequence< sal_Int8 > & rId )
-{
- return comphelper::getSomethingImpl(rId, this,
- comphelper::FallbackToGetSomethingOf<OFlatTable_BASE>{});
-}
-
bool OFlatTable::fetchRow(OValueRefRow& _rRow, const OSQLColumns & _rCols, bool bRetrieveData)
{
*(*_rRow)[0] = m_nFilePos;
diff --git a/connectivity/source/drivers/hsqldb/HTable.cxx b/connectivity/source/drivers/hsqldb/HTable.cxx
index 7a036616816e..63fe36a34a34 100644
--- a/connectivity/source/drivers/hsqldb/HTable.cxx
+++ b/connectivity/source/drivers/hsqldb/HTable.cxx
@@ -115,19 +115,6 @@ sdbcx::OCollection* OHSQLTable::createIndexes(const ::std::vector< OUString>& _r
return new OIndexesHelper(this,m_aMutex,_rNames);
}
-const Sequence< sal_Int8 > & OHSQLTable::getUnoTunnelId()
-{
- static const comphelper::UnoIdInit implId;
- return implId.getSeq();
-}
-
-// css::lang::XUnoTunnel
-
-sal_Int64 OHSQLTable::getSomething( const Sequence< sal_Int8 > & rId )
-{
- return comphelper::getSomethingImpl(rId, this,
- comphelper::FallbackToGetSomethingOf<OTable_TYPEDEF>{});
-}
// XAlterTable
void SAL_CALL OHSQLTable::alterColumnByName( const OUString& colName, const Reference< XPropertySet >& descriptor )
diff --git a/connectivity/source/drivers/mysql_jdbc/YTable.cxx b/connectivity/source/drivers/mysql_jdbc/YTable.cxx
index 3dfdfbdae55e..b79b3f231bbf 100644
--- a/connectivity/source/drivers/mysql_jdbc/YTable.cxx
+++ b/connectivity/source/drivers/mysql_jdbc/YTable.cxx
@@ -116,20 +116,6 @@ sdbcx::OCollection* OMySQLTable::createIndexes(const ::std::vector<OUString>& _r
return new OIndexesHelper(this, m_aMutex, _rNames);
}
-const Sequence<sal_Int8>& OMySQLTable::getUnoTunnelId()
-{
- static const comphelper::UnoIdInit implId;
- return implId.getSeq();
-}
-
-// css::lang::XUnoTunnel
-
-sal_Int64 OMySQLTable::getSomething(const Sequence<sal_Int8>& rId)
-{
- return comphelper::getSomethingImpl(rId, this,
- comphelper::FallbackToGetSomethingOf<OTable_TYPEDEF>{});
-}
-
// XAlterTable
void SAL_CALL OMySQLTable::alterColumnByName(const OUString& colName,
const Reference<XPropertySet>& descriptor)
diff --git a/connectivity/source/drivers/writer/WTable.cxx b/connectivity/source/drivers/writer/WTable.cxx
index 555cdd8dd0c4..eb2fb2bffd3b 100644
--- a/connectivity/source/drivers/writer/WTable.cxx
+++ b/connectivity/source/drivers/writer/WTable.cxx
@@ -207,18 +207,6 @@ void SAL_CALL OWriterTable::disposing()
m_pWriterConnection = nullptr;
}
-const uno::Sequence<sal_Int8>& OWriterTable::getUnoTunnelId()
-{
- static const comphelper::UnoIdInit implId;
- return implId.getSeq();
-}
-
-sal_Int64 OWriterTable::getSomething(const uno::Sequence<sal_Int8>& rId)
-{
- return comphelper::getSomethingImpl(rId, this,
- comphelper::FallbackToGetSomethingOf<OWriterTable_BASE>{});
-}
-
bool OWriterTable::fetchRow(OValueRefRow& _rRow, const OSQLColumns& _rCols, bool bRetrieveData)
{
// read the bookmark
diff --git a/connectivity/source/inc/ado/AColumn.hxx b/connectivity/source/inc/ado/AColumn.hxx
index fdb0afc74d24..f297964820dc 100644
--- a/connectivity/source/inc/ado/AColumn.hxx
+++ b/connectivity/source/inc/ado/AColumn.hxx
@@ -44,9 +44,6 @@ namespace connectivity::ado
OAdoColumn(bool _bCase,OConnection* _pConnection);
// ODescriptor
virtual void construct() override;
- // css::lang::XUnoTunnel
- virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
- static css::uno::Sequence< sal_Int8 > getUnoTunnelId();
WpADOColumn getColumnImpl() const;
};
diff --git a/connectivity/source/inc/ado/AGroup.hxx b/connectivity/source/inc/ado/AGroup.hxx
index f46577d0fd55..00207a5fa23a 100644
--- a/connectivity/source/inc/ado/AGroup.hxx
+++ b/connectivity/source/inc/ado/AGroup.hxx
@@ -45,10 +45,6 @@ namespace connectivity::ado
OAdoGroup(OCatalog* _pParent,bool _bCase, ADOGroup* _pGroup=nullptr);
OAdoGroup(OCatalog* _pParent,bool _bCase, const OUString& Name);
- // css::lang::XUnoTunnel
- virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
- static css::uno::Sequence< sal_Int8 > getUnoTunnelId();
-
// XAuthorizable
virtual sal_Int32 SAL_CALL getPrivileges( const OUString& objName, sal_Int32 objType ) override;
virtual sal_Int32 SAL_CALL getGrantablePrivileges( const OUString& objName, sal_Int32 objType ) override;
diff --git a/connectivity/source/inc/ado/AIndex.hxx b/connectivity/source/inc/ado/AIndex.hxx
index 7bc54f788aec..98c3a77d1ceb 100644
--- a/connectivity/source/inc/ado/AIndex.hxx
+++ b/connectivity/source/inc/ado/AIndex.hxx
@@ -38,9 +38,6 @@ namespace connectivity::ado
public:
OAdoIndex(bool _bCase, OConnection* _pConnection,ADOIndex* _pIndex);
OAdoIndex(bool _bCase, OConnection* _pConnection);
- // css::lang::XUnoTunnel
- virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
- static css::uno::Sequence< sal_Int8 > getUnoTunnelId();
WpADOIndex getImpl() const { return m_aIndex;}
};
diff --git a/connectivity/source/inc/ado/AKey.hxx b/connectivity/source/inc/ado/AKey.hxx
index 67e05b86d5f9..5ec3fa972b12 100644
--- a/connectivity/source/inc/ado/AKey.hxx
+++ b/connectivity/source/inc/ado/AKey.hxx
@@ -41,10 +41,6 @@ namespace connectivity::ado
OAdoKey(bool _bCase,OConnection* _pConnection,ADOKey* _pKey);
OAdoKey(bool _bCase,OConnection* _pConnection);
- // css::lang::XUnoTunnel
- virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
- static css::uno::Sequence< sal_Int8 > getUnoTunnelId();
-
WpADOKey getImpl() const { return m_aKey;}
// map the update/delete rules
static RuleEnum Map2Rule(sal_Int32 _eNum);
diff --git a/connectivity/source/inc/ado/ATable.hxx b/connectivity/source/inc/ado/ATable.hxx
index 07a16ae6ae4f..827485a6b480 100644
--- a/connectivity/source/inc/ado/ATable.hxx
+++ b/connectivity/source/inc/ado/ATable.hxx
@@ -53,9 +53,6 @@ namespace connectivity::ado
virtual OUString SAL_CALL getName() override;
OUString getSchema() const { return m_SchemaName; }
virtual css::uno::Reference< css::sdbc::XDatabaseMetaData> getMetaData() const override;
- // css::lang::XUnoTunnel
- virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
- static css::uno::Sequence< sal_Int8 > getUnoTunnelId();
// XRename
virtual void SAL_CALL rename( const OUString& newName ) override;
diff --git a/connectivity/source/inc/ado/AUser.hxx b/connectivity/source/inc/ado/AUser.hxx
index 849c3a98a5eb..8d0c0f7321b6 100644
--- a/connectivity/source/inc/ado/AUser.hxx
+++ b/connectivity/source/inc/ado/AUser.hxx
@@ -48,9 +48,6 @@ namespace connectivity::ado
OAdoUser(OCatalog* _pParent,bool _bCase, ADOUser* _pUser=nullptr);
OAdoUser(OCatalog* _pParent,bool _bCase, const OUString& Name);
- // css::lang::XUnoTunnel
- virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
- static css::uno::Sequence< sal_Int8 > getUnoTunnelId();
// XUser
virtual void SAL_CALL changePassword( const OUString& objPassword, const OUString& newPassword ) override;
// XAuthorizable
diff --git a/connectivity/source/inc/ado/AView.hxx b/connectivity/source/inc/ado/AView.hxx
index 6f8d7a337494..db81c4e70bb5 100644
--- a/connectivity/source/inc/ado/AView.hxx
+++ b/connectivity/source/inc/ado/AView.hxx
@@ -40,10 +40,6 @@ namespace connectivity::ado
public:
OAdoView(bool _bCase, ADOView* _pView=nullptr);
- // css::lang::XUnoTunnel
- virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
- static css::uno::Sequence< sal_Int8 > getUnoTunnelId();
-
WpADOView getImpl() const { return m_aView;}
};
}
diff --git a/connectivity/source/inc/calc/CTable.hxx b/connectivity/source/inc/calc/CTable.hxx
index 2c0e1d0e8d5c..b4751fd876d7 100644
--- a/connectivity/source/inc/calc/CTable.hxx
+++ b/connectivity/source/inc/calc/CTable.hxx
@@ -64,10 +64,6 @@ namespace connectivity::calc
virtual void SAL_CALL disposing() override;
- // css::lang::XUnoTunnel
- virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
- static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId();
-
void construct() override;
};
diff --git a/connectivity/source/inc/dbase/DIndex.hxx b/connectivity/source/inc/dbase/DIndex.hxx
index cd18ded0cbb1..5446844cf808 100644
--- a/connectivity/source/inc/dbase/DIndex.hxx
+++ b/connectivity/source/inc/dbase/DIndex.hxx
@@ -91,10 +91,6 @@ namespace connectivity::dbase
void openIndexFile();
virtual void refreshColumns() override;
- // css::lang::XUnoTunnel
- virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
- static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId();
-
const ODbaseTable* getTable() const { return m_pTable; }
const NDXHeader& getHeader() const { return m_aHeader; }
std::unique_ptr<OIndexIterator> createIterator();
diff --git a/connectivity/source/inc/dbase/DTable.hxx b/connectivity/source/inc/dbase/DTable.hxx
index dd2e833619c1..bb0b6baa5fa2 100644
--- a/connectivity/source/inc/dbase/DTable.hxx
+++ b/connectivity/source/inc/dbase/DTable.hxx
@@ -161,9 +161,6 @@ namespace connectivity::dbase
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
virtual void SAL_CALL disposing() override;
- // css::lang::XUnoTunnel
- virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
- static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId();
// XAlterTable
virtual void SAL_CALL alterColumnByName( const OUString& colName, const css::uno::Reference< css::beans::XPropertySet >& descriptor ) override;
virtual void SAL_CALL alterColumnByIndex( sal_Int32 index, const css::uno::Reference< css::beans::XPropertySet >& descriptor ) override;
diff --git a/connectivity/source/inc/file/FTable.hxx b/connectivity/source/inc/file/FTable.hxx
index 4f925f799ca5..d8bbd92d6c85 100644
--- a/connectivity/source/inc/file/FTable.hxx
+++ b/connectivity/source/inc/file/FTable.hxx
@@ -83,10 +83,6 @@ namespace connectivity::file
const OUString& getSchema() const { return m_SchemaName; }
bool isReadOnly() const { return !m_bWriteable; }
// m_pFileStream && !m_pFileStream->IsWritable(); }
- // css::lang::XUnoTunnel
- virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
- static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId();
-
sal_Int32 getFilePos() const { return m_nFilePos; }
diff --git a/connectivity/source/inc/flat/ETable.hxx b/connectivity/source/inc/flat/ETable.hxx
index ae283c10bcb0..99359edfddaa 100644
--- a/connectivity/source/inc/flat/ETable.hxx
+++ b/connectivity/source/inc/flat/ETable.hxx
@@ -92,10 +92,6 @@ namespace connectivity::flat
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
virtual void SAL_CALL disposing() override;
- // css::lang::XUnoTunnel
- virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
- static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId();
-
OUString getEntry() const;
};
diff --git a/connectivity/source/inc/hsqldb/HTable.hxx b/connectivity/source/inc/hsqldb/HTable.hxx
index 060784115507..d6ac5ced7646 100644
--- a/connectivity/source/inc/hsqldb/HTable.hxx
+++ b/connectivity/source/inc/hsqldb/HTable.hxx
@@ -85,9 +85,6 @@ namespace connectivity::hsqldb
// ODescriptor
virtual void construct() override;
- // css::lang::XUnoTunnel
- virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
- static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId();
virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
//XTypeProvider
diff --git a/connectivity/source/inc/mysql/YTable.hxx b/connectivity/source/inc/mysql/YTable.hxx
index 1cb89b4c8859..c891b7d7d95e 100644
--- a/connectivity/source/inc/mysql/YTable.hxx
+++ b/connectivity/source/inc/mysql/YTable.hxx
@@ -92,9 +92,6 @@ namespace connectivity::mysql
// ODescriptor
virtual void construct() override;
- // css::lang::XUnoTunnel
- virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
- static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId();
// XAlterTable
virtual void SAL_CALL alterColumnByName( const OUString& colName, const css::uno::Reference< css::beans::XPropertySet >& descriptor ) override;
diff --git a/connectivity/source/inc/writer/WTable.hxx b/connectivity/source/inc/writer/WTable.hxx
index 38add348d242..46ee5412e0a6 100644
--- a/connectivity/source/inc/writer/WTable.hxx
+++ b/connectivity/source/inc/writer/WTable.hxx
@@ -54,10 +54,6 @@ public:
void SAL_CALL disposing() override;
- // css::lang::XUnoTunnel
- sal_Int64 SAL_CALL getSomething(const css::uno::Sequence<sal_Int8>& rId) override;
- static const css::uno::Sequence<sal_Int8>& getUnoTunnelId();
-
void construct() override;
};
diff --git a/connectivity/source/sdbcx/VCollection.cxx b/connectivity/source/sdbcx/VCollection.cxx
index 804c8c361942..0fa6cace50e0 100644
--- a/connectivity/source/sdbcx/VCollection.cxx
+++ b/connectivity/source/sdbcx/VCollection.cxx
@@ -374,7 +374,7 @@ void SAL_CALL OCollection::appendByDescriptor( const Reference< XPropertySet >&
if ( !xNewlyCreated.is() )
throw RuntimeException();
- ODescriptor* pDescriptor = comphelper::getFromUnoTunnel<ODescriptor>( xNewlyCreated );
+ ODescriptor* pDescriptor = dynamic_cast<ODescriptor*>( xNewlyCreated.get() );
if ( pDescriptor )
pDescriptor->setNew( false );
diff --git a/connectivity/source/sdbcx/VDescriptor.cxx b/connectivity/source/sdbcx/VDescriptor.cxx
index ce3b437d95f3..c0f65c60246f 100644
--- a/connectivity/source/sdbcx/VDescriptor.cxx
+++ b/connectivity/source/sdbcx/VDescriptor.cxx
@@ -44,12 +44,6 @@ namespace connectivity::sdbcx
// css::lang::XUnoTunnel
- sal_Int64 SAL_CALL ODescriptor::getSomething( const Sequence< sal_Int8 >& rId )
- {
- return comphelper::getSomethingImpl(rId, this);
- }
-
-
namespace
{
struct ResetROAttribute
@@ -86,25 +80,11 @@ namespace connectivity::sdbcx
bool ODescriptor::isNew( const Reference< XInterface >& _rxDescriptor )
{
- ODescriptor* pImplementation = comphelper::getFromUnoTunnel<ODescriptor>( _rxDescriptor );
+ ODescriptor* pImplementation = dynamic_cast<ODescriptor*>( _rxDescriptor.get() );
return pImplementation && pImplementation->isNew();
}
- const Sequence< sal_Int8 > & ODescriptor::getUnoTunnelId()
- {
- static const comphelper::UnoIdInit implId;
- return implId.getSeq();
- }
-
-
- Any SAL_CALL ODescriptor::queryInterface( const Type & rType )
- {
- Any aRet = ::cppu::queryInterface(rType,static_cast< XUnoTunnel*> (this));
- return aRet.hasValue() ? aRet : ODescriptor_PBASE::queryInterface(rType);
- }
-
-
void ODescriptor::setNew(bool _bNew)
{
m_bNew = _bNew;
@@ -115,8 +95,7 @@ namespace connectivity::sdbcx
{
::cppu::OTypeCollection aTypes( cppu::UnoType<XMultiPropertySet>::get(),
cppu::UnoType<XFastPropertySet>::get(),
- cppu::UnoType<XPropertySet>::get(),
- cppu::UnoType<XUnoTunnel>::get());
+ cppu::UnoType<XPropertySet>::get());
return aTypes.getTypes();
}