summaryrefslogtreecommitdiff
path: root/dbaccess/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-01-14 09:19:58 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-01-16 18:41:37 +0000
commit0045c49cf4389efe6cb369759fa2b9e6de938bd8 (patch)
treed17deda185ad164aebc83993edb3fbbea6b7fdd4 /dbaccess/source
parent805a634ccc5c2e0bccdbb9c4820c70cd40db5510 (diff)
XUnoTunnel->dynamic_cast in ORowSetBase
Change-Id: I685d15982f56b336862da57ecfcbd9ac2d14838b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145616 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess/source')
-rw-r--r--dbaccess/source/core/api/RowSet.cxx28
-rw-r--r--dbaccess/source/core/api/RowSet.hxx8
-rw-r--r--dbaccess/source/core/api/RowSetBase.hxx8
3 files changed, 5 insertions, 39 deletions
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;