From fa01f5a1feeb93a88a330daeec8177a39916e6a3 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 13 Aug 2021 09:05:04 +0200 Subject: tdf#105575 Slow rendering when using a Logo command Remove dynamic_cast'ing to Primitive2D, expensive and unnecessary noelgrandin: nobody is using XPrimtive that is not derived from BasePrimitive2D in an extension ... mainly as it is not even possible Change-Id: I68224021f0fbc35fe2a973198ba78d2b41ea172d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120417 Tested-by: Jenkins Reviewed-by: Noel Grandin --- filter/source/svg/svgfilter.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'filter') diff --git a/filter/source/svg/svgfilter.cxx b/filter/source/svg/svgfilter.cxx index cc4120dbf428..d8a40437040c 100644 --- a/filter/source/svg/svgfilter.cxx +++ b/filter/source/svg/svgfilter.cxx @@ -267,11 +267,9 @@ bool SVGFilter::filterImpressOrDraw( const Sequence< PropertyValue >& rDescripto { if(rCandidate.is()) { - // try to cast to BasePrimitive2D implementation - const drawinglayer::primitive2d::BasePrimitive2D* pBasePrimitive( - dynamic_cast< const drawinglayer::primitive2d::BasePrimitive2D* >(rCandidate.get())); + auto pBasePrimitive = static_cast< const drawinglayer::primitive2d::BasePrimitive2D* >(rCandidate.get()); - if(pBasePrimitive && PRIMITIVE2D_ID_HIDDENGEOMETRYPRIMITIVE2D != pBasePrimitive->getPrimitive2DID()) + if(PRIMITIVE2D_ID_HIDDENGEOMETRYPRIMITIVE2D != pBasePrimitive->getPrimitive2DID()) { bAllAreHiddenGeometry = false; break; -- cgit