summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/graph.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-01-23 09:51:14 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-01-23 11:46:09 +0000
commit0da2d347a8de0e7480aba900961a1464c753c087 (patch)
treede4c483ee97e940778f6bffdcb1a6199955dd92b /vcl/source/gdi/graph.cxx
parent319a466ad2a20d3170511a96ad16f4386ed0216b (diff)
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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/gdi/graph.cxx')
-rw-r--r--vcl/source/gdi/graph.cxx8
1 files changed, 2 insertions, 6 deletions
diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx
index 2407744820f8..4c0efa56beba 100644
--- a/vcl/source/gdi/graph.cxx
+++ b/vcl/source/gdi/graph.cxx
@@ -219,7 +219,8 @@ Graphic::Graphic(const GDIMetaFile& rMtf)
Graphic::Graphic( const css::uno::Reference< css::graphic::XGraphic >& rxGraphic )
{
- const ::Graphic* pGraphic = comphelper::getFromUnoTunnel<::Graphic>(rxGraphic);
+ const ::unographic::Graphic* pUnoGraphic = dynamic_cast<::unographic::Graphic*>(rxGraphic.get());
+ const ::Graphic* pGraphic = pUnoGraphic ? &pUnoGraphic->GetGraphic() : nullptr;
if( pGraphic )
{
@@ -556,9 +557,4 @@ OString Graphic::getUniqueID() const
return aUniqueString;
}
-const css::uno::Sequence<sal_Int8> & Graphic::getUnoTunnelId() {
- static const comphelper::UnoIdInit gId;
- return gId.getSeq();
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */