dbaccess/source/core/api/RowSet.cxx | 28 +-------------------------- dbaccess/source/core/api/RowSet.hxx | 8 ------- dbaccess/source/core/api/RowSetBase.hxx | 8 ++----- dbaccess/source/core/api/querydescriptor.cxx | 16 --------------- dbaccess/source/core/api/querydescriptor.hxx | 12 +---------- 5 files changed, 7 insertions(+), 65 deletions(-)
New commits: commit 0045c49cf4389efe6cb369759fa2b9e6de938bd8 Author: Noel Grandin <[email protected]> AuthorDate: Sat Jan 14 09:19:58 2023 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Mon Jan 16 18:41:37 2023 +0000 XUnoTunnel->dynamic_cast in ORowSetBase Change-Id: I685d15982f56b336862da57ecfcbd9ac2d14838b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145616 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx index ed47c1657eba..b6d73a0d4869 100644 --- a/dbaccess/source/core/api/RowSet.cxx +++ b/dbaccess/source/core/api/RowSet.cxx @@ -419,18 +419,6 @@ void SAL_CALL ORowSet::release() noexcept ORowSet_BASE1::release(); } -// css::XUnoTunnel -sal_Int64 SAL_CALL ORowSet::getSomething( const Sequence< sal_Int8 >& rId ) -{ - return comphelper::getSomethingImpl(rId, this); -} - -const Sequence< sal_Int8 > & ORowSet::getUnoTunnelId() -{ - static const comphelper::UnoIdInit s_Id; - return s_Id.getSeq(); -} - // css::XAggregation Any SAL_CALL ORowSet::queryAggregation( const Type& rType ) { @@ -2145,7 +2133,7 @@ void ORowSet::notifyRowSetAndClonesRowDelete( const Any& _rBookmark ) // notify the clones for (auto const& elem : m_aClones) { - auto pClone = comphelper::getFromUnoTunnel<ORowSetClone>(elem.get()); + rtl::Reference<ORowSetClone> pClone = dynamic_cast<ORowSetClone*>(elem.get().get()); if(pClone) pClone->onDeleteRow( _rBookmark ); } @@ -2158,7 +2146,7 @@ void ORowSet::notifyRowSetAndClonesRowDeleted( const Any& _rBookmark, sal_Int32 // notify the clones for (auto const& clone : m_aClones) { - auto pClone = comphelper::getFromUnoTunnel<ORowSetClone>(clone.get()); + rtl::Reference<ORowSetClone> pClone = dynamic_cast<ORowSetClone*>(clone.get().get()); if(pClone) pClone->onDeletedRow( _rBookmark, _nPos ); } @@ -2903,18 +2891,6 @@ void ORowSetClone::close() return *::comphelper::OPropertyArrayUsageHelper<ORowSetClone>::getArrayHelper(); } -const Sequence< sal_Int8 > & ORowSetClone::getUnoTunnelId() -{ - static const comphelper::UnoIdInit implId; - return implId.getSeq(); -} - -// css::XUnoTunnel -sal_Int64 SAL_CALL ORowSetClone::getSomething( const Sequence< sal_Int8 >& rId ) -{ - return comphelper::getSomethingImpl(rId, this); -} - void SAL_CALL ORowSetClone::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue) { if ( nHandle == PROPERTY_ID_FETCHSIZE ) diff --git a/dbaccess/source/core/api/RowSet.hxx b/dbaccess/source/core/api/RowSet.hxx index afe49a923c26..3cf6fe690193 100644 --- a/dbaccess/source/core/api/RowSet.hxx +++ b/dbaccess/source/core/api/RowSet.hxx @@ -255,10 +255,6 @@ namespace dbaccess virtual void SAL_CALL acquire() noexcept override; virtual void SAL_CALL release() noexcept 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(); - // css::uno::XAggregation virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type& aType ) override; @@ -487,10 +483,6 @@ namespace dbaccess virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override; virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) 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(); - // OComponentHelper virtual void SAL_CALL disposing() override; diff --git a/dbaccess/source/core/api/RowSetBase.hxx b/dbaccess/source/core/api/RowSetBase.hxx index a721a1a4229d..13d6464cddbf 100644 --- a/dbaccess/source/core/api/RowSetBase.hxx +++ b/dbaccess/source/core/api/RowSetBase.hxx @@ -19,7 +19,7 @@ #pragma once #include <memory> -#include <cppuhelper/implbase10.hxx> +#include <cppuhelper/implbase9.hxx> #include <com/sun/star/sdbcx/XColumnsSupplier.hpp> #include <com/sun/star/sdbc/XRow.hpp> #include <com/sun/star/sdbc/XColumnLocate.hpp> @@ -28,7 +28,6 @@ #include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp> #include <com/sun/star/sdbc/XWarningsSupplier.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> -#include <com/sun/star/lang/XUnoTunnel.hpp> #include <cppuhelper/interfacecontainer.h> #include <connectivity/sqlerror.hxx> #include <connectivity/CommonTools.hxx> @@ -51,7 +50,7 @@ namespace dbaccess { class OEmptyCollection; - typedef ::cppu::ImplHelper10< css::sdbcx::XRowLocate, + typedef ::cppu::ImplHelper9< css::sdbcx::XRowLocate, css::sdbc::XRow, css::sdbc::XResultSetMetaDataSupplier, css::sdbc::XWarningsSupplier, @@ -59,8 +58,7 @@ namespace dbaccess css::sdbcx::XColumnsSupplier, css::lang::XServiceInfo, css::sdbc::XRowSet, - css::sdbc::XCloseable, - css::lang::XUnoTunnel> ORowSetBase_BASE; + css::sdbc::XCloseable> ORowSetBase_BASE; class ORowSetCache; class ORowSetDataColumns; commit 805a634ccc5c2e0bccdbb9c4820c70cd40db5510 Author: Noel Grandin <[email protected]> AuthorDate: Sat Jan 14 09:15:39 2023 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Mon Jan 16 18:41:31 2023 +0000 XUnoTunnel->dynamic_cast in OQueryDescriptor Change-Id: Ide46f159674ce84f6ecd8b9b0045a66a3b4ddd98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145615 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> diff --git a/dbaccess/source/core/api/querydescriptor.cxx b/dbaccess/source/core/api/querydescriptor.cxx index 0ac6d76e3077..d9cbbc634ce3 100644 --- a/dbaccess/source/core/api/querydescriptor.cxx +++ b/dbaccess/source/core/api/querydescriptor.cxx @@ -144,22 +144,6 @@ OQueryDescriptor_Base::~OQueryDescriptor_Base() m_pColumns->disposing(); } -sal_Int64 SAL_CALL OQueryDescriptor_Base::getSomething( const Sequence< sal_Int8 >& _rIdentifier ) -{ - return comphelper::getSomethingImpl(_rIdentifier, this); -} - -const css::uno::Sequence<sal_Int8> & OQueryDescriptor_Base::getUnoTunnelId() -{ - static const comphelper::UnoIdInit aId; - return aId.getSeq(); -} - -css::uno::Sequence<sal_Int8> OQueryDescriptor_Base::getImplementationId() -{ - return css::uno::Sequence<sal_Int8>(); -} - void OQueryDescriptor_Base::setColumnsOutOfDate( bool _bOutOfDate ) { m_bColumnsOutOfDate = _bOutOfDate; diff --git a/dbaccess/source/core/api/querydescriptor.hxx b/dbaccess/source/core/api/querydescriptor.hxx index e78b035dace0..181b8e4d436d 100644 --- a/dbaccess/source/core/api/querydescriptor.hxx +++ b/dbaccess/source/core/api/querydescriptor.hxx @@ -19,13 +19,12 @@ #pragma once -#include <cppuhelper/implbase3.hxx> +#include <cppuhelper/implbase2.hxx> #include <comphelper/proparrhlp.hxx> #include <osl/mutex.hxx> #include <com/sun/star/sdbcx/XColumnsSupplier.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> -#include <com/sun/star/lang/XUnoTunnel.hpp> #include <apitools.hxx> #include <column.hxx> @@ -38,9 +37,8 @@ namespace dbaccess { // OQueryDescriptor_Base - a query descriptor (as the name suggests :) -typedef ::cppu::ImplHelper3< +typedef ::cppu::ImplHelper2< css::sdbcx::XColumnsSupplier, - css::lang::XUnoTunnel, css::lang::XServiceInfo > OQueryDescriptor_BASE; class OQueryDescriptor_Base @@ -75,12 +73,6 @@ public: // css::sdbcx::XColumnsSupplier virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getColumns( ) override; -// css::lang::XUnoTunnel - virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override; - virtual css::uno::Sequence<sal_Int8> SAL_CALL getImplementationId( ) override; - static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId(); - - // css::lang::XServiceInfo virtual OUString SAL_CALL getImplementationName( ) override; virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
