summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-09-12 02:00:41 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2021-09-12 10:43:36 +0200
commit6e4d8f3af4eb43bab419cae1062998f044b3f4c9 (patch)
treedabc3f70a40a6333370ac2be5b8f28e5f583cbdf /comphelper
parent4a7984960bf7d0af8342b360510c7e4e3d7399cf (diff)
Simplify OAccessibleImplementationAccess' XUnoTunnel implementation
Change-Id: Iad82fe1e0e524d2c33ab2165bd08353c4967c57f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121976 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/misc/accimplaccess.cxx13
1 files changed, 5 insertions, 8 deletions
diff --git a/comphelper/source/misc/accimplaccess.cxx b/comphelper/source/misc/accimplaccess.cxx
index 71a12c8a7e98..49304aad3270 100644
--- a/comphelper/source/misc/accimplaccess.cxx
+++ b/comphelper/source/misc/accimplaccess.cxx
@@ -18,6 +18,7 @@
*/
#include <comphelper/accimplaccess.hxx>
+#include <comphelper/servicehelper.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <string.h>
@@ -38,7 +39,7 @@ namespace comphelper
{
}
- Sequence< sal_Int8 > OAccessibleImplementationAccess::getUnoTunnelImplementationId()
+ Sequence<sal_Int8> OAccessibleImplementationAccess::getUnoTunnelId()
{
static cppu::OImplementationId implID;
@@ -48,14 +49,10 @@ namespace comphelper
sal_Int64 SAL_CALL OAccessibleImplementationAccess::getSomething( const Sequence< sal_Int8 >& _rIdentifier )
{
- sal_Int64 nReturn( 0 );
+ if (isUnoTunnelId<OAccessibleImplementationAccess>(_rIdentifier))
+ return reinterpret_cast<sal_Int64>(this);
- if ( ( _rIdentifier.getLength() == 16 )
- && ( 0 == memcmp( getUnoTunnelImplementationId().getConstArray(), _rIdentifier.getConstArray(), 16 ) )
- )
- nReturn = reinterpret_cast< sal_Int64 >( this );
-
- return nReturn;
+ return 0;
}
} // namespace comphelper