summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2021-08-13 09:05:04 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-08-13 12:49:00 +0200
commitfa01f5a1feeb93a88a330daeec8177a39916e6a3 (patch)
tree0cd8e347a1608c51e06cb27f3da5b8cd2eed92e1 /filter
parente463cc0c8e2582e2cb57ab64a74a6a5cdd9b9787 (diff)
tdf#105575 Slow rendering when using a Logo command
Remove dynamic_cast'ing to Primitive2D, expensive and unnecessary <quikee[m]> 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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'filter')
-rw-r--r--filter/source/svg/svgfilter.cxx6
1 files changed, 2 insertions, 4 deletions
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;