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>
This commit is contained in:
parent
805a634ccc
commit
0045c49cf4
@ -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 )
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user