diff options
author | Arkadiy Illarionov <qarkai@gmail.com> | 2019-09-22 18:20:39 +0300 |
---|---|---|
committer | Arkadiy Illarionov <qarkai@gmail.com> | 2019-09-23 15:47:12 +0200 |
commit | 1d398fb983d8f8b53a78e7c47b588fc1f1e7f748 (patch) | |
tree | 89e11384ea13d73b3c1dc198c5fee8675036abbe /vcl | |
parent | cd6780aae1392d4c1af0b15b311a4966834a9602 (diff) |
tdf#39593 use getUnoTunnelImplementation
Change-Id: I78eb67913a568c610e38e5002f914773c4906dfd
Reviewed-on: https://gerrit.libreoffice.org/79350
Tested-by: Jenkins
Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/gdi/graph.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx index 45a562d26d77..e8b377cb222e 100644 --- a/vcl/source/gdi/graph.cxx +++ b/vcl/source/gdi/graph.cxx @@ -24,6 +24,7 @@ #include <impgraph.hxx> #include <com/sun/star/lang/XUnoTunnel.hpp> #include <com/sun/star/graphic/XGraphic.hpp> +#include <comphelper/servicehelper.hxx> #include <cppuhelper/typeprovider.hxx> #include <graphic/UnoGraphic.hxx> #include <vcl/GraphicExternalLink.hxx> @@ -228,10 +229,7 @@ Graphic::Graphic(const GDIMetaFile& rMtf) Graphic::Graphic( const css::uno::Reference< css::graphic::XGraphic >& rxGraphic ) { - uno::Reference< lang::XUnoTunnel > xTunnel( rxGraphic, uno::UNO_QUERY ); - const ::Graphic* pGraphic = ( xTunnel.is() ? - reinterpret_cast< ::Graphic* >( xTunnel->getSomething( getUnoTunnelId() ) ) : - nullptr ); + const ::Graphic* pGraphic = comphelper::getUnoTunnelImplementation<::Graphic>(rxGraphic); if( pGraphic ) { |