From e5092fdf2420c81887a7e845af8e00bcedee156e Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 13 Jan 2023 15:22:21 +0200 Subject: XUnoTunnel->dynamic_cast in VCLXRegion Change-Id: I75956a2c713d52c01dcfd47fc0b8506ba526523e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145532 Tested-by: Jenkins Reviewed-by: Noel Grandin --- toolkit/inc/awt/vclxregion.hxx | 7 +------ toolkit/source/awt/vclxregion.cxx | 3 --- toolkit/source/helper/vclunohelper.cxx | 2 +- 3 files changed, 2 insertions(+), 10 deletions(-) (limited to 'toolkit') diff --git a/toolkit/inc/awt/vclxregion.hxx b/toolkit/inc/awt/vclxregion.hxx index 70b79990c0b3..c0c64d37a6a5 100644 --- a/toolkit/inc/awt/vclxregion.hxx +++ b/toolkit/inc/awt/vclxregion.hxx @@ -21,7 +21,6 @@ #include -#include #include #include #include @@ -32,8 +31,7 @@ class VCLXRegion final : public cppu::WeakImplHelper< - css::awt::XRegion, - css::lang::XUnoTunnel> + css::awt::XRegion> { std::mutex maMutex; vcl::Region maRegion; @@ -44,9 +42,6 @@ public: const vcl::Region& GetRegion() const { return maRegion; } - // css::lang::XUnoTunnel - UNO3_GETIMPLEMENTATION_DECL(VCLXRegion) - // css::awt::XRegion css::awt::Rectangle SAL_CALL getBounds() override; void SAL_CALL clear() override; diff --git a/toolkit/source/awt/vclxregion.cxx b/toolkit/source/awt/vclxregion.cxx index d9abedecfd54..fff7e7969d9a 100644 --- a/toolkit/source/awt/vclxregion.cxx +++ b/toolkit/source/awt/vclxregion.cxx @@ -31,9 +31,6 @@ VCLXRegion::~VCLXRegion() { } -// css::lang::XUnoTunnel -UNO3_GETIMPLEMENTATION_IMPL( VCLXRegion ); - css::awt::Rectangle VCLXRegion::getBounds() { std::scoped_lock aGuard( maMutex ); diff --git a/toolkit/source/helper/vclunohelper.cxx b/toolkit/source/helper/vclunohelper.cxx index 42b55c6db04f..c0f93ca5d756 100644 --- a/toolkit/source/helper/vclunohelper.cxx +++ b/toolkit/source/helper/vclunohelper.cxx @@ -123,7 +123,7 @@ vcl::Window* VCLUnoHelper::GetWindow( const css::uno::Reference< css::awt::XWind vcl::Region VCLUnoHelper::GetRegion( const css::uno::Reference< css::awt::XRegion >& rxRegion ) { vcl::Region aRegion; - VCLXRegion* pVCLRegion = comphelper::getFromUnoTunnel( rxRegion ); + VCLXRegion* pVCLRegion = dynamic_cast( rxRegion.get() ); if ( pVCLRegion ) aRegion = pVCLRegion->GetRegion(); else -- cgit