xmloff/inc/StyleMap.hxx | 6 +----- xmloff/source/core/xmlimp.cxx | 4 ++-- xmloff/source/style/StyleMap.cxx | 3 --- xmloff/source/transform/MutableAttrList.cxx | 13 ------------- xmloff/source/transform/MutableAttrList.hxx | 8 +------- 5 files changed, 4 insertions(+), 30 deletions(-)
New commits: commit e5e40c0bf56806540850d440ad10a26f33e3387c Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Fri Jan 13 09:29:04 2023 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sun Jan 15 10:14:05 2023 +0000 XUnoTunnel->dynamic_cast in StyleMap Change-Id: Ib4070fbff0c919cdc2be12f5a2bed1b1ac9e03c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145505 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/xmloff/inc/StyleMap.hxx b/xmloff/inc/StyleMap.hxx index 5cea47b24159..796245f52fc7 100644 --- a/xmloff/inc/StyleMap.hxx +++ b/xmloff/inc/StyleMap.hxx @@ -19,7 +19,6 @@ #pragma once -#include <com/sun/star/lang/XUnoTunnel.hpp> #include <comphelper/servicehelper.hxx> #include <cppuhelper/implbase.hxx> #include <o3tl/hash_combine.hxx> @@ -64,7 +63,7 @@ inline bool StyleNameHash_Impl::operator()( } class StyleMap final : - public ::cppu::WeakImplHelper< css::lang::XUnoTunnel>, + public ::cppu::WeakImplHelper<>, public std::unordered_map< StyleNameKey_Impl, OUString, StyleNameHash_Impl, StyleNameHash_Impl > { @@ -73,9 +72,6 @@ public: StyleMap(); virtual ~StyleMap() override; - - // XUnoTunnel - UNO3_GETIMPLEMENTATION_DECL(StyleMap) }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx index 4f33a1ab6607..6d166def862b 100644 --- a/xmloff/source/core/xmlimp.cxx +++ b/xmloff/source/core/xmlimp.cxx @@ -982,7 +982,7 @@ void SAL_CALL SvXMLImport::initialize( const uno::Sequence< uno::Any >& aArgumen uno::Any aAny = mxImportInfo->getPropertyValue(sPropName); aAny >>= xIfc; - StyleMap *pSMap = comphelper::getFromUnoTunnel<StyleMap>( xIfc ); + StyleMap *pSMap = dynamic_cast<StyleMap*>( xIfc.get() ); if( pSMap ) { mpStyleMap = pSMap; @@ -1393,7 +1393,7 @@ void SvXMLImport::AddStyleDisplayName( XmlStyleFamily nFamily, xPropertySetInfo->hasPropertyByName(sPrivateData) ) { Reference < XInterface > xIfc( - static_cast< css::lang::XUnoTunnel *>( mpStyleMap.get() ) ); + static_cast< css::lang::XTypeProvider *>( mpStyleMap.get() ) ); mxImportInfo->setPropertyValue( sPrivateData, Any(xIfc) ); } } diff --git a/xmloff/source/style/StyleMap.cxx b/xmloff/source/style/StyleMap.cxx index 1d52ea112374..cb7acfb33d53 100644 --- a/xmloff/source/style/StyleMap.cxx +++ b/xmloff/source/style/StyleMap.cxx @@ -26,7 +26,4 @@ StyleMap::StyleMap() {} StyleMap::~StyleMap() {} -// XUnoTunnel & co -UNO3_GETIMPLEMENTATION_IMPL(StyleMap); - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ commit 68c6133e4d52c581bb0b98ee4ed8f183eeb4f242 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Fri Jan 13 09:24:14 2023 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sun Jan 15 10:13:54 2023 +0000 XUnoTunnel->dynamic_cast in XMLMutableAttributeList Change-Id: Ia36576da1f287c9b687042eba5d429366b3db0a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145504 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/xmloff/source/transform/MutableAttrList.cxx b/xmloff/source/transform/MutableAttrList.cxx index f6fc026ae91b..65da52e91f9d 100644 --- a/xmloff/source/transform/MutableAttrList.cxx +++ b/xmloff/source/transform/MutableAttrList.cxx @@ -57,19 +57,6 @@ XMLMutableAttributeList::~XMLMutableAttributeList() m_xAttrList = nullptr; } -const css::uno::Sequence<sal_Int8>& XMLMutableAttributeList::getUnoTunnelId() noexcept -{ - static const comphelper::UnoIdInit theXMLMutableAttributeListUnoTunnelId; - return theXMLMutableAttributeListUnoTunnelId.getSeq(); -} - -// XUnoTunnel -sal_Int64 SAL_CALL XMLMutableAttributeList::getSomething( - const Sequence< sal_Int8 >& rId ) -{ - return comphelper::getSomethingImpl(rId, this); -} - sal_Int16 SAL_CALL XMLMutableAttributeList::getLength() { return m_xAttrList->getLength(); diff --git a/xmloff/source/transform/MutableAttrList.hxx b/xmloff/source/transform/MutableAttrList.hxx index c025ffc5cc94..d3405a3fe96a 100644 --- a/xmloff/source/transform/MutableAttrList.hxx +++ b/xmloff/source/transform/MutableAttrList.hxx @@ -21,7 +21,6 @@ #include <com/sun/star/util/XCloneable.hpp> #include <com/sun/star/xml/sax/XAttributeList.hpp> -#include <com/sun/star/lang/XUnoTunnel.hpp> #include <cppuhelper/implbase.hxx> #include <rtl/ref.hxx> @@ -30,8 +29,7 @@ class SvXMLAttributeList; class XMLMutableAttributeList : public ::cppu::WeakImplHelper< css::xml::sax::XAttributeList, - css::util::XCloneable, - css::lang::XUnoTunnel> + css::util::XCloneable> { css::uno::Reference< css::xml::sax::XAttributeList> m_xAttrList; @@ -46,10 +44,6 @@ public: bool bClone=false ); virtual ~XMLMutableAttributeList() override; - // XUnoTunnel - static const css::uno::Sequence<sal_Int8>& getUnoTunnelId() noexcept; - virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override; - // css::xml::sax::XAttributeList virtual sal_Int16 SAL_CALL getLength() override; virtual OUString SAL_CALL getNameByIndex(sal_Int16 i) override;