include/svl/style.hxx | 7 +------ svl/source/items/style.cxx | 18 ++---------------- 2 files changed, 3 insertions(+), 22 deletions(-)
New commits: commit 9e301586113ea693d5133527678866be4be3f62e Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Thu Jan 12 13:32:22 2023 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Fri Jan 13 15:52:05 2023 +0000 XUnoTunnel->dynamic_cast in SfxUnoStyleSheet Change-Id: I22ad42fd0de3de3bddc1b6d3a99f09883e523340 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145464 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/include/svl/style.hxx b/include/svl/style.hxx index db265fc98340..cb8498a2d118 100644 --- a/include/svl/style.hxx +++ b/include/svl/style.hxx @@ -22,7 +22,6 @@ #include <config_options.h> #include <com/sun/star/style/XStyle.hpp> -#include <com/sun/star/lang/XUnoTunnel.hpp> #include <rtl/ref.hxx> #include <cppuhelper/implbase.hxx> @@ -341,16 +340,12 @@ public: const OUString& GetOldName() const { return aName; } }; -class SVL_DLLPUBLIC SfxUnoStyleSheet : public cppu::ImplInheritanceHelper<SfxStyleSheet, css::style::XStyle, css::lang::XUnoTunnel> +class SVL_DLLPUBLIC SfxUnoStyleSheet : public cppu::ImplInheritanceHelper<SfxStyleSheet, css::style::XStyle> { public: SfxUnoStyleSheet( const OUString& _rName, const SfxStyleSheetBasePool& _rPool, SfxStyleFamily _eFamily, SfxStyleSearchBits _nMask ); static SfxUnoStyleSheet* getUnoStyleSheet( const css::uno::Reference< css::style::XStyle >& xStyle ); - - // XUnoTunnel - static const css::uno::Sequence< ::sal_Int8 >& getUnoTunnelId(); - virtual ::sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< ::sal_Int8 >& aIdentifier ) override; }; #endif diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx index 4f4ae926f461..ff21cd91c804 100644 --- a/svl/source/items/style.cxx +++ b/svl/source/items/style.cxx @@ -880,21 +880,13 @@ rtl::Reference<SfxStyleSheetBase> SfxStyleSheetPool::Create( const OUString& rNa } SfxUnoStyleSheet::SfxUnoStyleSheet( const OUString& _rName, const SfxStyleSheetBasePool& _rPool, SfxStyleFamily _eFamily, SfxStyleSearchBits _nMask ) -: cppu::ImplInheritanceHelper<SfxStyleSheet, css::style::XStyle, css::lang::XUnoTunnel>(_rName, _rPool, _eFamily, _nMask) +: cppu::ImplInheritanceHelper<SfxStyleSheet, css::style::XStyle>(_rName, _rPool, _eFamily, _nMask) { } SfxUnoStyleSheet* SfxUnoStyleSheet::getUnoStyleSheet( const css::uno::Reference< css::style::XStyle >& xStyle ) { - return comphelper::getFromUnoTunnel<SfxUnoStyleSheet>(xStyle); -} - -/** - * XUnoTunnel - */ -::sal_Int64 SAL_CALL SfxUnoStyleSheet::getSomething( const css::uno::Sequence< ::sal_Int8 >& rId ) -{ - return comphelper::getSomethingImpl(rId, this); + return dynamic_cast<SfxUnoStyleSheet*>(xStyle.get()); } void @@ -903,12 +895,6 @@ SfxStyleSheetBasePool::StoreStyleSheet(const rtl::Reference< SfxStyleSheetBase > pImpl->mxIndexedStyleSheets->AddStyleSheet(xStyle); } -const css::uno::Sequence< ::sal_Int8 >& SfxUnoStyleSheet::getUnoTunnelId() -{ - static const comphelper::UnoIdInit theSfxUnoStyleSheetIdentifier; - return theSfxUnoStyleSheetIdentifier.getSeq(); -} - void SfxStyleSheetBasePool::Reindex() {