diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-01-23 09:40:28 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-01-23 10:10:48 +0000 |
commit | 3f11b3c466565432e45f19f1cc30171075b9af8d (patch) | |
tree | a70fb6fc161946fe9da825b07f9094fe07146b60 /configmgr | |
parent | ee284e65d2b1cad231d316efe0ef31232dfa8d02 (diff) |
XUnoTunnel->dynamic_cast in configmgr::ChildAccess
Change-Id: Iadfdbb68ad7876801bf79352bdec26da7da63325
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145993
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'configmgr')
-rw-r--r-- | configmgr/source/access.cxx | 4 | ||||
-rw-r--r-- | configmgr/source/childaccess.cxx | 18 | ||||
-rw-r--r-- | configmgr/source/childaccess.hxx | 8 |
3 files changed, 5 insertions, 25 deletions
diff --git a/configmgr/source/access.cxx b/configmgr/source/access.cxx index 865d383002d3..48d9b46ddc26 100644 --- a/configmgr/source/access.cxx +++ b/configmgr/source/access.cxx @@ -2159,7 +2159,9 @@ void Access::checkKnownProperty(OUString const & descriptor) { rtl::Reference< ChildAccess > Access::getFreeSetMember( css::uno::Any const & value) { - rtl::Reference< ChildAccess > freeAcc = comphelper::getFromUnoTunnel<ChildAccess>(value); + css::uno::Reference<XInterface> xTmp; + value >>= xTmp; + rtl::Reference< ChildAccess > freeAcc = dynamic_cast<ChildAccess*>(xTmp.get()); if (!freeAcc.is() || freeAcc->getParentAccess().is() || (freeAcc->isInTransaction() && freeAcc->getRootAccess() != getRootAccess())) diff --git a/configmgr/source/childaccess.cxx b/configmgr/source/childaccess.cxx index 60a11006bf7c..ea2394286371 100644 --- a/configmgr/source/childaccess.cxx +++ b/configmgr/source/childaccess.cxx @@ -56,12 +56,6 @@ namespace configmgr { -css::uno::Sequence< sal_Int8 > const & ChildAccess::getUnoTunnelId() -{ - static const comphelper::UnoIdInit theChildAccessUnoTunnelId; - return theChildAccessUnoTunnelId.getSeq(); -} - ChildAccess::ChildAccess( Components & components, rtl::Reference< RootAccess > const & root, rtl::Reference< Access > const & parent, OUString name, @@ -159,15 +153,6 @@ void ChildAccess::setParent(css::uno::Reference< css::uno::XInterface > const &) "setParent", static_cast< cppu::OWeakObject * >(this)); } -sal_Int64 ChildAccess::getSomething( - css::uno::Sequence< sal_Int8 > const & aIdentifier) -{ - assert(thisIs(IS_ANY)); - osl::MutexGuard g(*lock_); - checkLocalizedPropertyAccess(); - return comphelper::getSomethingImpl(aIdentifier, this); -} - void ChildAccess::bind( rtl::Reference< RootAccess > const & root, rtl::Reference< Access > const & parent, OUString const & name) @@ -341,8 +326,7 @@ css::uno::Any ChildAccess::queryInterface(css::uno::Type const & aType) return res.hasValue() ? res : cppu::queryInterface( - aType, static_cast< css::container::XChild * >(this), - static_cast< css::lang::XUnoTunnel * >(this)); + aType, static_cast< css::container::XChild * >(this)); } } diff --git a/configmgr/source/childaccess.hxx b/configmgr/source/childaccess.hxx index 3b7a5a5410aa..6f060c2de827 100644 --- a/configmgr/source/childaccess.hxx +++ b/configmgr/source/childaccess.hxx @@ -26,7 +26,6 @@ #include <vector> #include <com/sun/star/container/XChild.hpp> -#include <com/sun/star/lang/XUnoTunnel.hpp> #include <com/sun/star/uno/Reference.hxx> #include <com/sun/star/uno/Sequence.hxx> #include <rtl/ref.hxx> @@ -48,11 +47,9 @@ class Node; class RootAccess; class ChildAccess: - public Access, public css::container::XChild, - public css::lang::XUnoTunnel + public Access, public css::container::XChild { public: - static css::uno::Sequence< sal_Int8 > const & getUnoTunnelId(); ChildAccess( Components & components, rtl::Reference< RootAccess > const & root, @@ -85,9 +82,6 @@ public: virtual void SAL_CALL setParent( css::uno::Reference< css::uno::XInterface > const &) override; - virtual sal_Int64 SAL_CALL getSomething( - css::uno::Sequence< sal_Int8 > const & aIdentifier) override; - void bind( rtl::Reference< RootAccess > const & root, rtl::Reference< Access > const & parent, OUString const & name) |