sd/source/ui/unoidl/SdUnoDrawView.cxx | 2 +- sd/source/ui/unoidl/unolayer.cxx | 3 --- sd/source/ui/unoidl/unolayer.hxx | 4 ---- sd/source/ui/unoidl/unopage.cxx | 4 ++-- sd/source/ui/unoidl/unopback.cxx | 2 -- sd/source/ui/unoidl/unopback.hxx | 7 +------ 6 files changed, 4 insertions(+), 18 deletions(-)
New commits: commit 89ee1addd06d913ab65d61e01cf05d688bdc9904 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Fri Jan 20 13:34:42 2023 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sun Jan 22 19:10:25 2023 +0000 XUnoTunnel->dynamic_cast in SdLayerManager Change-Id: Ibea94a8168538e59eea6312fd49b162534df8d8d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145969 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sd/source/ui/unoidl/SdUnoDrawView.cxx b/sd/source/ui/unoidl/SdUnoDrawView.cxx index 379a2956f6fe..7714032637c4 100644 --- a/sd/source/ui/unoidl/SdUnoDrawView.cxx +++ b/sd/source/ui/unoidl/SdUnoDrawView.cxx @@ -115,7 +115,7 @@ Reference<drawing::XLayer> SdUnoDrawView::getActiveLayer() const // Get the corresponding XLayer object from the implementation // object of the layer manager. Reference<drawing::XLayerManager> xManager (pModel->getLayerManager(), uno::UNO_QUERY); - SdLayerManager* pManager = comphelper::getFromUnoTunnel<SdLayerManager> (xManager); + SdLayerManager* pManager = dynamic_cast<SdLayerManager*> (xManager.get()); if (pManager != nullptr) xCurrentLayer = pManager->GetLayer (pLayer); } diff --git a/sd/source/ui/unoidl/unolayer.cxx b/sd/source/ui/unoidl/unolayer.cxx index 4fc571aa9e79..0706ff552941 100644 --- a/sd/source/ui/unoidl/unolayer.cxx +++ b/sd/source/ui/unoidl/unolayer.cxx @@ -379,9 +379,6 @@ SdLayerManager::~SdLayerManager() noexcept dispose(); } -// uno helper -UNO3_GETIMPLEMENTATION_IMPL( SdLayerManager ); - // XComponent void SAL_CALL SdLayerManager::dispose( ) { diff --git a/sd/source/ui/unoidl/unolayer.hxx b/sd/source/ui/unoidl/unolayer.hxx index aa7d4891b38b..48160449f8d6 100644 --- a/sd/source/ui/unoidl/unolayer.hxx +++ b/sd/source/ui/unoidl/unolayer.hxx @@ -102,7 +102,6 @@ private: class SdLayerManager : public ::cppu::WeakImplHelper< css::drawing::XLayerManager, css::container::XNameAccess, css::lang::XServiceInfo, - css::lang::XUnoTunnel, css::lang::XComponent > { friend class SdLayer; @@ -111,9 +110,6 @@ public: explicit SdLayerManager( SdXImpressDocument& rMyModel ) noexcept; virtual ~SdLayerManager() noexcept override; - // uno helper - UNO3_GETIMPLEMENTATION_DECL( SdLayerManager ) - // XServiceInfo virtual OUString SAL_CALL getImplementationName() override; virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override; commit e0a1227d2fa7812bd1e6cffc2bb4e4213185c99f Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Fri Jan 20 13:33:18 2023 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sun Jan 22 19:10:16 2023 +0000 XUnoTunnel->dynamic_cast in SdUnoPageBackground Change-Id: I67e911eba5333770b83a3b5e7e2c1a7bc96ef1c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145968 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx index ae05e5ce79ed..dda5cb3baea0 100644 --- a/sd/source/ui/unoidl/unopage.cxx +++ b/sd/source/ui/unoidl/unopage.cxx @@ -2455,7 +2455,7 @@ void SdDrawPage::setBackground( const Any& rValue ) } // is it our own implementation? - SdUnoPageBackground* pBack = comphelper::getFromUnoTunnel<SdUnoPageBackground>( xSet ); + SdUnoPageBackground* pBack = dynamic_cast<SdUnoPageBackground*>( xSet.get() ); SfxItemSetFixed<XATTR_FILL_FIRST, XATTR_FILL_LAST> aSet( GetModel()->GetDoc()->GetPool() ); @@ -2827,7 +2827,7 @@ void SdMasterPage::setBackground( const Any& rValue ) { // first fill an item set // is it our own implementation? - SdUnoPageBackground* pBack = comphelper::getFromUnoTunnel<SdUnoPageBackground>( xInputSet ); + SdUnoPageBackground* pBack = dynamic_cast<SdUnoPageBackground*>( xInputSet.get() ); SfxItemSetFixed<XATTR_FILL_FIRST, XATTR_FILL_LAST> aSet( GetModel()->GetDoc()->GetPool() ); diff --git a/sd/source/ui/unoidl/unopback.cxx b/sd/source/ui/unoidl/unopback.cxx index 02ba92ff0178..5b500371f54c 100644 --- a/sd/source/ui/unoidl/unopback.cxx +++ b/sd/source/ui/unoidl/unopback.cxx @@ -45,8 +45,6 @@ const SvxItemPropertySet* ImplGetPageBackgroundPropertySet() return &aPageBackgroundPropertySet_Impl; } -UNO3_GETIMPLEMENTATION_IMPL( SdUnoPageBackground ); - SdUnoPageBackground::SdUnoPageBackground( SdDrawDocument* pDoc /* = NULL */, const SfxItemSet* pSet /* = NULL */) diff --git a/sd/source/ui/unoidl/unopback.hxx b/sd/source/ui/unoidl/unopback.hxx index c70cc2fea4eb..c2834d9298ee 100644 --- a/sd/source/ui/unoidl/unopback.hxx +++ b/sd/source/ui/unoidl/unopback.hxx @@ -25,7 +25,6 @@ #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/beans/XPropertyState.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> -#include <com/sun/star/lang/XUnoTunnel.hpp> #include <svl/lstner.hxx> #include <comphelper/servicehelper.hxx> @@ -44,8 +43,7 @@ const SvxItemPropertySet* ImplGetPageBackgroundPropertySet(); class SdUnoPageBackground final : public ::cppu::WeakImplHelper< css::beans::XPropertySet, css::lang::XServiceInfo, - css::beans::XPropertyState, - css::lang::XUnoTunnel>, + css::beans::XPropertyState>, public SfxListener { const SvxItemPropertySet* mpPropSet; @@ -62,9 +60,6 @@ public: void fillItemSet( SdDrawDocument* pDoc, SfxItemSet& rSet ); virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override; - // uno helper - UNO3_GETIMPLEMENTATION_DECL( SdUnoPageBackground ) - // XServiceInfo virtual OUString SAL_CALL getImplementationName() override; virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;