diff options
author | Noel Grandin <noelgrandin@collabora.co.uk> | 2023-01-16 10:41:34 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-01-16 10:19:16 +0000 |
commit | f025dcc44cffc38720ea1b39c456cf562f1d144d (patch) | |
tree | 25193df86b112533546e5f000559bd1bd4180c16 /connectivity/source/drivers/ado | |
parent | 0250d6c643f2866c4de7e3c943248ffda9205d05 (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/source/drivers/ado')
-rw-r--r-- | connectivity/source/drivers/ado/AColumn.cxx | 14 | ||||
-rw-r--r-- | connectivity/source/drivers/ado/AColumns.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/ado/AGroup.cxx | 15 | ||||
-rw-r--r-- | connectivity/source/drivers/ado/AGroups.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/ado/AIndex.cxx | 14 | ||||
-rw-r--r-- | connectivity/source/drivers/ado/AIndexes.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/ado/AKey.cxx | 14 | ||||
-rw-r--r-- | connectivity/source/drivers/ado/AKeys.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/ado/ATable.cxx | 16 | ||||
-rw-r--r-- | connectivity/source/drivers/ado/ATables.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/ado/AUser.cxx | 15 | ||||
-rw-r--r-- | connectivity/source/drivers/ado/AUsers.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/ado/AView.cxx | 15 | ||||
-rw-r--r-- | connectivity/source/drivers/ado/AViews.cxx | 2 |
14 files changed, 8 insertions, 109 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) ); |