diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-01-13 09:29:04 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-01-15 10:14:05 +0000 |
commit | e5e40c0bf56806540850d440ad10a26f33e3387c (patch) | |
tree | 591ce6057b81b578d32ba3acc07517851ff61749 /xmloff | |
parent | 68c6133e4d52c581bb0b98ee4ed8f183eeb4f242 (diff) |
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.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/inc/StyleMap.hxx | 6 | ||||
-rw-r--r-- | xmloff/source/core/xmlimp.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/style/StyleMap.cxx | 3 |
3 files changed, 3 insertions, 10 deletions
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: */ |