dbaccess/source/core/dataaccess/ContentHelper.cxx | 12 ------------ dbaccess/source/core/dataaccess/definitioncontainer.cxx | 4 ++-- dbaccess/source/core/dataaccess/documentcontainer.cxx | 2 +- dbaccess/source/core/inc/ContentHelper.hxx | 6 ------ 4 files changed, 3 insertions(+), 21 deletions(-)
New commits: commit 45a2d738c498feed80bc04e7bdf800cb0bf63fd3 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Sat Jan 14 12:32:23 2023 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Mon Jan 16 19:37:34 2023 +0000 XUnoTunnel->dynamic_cast in OContentHelper Change-Id: I3788af96cc8664d8afda2bd5eeaf85e9cd0cf374 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145618 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/dbaccess/source/core/dataaccess/ContentHelper.cxx b/dbaccess/source/core/dataaccess/ContentHelper.cxx index a45dd916068c..d7a8f63efd3c 100644 --- a/dbaccess/source/core/dataaccess/ContentHelper.cxx +++ b/dbaccess/source/core/dataaccess/ContentHelper.cxx @@ -105,12 +105,6 @@ css::uno::Sequence< OUString > SAL_CALL OContentHelper::getSupportedServiceNames } -const css::uno::Sequence<sal_Int8> & OContentHelper::getUnoTunnelId() -{ - static const comphelper::UnoIdInit aId; - return aId.getSeq(); -} - css::uno::Sequence<sal_Int8> OContentHelper::getImplementationId() { return css::uno::Sequence<sal_Int8>(); @@ -552,12 +546,6 @@ void OContentHelper::notifyPropertiesChange( const Sequence< PropertyChangeEvent } } -// css::lang::XUnoTunnel -sal_Int64 OContentHelper::getSomething( const Sequence< sal_Int8 > & rId ) -{ - return comphelper::getSomethingImpl(rId, this); -} - Reference< XInterface > SAL_CALL OContentHelper::getParent( ) { ::osl::MutexGuard aGuard(m_aMutex); diff --git a/dbaccess/source/core/dataaccess/definitioncontainer.cxx b/dbaccess/source/core/dataaccess/definitioncontainer.cxx index df121daaba84..807dc5ec98c3 100644 --- a/dbaccess/source/core/dataaccess/definitioncontainer.cxx +++ b/dbaccess/source/core/dataaccess/definitioncontainer.cxx @@ -533,7 +533,7 @@ void ODefinitionContainer::implAppend(const OUString& _rName, const Reference< X // #i44786# lcl_ensureName( _rxNewObject, _rName ); - ::rtl::Reference< OContentHelper > pContent = comphelper::getFromUnoTunnel<OContentHelper>( _rxNewObject ); + ::rtl::Reference< OContentHelper > pContent = dynamic_cast<OContentHelper*>( _rxNewObject.get() ); if ( pContent.is() ) { TContentPtr pImpl = pContent->getImpl(); @@ -592,7 +592,7 @@ void ODefinitionContainer::approveNewObject(const OUString& _sName,const Referen DBA_RES( RID_STR_NAME_ALREADY_USED ), *this ); - ::rtl::Reference< OContentHelper > pContent( comphelper::getFromUnoTunnel<OContentHelper>( _rxObject ) ); + ::rtl::Reference< OContentHelper > pContent( dynamic_cast<OContentHelper*>( _rxObject.get() ) ); if ( !pContent.is() ) throw IllegalArgumentException( DBA_RES( RID_STR_OBJECT_CONTAINER_MISMATCH ), diff --git a/dbaccess/source/core/dataaccess/documentcontainer.cxx b/dbaccess/source/core/dataaccess/documentcontainer.cxx index 6ac383e85a99..33dea6873692 100644 --- a/dbaccess/source/core/dataaccess/documentcontainer.cxx +++ b/dbaccess/source/core/dataaccess/documentcontainer.cxx @@ -668,7 +668,7 @@ OUString SAL_CALL ODocumentContainer::composeHierarchicalName( const OUString& i ::rtl::Reference<OContentHelper> pContent; try { - pContent = comphelper::getFromUnoTunnel<OContentHelper>(const_cast<ODocumentContainer*>(this)->implGetByName( _sName, true )); + pContent = dynamic_cast<OContentHelper*>(const_cast<ODocumentContainer*>(this)->implGetByName( _sName, true ).get()); } catch(const Exception&) { diff --git a/dbaccess/source/core/inc/ContentHelper.hxx b/dbaccess/source/core/inc/ContentHelper.hxx index 2035a35c1f8c..d60521a4328d 100644 --- a/dbaccess/source/core/inc/ContentHelper.hxx +++ b/dbaccess/source/core/inc/ContentHelper.hxx @@ -25,7 +25,6 @@ #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/sdbc/XRow.hpp> -#include <com/sun/star/lang/XUnoTunnel.hpp> #include <com/sun/star/uno/XComponentContext.hpp> #include <cppuhelper/compbase.hxx> #include <cppuhelper/basemutex.hxx> @@ -80,7 +79,6 @@ namespace dbaccess , css::beans::XPropertiesChangeNotifier , css::beans::XPropertyContainer , css::lang::XInitialization - , css::lang::XUnoTunnel , css::container::XChild , css::sdbcx::XRename > OContentHelper_COMPBASE; @@ -155,10 +153,6 @@ namespace dbaccess // XInitialization virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) 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::container::XChild virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getParent( ) override; virtual void SAL_CALL setParent( const css::uno::Reference< css::uno::XInterface >& Parent ) override;