diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-09-13 11:29:37 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-09-15 06:08:14 +0200 |
commit | 3f65724ec5fc92d5a0078a99932358ef7091435c (patch) | |
tree | 94dd9bf1d0ecd42dbf7f94db45bc7e1bf29b83ce /connectivity | |
parent | 6444b026b4039458d01ada5fee58eae98166585b (diff) |
Use <comphelper/servicehelper.hxx> implementing XUnoTunnel part 4
- Change implementations of getSomething to use getSomethingImpl
Or where that's impossible, use getSomething_cast to unify this and
reduce number of places where we reinterpret_cast.
All static methods getting tunnel ids were renamed to getUnoTunnelId,
to comply with the convention used in <comphelper/servicehelper.hxx>.
TODO (in separate commits):
- Revise uses of getSomething to use getFromUnoTunnel
Change-Id: Ifde9e214b52e5df678de71fcc32d2199c82e85cf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122100
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'connectivity')
22 files changed, 38 insertions, 82 deletions
diff --git a/connectivity/source/commontools/ConnectionWrapper.cxx b/connectivity/source/commontools/ConnectionWrapper.cxx index 614c91b7440b..264002e5dc57 100644 --- a/connectivity/source/commontools/ConnectionWrapper.cxx +++ b/connectivity/source/commontools/ConnectionWrapper.cxx @@ -25,7 +25,6 @@ #include <comphelper/servicehelper.hxx> #include <comphelper/hash.hxx> #include <cppuhelper/supportsservice.hxx> -#include <cppuhelper/typeprovider.hxx> #include <com/sun/star/reflection/ProxyFactory.hpp> #include <algorithm> @@ -155,7 +154,7 @@ Sequence< Type > SAL_CALL OConnectionWrapper::getTypes( ) sal_Int64 SAL_CALL OConnectionWrapper::getSomething( const Sequence< sal_Int8 >& rId ) { if (comphelper::isUnoTunnelId<OConnectionWrapper>(rId)) - return reinterpret_cast< sal_Int64 >( this ); + return comphelper::getSomething_cast(this); if(m_xUnoTunnel.is()) return m_xUnoTunnel->getSomething(rId); diff --git a/connectivity/source/commontools/TConnection.cxx b/connectivity/source/commontools/TConnection.cxx index e15b5ad464d9..25997b512a3e 100644 --- a/connectivity/source/commontools/TConnection.cxx +++ b/connectivity/source/commontools/TConnection.cxx @@ -18,7 +18,6 @@ */ #include <TConnection.hxx> -#include <cppuhelper/typeprovider.hxx> #include <comphelper/servicehelper.hxx> #include <comphelper/types.hxx> #include <connectivity/dbexception.hxx> @@ -57,9 +56,7 @@ void OMetaConnection::disposing() //XUnoTunnel sal_Int64 SAL_CALL OMetaConnection::getSomething( const css::uno::Sequence< sal_Int8 >& rId ) { - return (comphelper::isUnoTunnelId<OMetaConnection>(rId)) - ? reinterpret_cast< sal_Int64 >( this ) - : sal_Int64(0); + return comphelper::getSomethingImpl(rId, this); } Sequence< sal_Int8 > OMetaConnection::getUnoTunnelId() diff --git a/connectivity/source/drivers/ado/AColumn.cxx b/connectivity/source/drivers/ado/AColumn.cxx index 5315f858c7b2..98b4c899595a 100644 --- a/connectivity/source/drivers/ado/AColumn.cxx +++ b/connectivity/source/drivers/ado/AColumn.cxx @@ -24,7 +24,6 @@ #include <ado/AColumn.hxx> #include <ado/AConnection.hxx> #include <ado/Awrapado.hxx> -#include <cppuhelper/typeprovider.hxx> #include <com/sun/star/sdbc/ColumnValue.hpp> #include <comphelper/extract.hxx> #include <comphelper/servicehelper.hxx> @@ -89,9 +88,8 @@ Sequence< sal_Int8 > OAdoColumn::getUnoTunnelId() sal_Int64 OAdoColumn::getSomething( const Sequence< sal_Int8 > & rId ) { - return comphelper::isUnoTunnelId<OAdoColumn>(rId) - ? reinterpret_cast< sal_Int64 >( this ) - : OColumn_ADO::getSomething(rId); + return comphelper::getSomethingImpl(rId, this, + comphelper::FallbackToGetSomethingOf<OColumn_ADO>{}); } void OAdoColumn::construct() diff --git a/connectivity/source/drivers/ado/AConnection.cxx b/connectivity/source/drivers/ado/AConnection.cxx index 394fe0ed3666..19276dfac73c 100644 --- a/connectivity/source/drivers/ado/AConnection.cxx +++ b/connectivity/source/drivers/ado/AConnection.cxx @@ -33,7 +33,6 @@ #include <com/sun/star/sdbc/XRow.hpp> #include <com/sun/star/lang/DisposedException.hpp> #include <comphelper/servicehelper.hxx> -#include <cppuhelper/typeprovider.hxx> #include <connectivity/dbexception.hxx> #include <osl/file.hxx> #include <strings.hrc> @@ -490,11 +489,8 @@ void OConnection::disposing() sal_Int64 SAL_CALL OConnection::getSomething( const css::uno::Sequence< sal_Int8 >& rId ) { - return comphelper::isUnoTunnelId<OConnection>(rId) - ? - reinterpret_cast< sal_Int64 >( this ) - : - OConnection_BASE::getSomething(rId); + return comphelper::getSomethingImpl(rId, this, + comphelper::FallbackToGetSomethingOf<OConnection_BASE>{}); } Sequence< sal_Int8 > OConnection::getUnoTunnelId() diff --git a/connectivity/source/drivers/ado/AGroup.cxx b/connectivity/source/drivers/ado/AGroup.cxx index 2504616a9f6d..f4ed2b12adbc 100644 --- a/connectivity/source/drivers/ado/AGroup.cxx +++ b/connectivity/source/drivers/ado/AGroup.cxx @@ -21,7 +21,6 @@ #include <ado/AGroup.hxx> #include <ado/AUsers.hxx> #include <comphelper/servicehelper.hxx> -#include <cppuhelper/typeprovider.hxx> #include <com/sun/star/sdbc/XRow.hpp> #include <com/sun/star/sdbc/XResultSet.hpp> #include <ado/AConnection.hxx> @@ -92,9 +91,8 @@ Sequence< sal_Int8 > OAdoGroup::getUnoTunnelId() sal_Int64 OAdoGroup::getSomething( const Sequence< sal_Int8 > & rId ) { - return comphelper::isUnoTunnelId<OAdoGroup>(rId) - ? reinterpret_cast< sal_Int64 >( this ) - : OGroup_ADO::getSomething(rId); + return comphelper::getSomethingImpl(rId, this, + comphelper::FallbackToGetSomethingOf<OGroup_ADO>{}); } diff --git a/connectivity/source/drivers/ado/AIndex.cxx b/connectivity/source/drivers/ado/AIndex.cxx index 44d562bfea61..6b58900893b8 100644 --- a/connectivity/source/drivers/ado/AIndex.cxx +++ b/connectivity/source/drivers/ado/AIndex.cxx @@ -20,7 +20,6 @@ #include <ado/AIndex.hxx> #include <com/sun/star/sdbc/XRow.hpp> #include <com/sun/star/sdbc/XResultSet.hpp> -#include <cppuhelper/typeprovider.hxx> #include <ado/AColumns.hxx> #include <TConnection.hxx> #include <comphelper/servicehelper.hxx> @@ -81,9 +80,8 @@ Sequence< sal_Int8 > OAdoIndex::getUnoTunnelId() sal_Int64 OAdoIndex::getSomething( const Sequence< sal_Int8 > & rId ) { - return comphelper::isUnoTunnelId<OAdoIndex>(rId) - ? reinterpret_cast< sal_Int64 >( this ) - : sdbcx::OIndex::getSomething(rId); + return comphelper::getSomethingImpl(rId, this, + comphelper::FallbackToGetSomethingOf<sdbcx::OIndex>{}); } void SAL_CALL OAdoIndex::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue) diff --git a/connectivity/source/drivers/ado/AKey.cxx b/connectivity/source/drivers/ado/AKey.cxx index d27d93e8ce3f..35e121c6bb7a 100644 --- a/connectivity/source/drivers/ado/AKey.cxx +++ b/connectivity/source/drivers/ado/AKey.cxx @@ -21,7 +21,6 @@ #include <com/sun/star/sdbc/XRow.hpp> #include <com/sun/star/sdbc/XResultSet.hpp> #include <comphelper/servicehelper.hxx> -#include <cppuhelper/typeprovider.hxx> #include <ado/AColumns.hxx> #include <ado/AConnection.hxx> @@ -77,9 +76,8 @@ Sequence< sal_Int8 > OAdoKey::getUnoTunnelId() sal_Int64 OAdoKey::getSomething( const Sequence< sal_Int8 > & rId ) { - return comphelper::isUnoTunnelId<OAdoKey>(rId) - ? reinterpret_cast< sal_Int64 >( this ) - : OKey_ADO::getSomething(rId); + return comphelper::getSomethingImpl(rId, this, + comphelper::FallbackToGetSomethingOf<OKey_ADO>{}); } void OAdoKey::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue) diff --git a/connectivity/source/drivers/ado/ATable.cxx b/connectivity/source/drivers/ado/ATable.cxx index d656dad7ff45..12280d9bc002 100644 --- a/connectivity/source/drivers/ado/ATable.cxx +++ b/connectivity/source/drivers/ado/ATable.cxx @@ -31,7 +31,6 @@ #include <com/sun/star/sdbc/XResultSet.hpp> #include <com/sun/star/sdbcx/KeyType.hpp> #include <com/sun/star/sdbc/KeyRule.hpp> -#include <cppuhelper/typeprovider.hxx> #include <com/sun/star/lang/DisposedException.hpp> #include <com/sun/star/sdbc/ColumnValue.hpp> #include <ado/Awrapado.hxx> @@ -138,9 +137,8 @@ Sequence< sal_Int8 > OAdoTable::getUnoTunnelId() sal_Int64 OAdoTable::getSomething( const Sequence< sal_Int8 > & rId ) { - return comphelper::isUnoTunnelId<OAdoTable>(rId) - ? reinterpret_cast< sal_Int64 >( this ) - : OTable_TYPEDEF::getSomething(rId); + return comphelper::getSomethingImpl(rId, this, + comphelper::FallbackToGetSomethingOf<OTable_TYPEDEF>{}); } // XRename diff --git a/connectivity/source/drivers/ado/AUser.cxx b/connectivity/source/drivers/ado/AUser.cxx index da73707489ae..09585ed81e44 100644 --- a/connectivity/source/drivers/ado/AUser.cxx +++ b/connectivity/source/drivers/ado/AUser.cxx @@ -21,7 +21,6 @@ #include <ado/ACatalog.hxx> #include <ado/AGroups.hxx> #include <comphelper/servicehelper.hxx> -#include <cppuhelper/typeprovider.hxx> #include <com/sun/star/sdbc/XRow.hpp> #include <com/sun/star/sdbc/XResultSet.hpp> #include <ado/AConnection.hxx> @@ -76,9 +75,8 @@ Sequence< sal_Int8 > OAdoUser::getUnoTunnelId() sal_Int64 OAdoUser::getSomething( const Sequence< sal_Int8 > & rId ) { - return comphelper::isUnoTunnelId<OAdoUser>(rId) - ? reinterpret_cast< sal_Int64 >( this ) - : OUser_TYPEDEF::getSomething(rId); + return comphelper::getSomethingImpl(rId, this, + comphelper::FallbackToGetSomethingOf<OUser_TYPEDEF>{}); } diff --git a/connectivity/source/drivers/ado/AView.cxx b/connectivity/source/drivers/ado/AView.cxx index 32ed99a112ff..15f6a5cc9a6d 100644 --- a/connectivity/source/drivers/ado/AView.cxx +++ b/connectivity/source/drivers/ado/AView.cxx @@ -20,7 +20,6 @@ #include <ado/AView.hxx> #include <com/sun/star/lang/DisposedException.hpp> #include <ado/adoimp.hxx> -#include <cppuhelper/typeprovider.hxx> #include <ado/Awrapado.hxx> #include <comphelper/servicehelper.hxx> #include <comphelper/types.hxx> @@ -51,9 +50,8 @@ Sequence< sal_Int8 > OAdoView::getUnoTunnelId() sal_Int64 OAdoView::getSomething( const Sequence< sal_Int8 > & rId ) { - return comphelper::isUnoTunnelId<OAdoView>(rId) - ? reinterpret_cast< sal_Int64 >( this ) - : OView_ADO::getSomething(rId); + return comphelper::getSomethingImpl(rId, this, + comphelper::FallbackToGetSomethingOf<OView_ADO>{}); } diff --git a/connectivity/source/drivers/calc/CTable.cxx b/connectivity/source/drivers/calc/CTable.cxx index 676ffa051371..8e37cdd99071 100644 --- a/connectivity/source/drivers/calc/CTable.cxx +++ b/connectivity/source/drivers/calc/CTable.cxx @@ -41,7 +41,6 @@ #include <rtl/math.hxx> #include <tools/time.hxx> #include <comphelper/servicehelper.hxx> -#include <cppuhelper/typeprovider.hxx> using namespace connectivity; using namespace connectivity::calc; @@ -620,9 +619,8 @@ Sequence< sal_Int8 > OCalcTable::getUnoTunnelId() sal_Int64 OCalcTable::getSomething( const Sequence< sal_Int8 > & rId ) { - return (comphelper::isUnoTunnelId<OCalcTable>(rId)) - ? reinterpret_cast< sal_Int64 >( this ) - : OCalcTable_BASE::getSomething(rId); + return comphelper::getSomethingImpl(rId, this, + comphelper::FallbackToGetSomethingOf<OCalcTable_BASE>{}); } bool OCalcTable::fetchRow( OValueRefRow& _rRow, const OSQLColumns & _rCols, diff --git a/connectivity/source/drivers/dbase/DIndex.cxx b/connectivity/source/drivers/dbase/DIndex.cxx index 0c269bf847d6..ca2e3e107e1a 100644 --- a/connectivity/source/drivers/dbase/DIndex.cxx +++ b/connectivity/source/drivers/dbase/DIndex.cxx @@ -30,7 +30,6 @@ #include <unotools/ucbhelper.hxx> #include <comphelper/servicehelper.hxx> #include <comphelper/types.hxx> -#include <cppuhelper/typeprovider.hxx> #include <connectivity/dbexception.hxx> #include <dbase/DResultSet.hxx> #include <strings.hrc> @@ -110,9 +109,8 @@ Sequence< sal_Int8 > ODbaseIndex::getUnoTunnelId() sal_Int64 ODbaseIndex::getSomething( const Sequence< sal_Int8 > & rId ) { - return (comphelper::isUnoTunnelId<ODbaseIndex>(rId)) - ? reinterpret_cast< sal_Int64 >( this ) - : ODbaseIndex_BASE::getSomething(rId); + return comphelper::getSomethingImpl(rId, this, + comphelper::FallbackToGetSomethingOf<ODbaseIndex_BASE>{}); } ONDXPagePtr const & ODbaseIndex::getRoot() diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx index 32b599e03129..8ffb7775af4b 100644 --- a/connectivity/source/drivers/dbase/DTable.cxx +++ b/connectivity/source/drivers/dbase/DTable.cxx @@ -43,7 +43,6 @@ #include <unotools/tempfile.hxx> #include <unotools/ucbhelper.hxx> #include <comphelper/types.hxx> -#include <cppuhelper/typeprovider.hxx> #include <cppuhelper/exc_hlp.hxx> #include <cppuhelper/queryinterface.hxx> #include <connectivity/dbtools.hxx> @@ -741,9 +740,8 @@ Sequence< sal_Int8 > ODbaseTable::getUnoTunnelId() sal_Int64 ODbaseTable::getSomething( const Sequence< sal_Int8 > & rId ) { - return (comphelper::isUnoTunnelId<ODbaseTable>(rId)) - ? reinterpret_cast< sal_Int64 >( this ) - : ODbaseTable_BASE::getSomething(rId); + return comphelper::getSomethingImpl(rId, this, + comphelper::FallbackToGetSomethingOf<ODbaseTable_BASE>{}); } bool ODbaseTable::fetchRow(OValueRefRow& _rRow, const OSQLColumns & _rCols, bool bRetrieveData) diff --git a/connectivity/source/drivers/file/FConnection.cxx b/connectivity/source/drivers/file/FConnection.cxx index 4d28d218bca6..0fba732c9f04 100644 --- a/connectivity/source/drivers/file/FConnection.cxx +++ b/connectivity/source/drivers/file/FConnection.cxx @@ -21,7 +21,6 @@ #include <comphelper/processfactory.hxx> #include <comphelper/servicehelper.hxx> -#include <cppuhelper/typeprovider.hxx> #include <file/FConnection.hxx> #include <file/FDatabaseMetaData.hxx> #include <file/FDriver.hxx> @@ -401,9 +400,7 @@ Reference< XDynamicResultSet > OConnection::getDir() const sal_Int64 SAL_CALL OConnection::getSomething( const Sequence< sal_Int8 >& rId ) { - return (comphelper::isUnoTunnelId<OConnection>(rId)) - ? reinterpret_cast< sal_Int64 >( this ) - : sal_Int64(0); + return comphelper::getSomethingImpl(rId, this); } Sequence< sal_Int8 > OConnection::getUnoTunnelId() diff --git a/connectivity/source/drivers/file/FResultSet.cxx b/connectivity/source/drivers/file/FResultSet.cxx index 13a678656fae..0a4040ddc590 100644 --- a/connectivity/source/drivers/file/FResultSet.cxx +++ b/connectivity/source/drivers/file/FResultSet.cxx @@ -1390,9 +1390,7 @@ Sequence< sal_Int8 > OResultSet::getUnoTunnelId() sal_Int64 OResultSet::getSomething( const Sequence< sal_Int8 > & rId ) { - return comphelper::isUnoTunnelId<OResultSet>(rId) - ? reinterpret_cast< sal_Int64 >( this ) - : 0; + return comphelper::getSomethingImpl(rId, this); } void OResultSet::setBoundedColumns(const OValueRefRow& _rRow, diff --git a/connectivity/source/drivers/file/FTable.cxx b/connectivity/source/drivers/file/FTable.cxx index 6a6c10886c89..d56b5f86f969 100644 --- a/connectivity/source/drivers/file/FTable.cxx +++ b/connectivity/source/drivers/file/FTable.cxx @@ -23,7 +23,6 @@ #include <com/sun/star/sdbc/XRow.hpp> #include <com/sun/star/sdbc/XResultSet.hpp> #include <comphelper/servicehelper.hxx> -#include <cppuhelper/typeprovider.hxx> #include <unotools/ucbstreamhelper.hxx> using namespace connectivity; @@ -129,9 +128,8 @@ Sequence< sal_Int8 > OFileTable::getUnoTunnelId() sal_Int64 OFileTable::getSomething( const Sequence< sal_Int8 > & rId ) { - return comphelper::isUnoTunnelId<OFileTable>(rId) - ? reinterpret_cast< sal_Int64 >( this ) - : OTable_TYPEDEF::getSomething(rId); + return comphelper::getSomethingImpl(rId, this, + comphelper::FallbackToGetSomethingOf<OTable_TYPEDEF>{}); } void OFileTable::FileClose() diff --git a/connectivity/source/drivers/firebird/Connection.cxx b/connectivity/source/drivers/firebird/Connection.cxx index a4ed730c896c..7122d80b7a15 100644 --- a/connectivity/source/drivers/firebird/Connection.cxx +++ b/connectivity/source/drivers/firebird/Connection.cxx @@ -47,7 +47,6 @@ #include <comphelper/servicehelper.hxx> #include <comphelper/storagehelper.hxx> #include <cppuhelper/exc_hlp.hxx> -#include <cppuhelper/typeprovider.hxx> #include <unotools/tempfile.hxx> #include <unotools/localfilehelper.hxx> @@ -382,7 +381,7 @@ Reference< XClob> Connection::createClob(ISC_QUAD const * pBlobId) // virtual sal_Int64 SAL_CALL Connection::getSomething(const css::uno::Sequence<sal_Int8>& rId) { - return (comphelper::isUnoTunnelId<Connection>(rId)) ? reinterpret_cast<sal_Int64>(this) : sal_Int64(0); + return comphelper::getSomethingImpl(rId, this); } // static diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx index efc24d3bed4b..ea47022d026f 100644 --- a/connectivity/source/drivers/flat/ETable.cxx +++ b/connectivity/source/drivers/flat/ETable.cxx @@ -30,7 +30,6 @@ #include <tools/solar.h> #include <tools/urlobj.hxx> #include <cppuhelper/queryinterface.hxx> -#include <cppuhelper/typeprovider.hxx> #include <comphelper/numbers.hxx> #include <comphelper/servicehelper.hxx> #include <com/sun/star/util/NumberFormat.hpp> @@ -561,9 +560,8 @@ Sequence< sal_Int8 > OFlatTable::getUnoTunnelId() sal_Int64 OFlatTable::getSomething( const Sequence< sal_Int8 > & rId ) { - return (comphelper::isUnoTunnelId<OFlatTable>(rId)) - ? reinterpret_cast< sal_Int64 >( this ) - : OFlatTable_BASE::getSomething(rId); + return comphelper::getSomethingImpl(rId, this, + comphelper::FallbackToGetSomethingOf<OFlatTable_BASE>{}); } bool OFlatTable::fetchRow(OValueRefRow& _rRow, const OSQLColumns & _rCols, bool bRetrieveData) diff --git a/connectivity/source/drivers/hsqldb/HTable.cxx b/connectivity/source/drivers/hsqldb/HTable.cxx index 21179a69778f..a60898eb44f4 100644 --- a/connectivity/source/drivers/hsqldb/HTable.cxx +++ b/connectivity/source/drivers/hsqldb/HTable.cxx @@ -18,7 +18,6 @@ */ #include <hsqldb/HTable.hxx> -#include <cppuhelper/typeprovider.hxx> #include <com/sun/star/beans/PropertyAttribute.hpp> #include <com/sun/star/sdbcx/Privilege.hpp> #include <comphelper/property.hxx> @@ -126,9 +125,8 @@ Sequence< sal_Int8 > OHSQLTable::getUnoTunnelId() sal_Int64 OHSQLTable::getSomething( const Sequence< sal_Int8 > & rId ) { - return (comphelper::isUnoTunnelId<OHSQLTable>(rId)) - ? reinterpret_cast< sal_Int64 >( this ) - : OTable_TYPEDEF::getSomething(rId); + return comphelper::getSomethingImpl(rId, this, + comphelper::FallbackToGetSomethingOf<OTable_TYPEDEF>{}); } // XAlterTable diff --git a/connectivity/source/drivers/mysql_jdbc/YTable.cxx b/connectivity/source/drivers/mysql_jdbc/YTable.cxx index 83a8cb2081af..54b8915cab63 100644 --- a/connectivity/source/drivers/mysql_jdbc/YTable.cxx +++ b/connectivity/source/drivers/mysql_jdbc/YTable.cxx @@ -19,7 +19,6 @@ #include <mysql/YTable.hxx> #include <mysql/YTables.hxx> -#include <cppuhelper/typeprovider.hxx> #include <com/sun/star/beans/PropertyAttribute.hpp> #include <com/sun/star/sdbcx/Privilege.hpp> #include <comphelper/property.hxx> @@ -127,8 +126,8 @@ Sequence<sal_Int8> OMySQLTable::getUnoTunnelId() sal_Int64 OMySQLTable::getSomething(const Sequence<sal_Int8>& rId) { - return (comphelper::isUnoTunnelId<OMySQLTable>(rId)) ? reinterpret_cast<sal_Int64>(this) - : OTable_TYPEDEF::getSomething(rId); + return comphelper::getSomethingImpl(rId, this, + comphelper::FallbackToGetSomethingOf<OTable_TYPEDEF>{}); } // XAlterTable diff --git a/connectivity/source/drivers/writer/WTable.cxx b/connectivity/source/drivers/writer/WTable.cxx index 8248973a80af..2f76fc4a09d0 100644 --- a/connectivity/source/drivers/writer/WTable.cxx +++ b/connectivity/source/drivers/writer/WTable.cxx @@ -31,7 +31,6 @@ #include <connectivity/sdbcx/VColumn.hxx> #include <sal/log.hxx> #include <comphelper/servicehelper.hxx> -#include <cppuhelper/typeprovider.hxx> namespace com::sun::star::text { @@ -219,8 +218,8 @@ uno::Sequence<sal_Int8> OWriterTable::getUnoTunnelId() sal_Int64 OWriterTable::getSomething(const uno::Sequence<sal_Int8>& rId) { - return (comphelper::isUnoTunnelId<OWriterTable>(rId)) ? reinterpret_cast<sal_Int64>(this) - : OWriterTable_BASE::getSomething(rId); + return comphelper::getSomethingImpl(rId, this, + comphelper::FallbackToGetSomethingOf<OWriterTable_BASE>{}); } bool OWriterTable::fetchRow(OValueRefRow& _rRow, const OSQLColumns& _rCols, bool bRetrieveData) diff --git a/connectivity/source/sdbcx/VDescriptor.cxx b/connectivity/source/sdbcx/VDescriptor.cxx index 4741b5896612..9023a2076a74 100644 --- a/connectivity/source/sdbcx/VDescriptor.cxx +++ b/connectivity/source/sdbcx/VDescriptor.cxx @@ -46,9 +46,7 @@ namespace connectivity::sdbcx // css::lang::XUnoTunnel sal_Int64 SAL_CALL ODescriptor::getSomething( const Sequence< sal_Int8 >& rId ) { - return (comphelper::isUnoTunnelId<ODescriptor>(rId)) - ? reinterpret_cast< sal_Int64 >( this ) - : 0; + return comphelper::getSomethingImpl(rId, this); } |