diff options
author | Arkadiy Illarionov <qarkai@gmail.com> | 2019-08-04 15:55:12 +0300 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-08-05 09:48:03 +0200 |
commit | f0390929d3e71ab434f9ce8d88c2dc2f4cc0ea6e (patch) | |
tree | 7cfa32c4e5fe717930be117eb10a52a9f2eb0441 /connectivity/source/sdbcx | |
parent | 1b5c7007f4304c9816cf810aa6ca2f11ba8e295f (diff) |
tdf#39593 Drop connectivity::sdbcx::ODescriptor::getImplementation
Replace with comphelper::getUnoTunnelImplementation.
Change-Id: Ia08561c11872a4ede9077863f81040633c30aebc
Reviewed-on: https://gerrit.libreoffice.org/76914
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'connectivity/source/sdbcx')
-rw-r--r-- | connectivity/source/sdbcx/VCollection.cxx | 3 | ||||
-rw-r--r-- | connectivity/source/sdbcx/VDescriptor.cxx | 16 |
2 files changed, 6 insertions, 13 deletions
diff --git a/connectivity/source/sdbcx/VCollection.cxx b/connectivity/source/sdbcx/VCollection.cxx index 7ccb08c4d21c..56060cb2ea9a 100644 --- a/connectivity/source/sdbcx/VCollection.cxx +++ b/connectivity/source/sdbcx/VCollection.cxx @@ -28,6 +28,7 @@ #include <comphelper/enumhelper.hxx> #include <comphelper/types.hxx> #include <comphelper/property.hxx> +#include <comphelper/servicehelper.hxx> #include <cppuhelper/exc_hlp.hxx> #include <TConnection.hxx> #include <rtl/ustrbuf.hxx> @@ -373,7 +374,7 @@ void SAL_CALL OCollection::appendByDescriptor( const Reference< XPropertySet >& if ( !xNewlyCreated.is() ) throw RuntimeException(); - ODescriptor* pDescriptor = ODescriptor::getImplementation( xNewlyCreated ); + ODescriptor* pDescriptor = comphelper::getUnoTunnelImplementation<ODescriptor>( xNewlyCreated ); if ( pDescriptor ) pDescriptor->setNew( false ); diff --git a/connectivity/source/sdbcx/VDescriptor.cxx b/connectivity/source/sdbcx/VDescriptor.cxx index 0be99ce8b164..cde97530a186 100644 --- a/connectivity/source/sdbcx/VDescriptor.cxx +++ b/connectivity/source/sdbcx/VDescriptor.cxx @@ -19,6 +19,7 @@ #include <connectivity/sdbcx/VDescriptor.hxx> #include <com/sun/star/beans/PropertyAttribute.hpp> +#include <comphelper/servicehelper.hxx> #include <cppuhelper/queryinterface.hxx> #include <cppuhelper/typeprovider.hxx> @@ -48,21 +49,12 @@ namespace connectivity // css::lang::XUnoTunnel sal_Int64 SAL_CALL ODescriptor::getSomething( const Sequence< sal_Int8 >& rId ) { - return (rId.getLength() == 16 && 0 == memcmp(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) ) + return (rId.getLength() == 16 && 0 == memcmp(getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) ? reinterpret_cast< sal_Int64 >( this ) : 0; } - ODescriptor* ODescriptor::getImplementation( const Reference< XInterface >& _rxSomeComp ) - { - Reference< XUnoTunnel > xTunnel( _rxSomeComp, UNO_QUERY ); - if ( xTunnel.is() ) - return reinterpret_cast< ODescriptor* >( xTunnel->getSomething( getUnoTunnelImplementationId() ) ); - return nullptr; - } - - namespace { struct ResetROAttribute @@ -98,12 +90,12 @@ namespace connectivity bool ODescriptor::isNew( const Reference< XInterface >& _rxDescriptor ) { - ODescriptor* pImplementation = getImplementation( _rxDescriptor ); + ODescriptor* pImplementation = comphelper::getUnoTunnelImplementation<ODescriptor>( _rxDescriptor ); return pImplementation && pImplementation->isNew(); } - Sequence< sal_Int8 > ODescriptor::getUnoTunnelImplementationId() + Sequence< sal_Int8 > ODescriptor::getUnoTunnelId() { static ::cppu::OImplementationId implId; |