diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-12-14 21:02:27 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-12-23 14:20:19 +0000 |
commit | 4c0bbe4bd97636207cf71a6aa120c67698891da9 (patch) | |
tree | 163d36a469bf075d0710e09894a29f9726259c53 /canvas/source/opengl | |
parent | 89803666621c07d1b1ac9d3bd883f0ca192a91a0 (diff) |
loplugin:unocast (canvas::ParametricPolyPolygon)
(See the upcoming commit introducing that loplugin:unocast on why such
dynamic_casts from UNO types are dangerous.)
Change-Id: I965d6ba17decda1fa055fb548aa9085d2e786bc0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144768
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'canvas/source/opengl')
-rw-r--r-- | canvas/source/opengl/ogl_canvashelper.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/canvas/source/opengl/ogl_canvashelper.cxx b/canvas/source/opengl/ogl_canvashelper.cxx index 1b84879b005c..28337013e965 100644 --- a/canvas/source/opengl/ogl_canvashelper.cxx +++ b/canvas/source/opengl/ogl_canvashelper.cxx @@ -21,6 +21,7 @@ #include <rtl/crc.h> #include <rtl/math.hxx> #include <comphelper/diagnose_ex.hxx> +#include <comphelper/servicehelper.hxx> #include <vcl/font.hxx> #include <vcl/kernarray.hxx> #include <vcl/metric.hxx> @@ -553,7 +554,7 @@ namespace oglcanvas // try to cast XParametricPolyPolygon2D reference to // our implementation class. ::canvas::ParametricPolyPolygon* pGradient = - dynamic_cast< ::canvas::ParametricPolyPolygon* >( textures[0].Gradient.get() ); + comphelper::getFromUnoTunnel< ::canvas::ParametricPolyPolygon >( textures[0].Gradient ); if( pGradient ) { |