summaryrefslogtreecommitdiff
path: root/configmgr
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-09-13 11:29:37 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2021-09-15 06:08:14 +0200
commit3f65724ec5fc92d5a0078a99932358ef7091435c (patch)
tree94dd9bf1d0ecd42dbf7f94db45bc7e1bf29b83ce /configmgr
parent6444b026b4039458d01ada5fee58eae98166585b (diff)
Use <comphelper/servicehelper.hxx> implementing XUnoTunnel part 4
- Change implementations of getSomething to use getSomethingImpl Or where that's impossible, use getSomething_cast to unify this and reduce number of places where we reinterpret_cast. All static methods getting tunnel ids were renamed to getUnoTunnelId, to comply with the convention used in <comphelper/servicehelper.hxx>. TODO (in separate commits): - Revise uses of getSomething to use getFromUnoTunnel Change-Id: Ifde9e214b52e5df678de71fcc32d2199c82e85cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122100 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'configmgr')
-rw-r--r--configmgr/source/access.cxx2
-rw-r--r--configmgr/source/childaccess.cxx5
-rw-r--r--configmgr/source/childaccess.hxx2
3 files changed, 4 insertions, 5 deletions
diff --git a/configmgr/source/access.cxx b/configmgr/source/access.cxx
index 28ef91000fb1..816262d3f812 100644
--- a/configmgr/source/access.cxx
+++ b/configmgr/source/access.cxx
@@ -2162,7 +2162,7 @@ rtl::Reference< ChildAccess > Access::getFreeSetMember(
if (tunnel.is()) {
freeAcc.set(
reinterpret_cast< ChildAccess * >(
- tunnel->getSomething(ChildAccess::getTunnelId())));
+ tunnel->getSomething(ChildAccess::getUnoTunnelId())));
}
if (!freeAcc.is() || freeAcc->getParentAccess().is() ||
(freeAcc->isInTransaction() &&
diff --git a/configmgr/source/childaccess.cxx b/configmgr/source/childaccess.cxx
index 221a98e24f67..87def984be17 100644
--- a/configmgr/source/childaccess.cxx
+++ b/configmgr/source/childaccess.cxx
@@ -55,7 +55,7 @@
namespace configmgr {
-css::uno::Sequence< sal_Int8 > const & ChildAccess::getTunnelId()
+css::uno::Sequence< sal_Int8 > const & ChildAccess::getUnoTunnelId()
{
static const comphelper::UnoIdInit theChildAccessUnoTunnelId;
return theChildAccessUnoTunnelId.getSeq();
@@ -164,8 +164,7 @@ sal_Int64 ChildAccess::getSomething(
assert(thisIs(IS_ANY));
osl::MutexGuard g(*lock_);
checkLocalizedPropertyAccess();
- return aIdentifier == getTunnelId()
- ? reinterpret_cast< sal_Int64 >(this) : 0;
+ return comphelper::getSomethingImpl(aIdentifier, this);
}
void ChildAccess::bind(
diff --git a/configmgr/source/childaccess.hxx b/configmgr/source/childaccess.hxx
index 2c0eabfcaa4e..d063a28c9c9c 100644
--- a/configmgr/source/childaccess.hxx
+++ b/configmgr/source/childaccess.hxx
@@ -52,7 +52,7 @@ class ChildAccess:
public css::lang::XUnoTunnel
{
public:
- static css::uno::Sequence< sal_Int8 > const & getTunnelId();
+ static css::uno::Sequence< sal_Int8 > const & getUnoTunnelId();
ChildAccess(
Components & components, rtl::Reference< RootAccess > const & root,