sc/inc/styleuno.hxx | 5 ----- sc/source/ui/unoobj/styleuno.cxx | 6 +----- 2 files changed, 1 insertion(+), 10 deletions(-)
New commits: commit b127033bf40fb912c35bfb8a659227b749a40ac2 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Sat Jan 21 21:18:28 2023 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Mon Jan 23 07:27:58 2023 +0000 XUnoTunnel->dynamic_cast in ScStyleObj Change-Id: I1021cddc87546635b147bbdf5f48948565815873 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145983 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sc/inc/styleuno.hxx b/sc/inc/styleuno.hxx index b09a95b71960..d19feed3563a 100644 --- a/sc/inc/styleuno.hxx +++ b/sc/inc/styleuno.hxx @@ -30,7 +30,6 @@ #include <com/sun/star/beans/XMultiPropertySet.hpp> #include <com/sun/star/beans/XPropertyState.hpp> #include <com/sun/star/beans/XMultiPropertyStates.hpp> -#include <com/sun/star/lang/XUnoTunnel.hpp> #include <comphelper/servicehelper.hxx> #include <cppuhelper/implbase.hxx> @@ -161,7 +160,6 @@ class ScStyleObj final : public ::cppu::WeakImplHelper< css::beans::XMultiPropertySet, css::beans::XPropertyState, css::beans::XMultiPropertyStates, - css::lang::XUnoTunnel, css::lang::XServiceInfo >, public SfxListener { @@ -262,9 +260,6 @@ public: virtual OUString SAL_CALL getImplementationName() override; virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override; virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override; - - // XUnoTunnel - UNO3_GETIMPLEMENTATION_DECL(ScStyleObj) }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx index 4e60223ad0df..cddff8c73d00 100644 --- a/sc/source/ui/unoobj/styleuno.cxx +++ b/sc/source/ui/unoobj/styleuno.cxx @@ -677,7 +677,7 @@ void SAL_CALL ScStyleFamilyObj::insertByName( const OUString& aName, const uno:: uno::Reference< uno::XInterface > xInterface(aElement, uno::UNO_QUERY); if ( xInterface.is() ) { - ScStyleObj* pStyleObj = comphelper::getFromUnoTunnel<ScStyleObj>( xInterface ); + ScStyleObj* pStyleObj = dynamic_cast<ScStyleObj*>( xInterface.get() ); if ( pStyleObj && pStyleObj->GetFamily() == eFamily && !pStyleObj->IsInserted() ) // not yet inserted? { @@ -962,10 +962,6 @@ ScStyleObj::~ScStyleObj() pDocShell->GetDocument().RemoveUnoObject(*this); } -// XUnoTunnel - -UNO3_GETIMPLEMENTATION_IMPL(ScStyleObj); - void ScStyleObj::Notify( SfxBroadcaster&, const SfxHint& rHint ) { // reference update does not matter here