forked from amazingfate/loongoffice
tdf#39593 use isUnoTunnelId in dbaccess
Change-Id: I796d010c25e5d59f473b2b2f38736aebe16fe114 Reviewed-on: https://gerrit.libreoffice.org/79076 Tested-by: Jenkins Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
This commit is contained in:
@ -22,6 +22,7 @@
|
||||
#include "querydescriptor.hxx"
|
||||
#include <apitools.hxx>
|
||||
#include <stringconstants.hxx>
|
||||
#include <comphelper/servicehelper.hxx>
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
#include <cppuhelper/typeprovider.hxx>
|
||||
#include <com/sun/star/beans/PropertyAttribute.hpp>
|
||||
@ -142,16 +143,13 @@ OQueryDescriptor_Base::~OQueryDescriptor_Base()
|
||||
|
||||
sal_Int64 SAL_CALL OQueryDescriptor_Base::getSomething( const Sequence< sal_Int8 >& _rIdentifier )
|
||||
{
|
||||
if (_rIdentifier.getLength() != 16)
|
||||
return 0;
|
||||
|
||||
if (0 == memcmp(getUnoTunnelImplementationId().getConstArray(), _rIdentifier.getConstArray(), 16 ) )
|
||||
if (isUnoTunnelId<OQueryDescriptor_Base>(_rIdentifier))
|
||||
return reinterpret_cast<sal_Int64>(this);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
css::uno::Sequence<sal_Int8> OQueryDescriptor_Base::getUnoTunnelImplementationId()
|
||||
css::uno::Sequence<sal_Int8> OQueryDescriptor_Base::getUnoTunnelId()
|
||||
{
|
||||
static cppu::OImplementationId aId;
|
||||
return aId.getImplementationId();
|
||||
|
||||
@ -79,7 +79,7 @@ public:
|
||||
// css::lang::XUnoTunnel
|
||||
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
|
||||
virtual css::uno::Sequence<sal_Int8> SAL_CALL getImplementationId( ) override;
|
||||
static css::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId();
|
||||
static css::uno::Sequence< sal_Int8 > getUnoTunnelId();
|
||||
|
||||
|
||||
// css::lang::XServiceInfo
|
||||
|
||||
Reference in New Issue
Block a user