From d8a908c28fa2d5e6e9a2437fc039f413d968199a Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Tue, 13 May 2025 19:10:54 +0200 Subject: [PATCH] toolkit: Drop unnecessary XWindow2 param specialization XWindow2 subclasses XWindow, so there's no need for a VCLUnoHelper::GetWindow variant taking an XWindow2 reference that does the same as the variant taking an XWindow reference. Change-Id: I6f931252d2ae2e046dc31c076094e71b8aa71346 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185273 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- include/toolkit/helper/vclunohelper.hxx | 1 - toolkit/source/helper/vclunohelper.cxx | 6 ------ 2 files changed, 7 deletions(-) diff --git a/include/toolkit/helper/vclunohelper.hxx b/include/toolkit/helper/vclunohelper.hxx index b0099d547e79..c32de33f28aa 100644 --- a/include/toolkit/helper/vclunohelper.hxx +++ b/include/toolkit/helper/vclunohelper.hxx @@ -77,7 +77,6 @@ public: // Window static vcl::Window* GetWindow( const css::uno::Reference< css::awt::XWindow>& rxWindow ); - static vcl::Window* GetWindow( const css::uno::Reference< css::awt::XWindow2>& rxWindow2 ); static vcl::Window* GetWindow( const css::uno::Reference< css::awt::XWindowPeer>& rxWindowPeer ); static css::uno::Reference< css::awt::XWindow> GetInterface( vcl::Window* pWindow ); diff --git a/toolkit/source/helper/vclunohelper.cxx b/toolkit/source/helper/vclunohelper.cxx index 8e70456b1386..fb39ae519edb 100644 --- a/toolkit/source/helper/vclunohelper.cxx +++ b/toolkit/source/helper/vclunohelper.cxx @@ -80,12 +80,6 @@ vcl::Window* VCLUnoHelper::GetWindow( const css::uno::Reference< css::awt::XWind return pVCLXWindow ? pVCLXWindow->GetWindow() : nullptr; } -vcl::Window* VCLUnoHelper::GetWindow( const css::uno::Reference< css::awt::XWindow2>& rxWindow ) -{ - VCLXWindow* pVCLXWindow = dynamic_cast( rxWindow.get() ); - return pVCLXWindow ? pVCLXWindow->GetWindow() : nullptr; -} - vcl::Window* VCLUnoHelper::GetWindow( const css::uno::Reference< css::awt::XWindowPeer>& rxWindow ) { VCLXWindow* pVCLXWindow = dynamic_cast( rxWindow.get() );