diff options
Diffstat (limited to 'connectivity/source/sdbcx/VDescriptor.cxx')
-rw-r--r-- | connectivity/source/sdbcx/VDescriptor.cxx | 34 |
1 files changed, 5 insertions, 29 deletions
diff --git a/connectivity/source/sdbcx/VDescriptor.cxx b/connectivity/source/sdbcx/VDescriptor.cxx index 8a32a1b58b39..d6ceabc96837 100644 --- a/connectivity/source/sdbcx/VDescriptor.cxx +++ b/connectivity/source/sdbcx/VDescriptor.cxx @@ -28,7 +28,6 @@ namespace connectivity::sdbcx { using namespace ::com::sun::star::uno; - using namespace ::com::sun::star::lang; using namespace ::com::sun::star::beans; @@ -44,14 +43,6 @@ namespace connectivity::sdbcx // css::lang::XUnoTunnel - sal_Int64 SAL_CALL ODescriptor::getSomething( const Sequence< sal_Int8 >& rId ) - { - return (isUnoTunnelId<ODescriptor>(rId)) - ? reinterpret_cast< sal_Int64 >( this ) - : 0; - } - - namespace { struct ResetROAttribute @@ -76,10 +67,11 @@ namespace connectivity::sdbcx Sequence< Property > aProperties; describeProperties( aProperties ); + auto [begin, end] = asNonConstRange(aProperties); if ( isNew() ) - std::for_each( aProperties.begin(), aProperties.end(), ResetROAttribute() ); + std::for_each( begin, end, ResetROAttribute() ); else - std::for_each( aProperties.begin(), aProperties.end(), SetROAttribute() ); + std::for_each( begin, end, SetROAttribute() ); return new ::cppu::OPropertyArrayHelper( aProperties ); } @@ -87,26 +79,11 @@ namespace connectivity::sdbcx bool ODescriptor::isNew( const Reference< XInterface >& _rxDescriptor ) { - ODescriptor* pImplementation = comphelper::getUnoTunnelImplementation<ODescriptor>( _rxDescriptor ); + ODescriptor* pImplementation = dynamic_cast<ODescriptor*>( _rxDescriptor.get() ); return pImplementation && pImplementation->isNew(); } - Sequence< sal_Int8 > ODescriptor::getUnoTunnelId() - { - static ::cppu::OImplementationId implId; - - return implId.getImplementationId(); - } - - - Any SAL_CALL ODescriptor::queryInterface( const Type & rType ) - { - Any aRet = ::cppu::queryInterface(rType,static_cast< XUnoTunnel*> (this)); - return aRet.hasValue() ? aRet : ODescriptor_PBASE::queryInterface(rType); - } - - void ODescriptor::setNew(bool _bNew) { m_bNew = _bNew; @@ -117,8 +94,7 @@ namespace connectivity::sdbcx { ::cppu::OTypeCollection aTypes( cppu::UnoType<XMultiPropertySet>::get(), cppu::UnoType<XFastPropertySet>::get(), - cppu::UnoType<XPropertySet>::get(), - cppu::UnoType<XUnoTunnel>::get()); + cppu::UnoType<XPropertySet>::get()); return aTypes.getTypes(); } |