From 0da2d347a8de0e7480aba900961a1464c753c087 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 23 Jan 2023 09:51:14 +0200 Subject: XUnoTunnel->dynamic_cast in vcl::Graphic Change-Id: Iecbae3570851784f0da75fd2899daf620c8e4c06 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145994 Tested-by: Jenkins Reviewed-by: Noel Grandin --- vcl/source/graphic/UnoGraphic.cxx | 8 -------- vcl/source/graphic/UnoGraphicProvider.cxx | 3 ++- 2 files changed, 2 insertions(+), 9 deletions(-) (limited to 'vcl/source/graphic') diff --git a/vcl/source/graphic/UnoGraphic.cxx b/vcl/source/graphic/UnoGraphic.cxx index f26640563862..d1b7fd0238df 100644 --- a/vcl/source/graphic/UnoGraphic.cxx +++ b/vcl/source/graphic/UnoGraphic.cxx @@ -57,8 +57,6 @@ uno::Any SAL_CALL Graphic::queryInterface( const uno::Type & rType ) aAny <<= uno::Reference< graphic::XGraphic >( this ); else if( rType == cppu::UnoType::get()) aAny <<= uno::Reference< awt::XBitmap >( this ); - else if( rType == cppu::UnoType::get()) - aAny <<= uno::Reference< lang::XUnoTunnel >(this); else if( rType == cppu::UnoType::get()) aAny <<= uno::Reference< graphic::XGraphicTransformer >(this); else @@ -176,12 +174,6 @@ uno::Sequence SAL_CALL Graphic::getMaskDIB() } } -sal_Int64 SAL_CALL Graphic::getSomething( const uno::Sequence< sal_Int8 >& rId ) -{ - return comphelper::getSomethingImpl(rId, &maGraphic); -} - - // XGraphicTransformer uno::Reference< graphic::XGraphic > SAL_CALL Graphic::colorChange( const uno::Reference< graphic::XGraphic >& rxGraphic, sal_Int32 nColorFrom, sal_Int8 nTolerance, sal_Int32 nColorTo, sal_Int8 nAlphaTo ) diff --git a/vcl/source/graphic/UnoGraphicProvider.cxx b/vcl/source/graphic/UnoGraphicProvider.cxx index f0e0d12e7895..bceb9fbabed1 100644 --- a/vcl/source/graphic/UnoGraphicProvider.cxx +++ b/vcl/source/graphic/UnoGraphicProvider.cxx @@ -796,7 +796,8 @@ void SAL_CALL GraphicProvider::storeGraphic( const uno::Reference< ::graphic::XG { const uno::Reference< XInterface > xIFace( rxGraphic, uno::UNO_QUERY ); - const ::Graphic* pGraphic = comphelper::getFromUnoTunnel<::Graphic>( xIFace ); + const ::unographic::Graphic* pUnoGraphic = dynamic_cast<::unographic::Graphic*>(xIFace.get()); + const ::Graphic* pGraphic = pUnoGraphic ? &pUnoGraphic->GetGraphic() : nullptr; if( pGraphic && ( pGraphic->GetType() != GraphicType::NONE ) ) { -- cgit