From a6d44c4684f9b037e5c762430df78af2fc85cf34 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 12 Jan 2023 13:52:01 +0200 Subject: XUnoTunnel->dynamic_cast in VCLXFont Change-Id: I4afa34805e64f3ff37b76fe8ca4676c1f4eb3e14 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145468 Tested-by: Jenkins Reviewed-by: Noel Grandin --- toolkit/source/awt/vclxfont.cxx | 3 --- toolkit/source/helper/vclunohelper.cxx | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) (limited to 'toolkit') diff --git a/toolkit/source/awt/vclxfont.cxx b/toolkit/source/awt/vclxfont.cxx index 866a362e710f..01e7aaae7944 100644 --- a/toolkit/source/awt/vclxfont.cxx +++ b/toolkit/source/awt/vclxfont.cxx @@ -64,9 +64,6 @@ bool VCLXFont::ImplAssertValidFontMetric() return mpFontMetric != nullptr; } -// css::lang::XUnoTunnel -UNO3_GETIMPLEMENTATION_IMPL( VCLXFont ); - css::awt::FontDescriptor VCLXFont::getFontDescriptor( ) { std::unique_lock aGuard( maMutex ); diff --git a/toolkit/source/helper/vclunohelper.cxx b/toolkit/source/helper/vclunohelper.cxx index bac88c66268a..42b55c6db04f 100644 --- a/toolkit/source/helper/vclunohelper.cxx +++ b/toolkit/source/helper/vclunohelper.cxx @@ -250,7 +250,7 @@ vcl::Font VCLUnoHelper::CreateFont( const css::awt::FontDescriptor& rDescr, cons vcl::Font VCLUnoHelper::CreateFont( const css::uno::Reference< css::awt::XFont >& rxFont ) { vcl::Font aFont; - VCLXFont* pVCLXFont = comphelper::getFromUnoTunnel( rxFont ); + VCLXFont* pVCLXFont = dynamic_cast( rxFont.get() ); if ( pVCLXFont ) aFont = pVCLXFont->GetFont(); return aFont; -- cgit