summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-03-27 10:08:33 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-03-27 12:46:15 +0000
commitc8c4c84a5dda6f06aedba8d4cfef208be6812dbc (patch)
treee6cbfc5a8893e651d8a8b584a30e6a3f7704f911 /drawinglayer
parent53e83bca82cb7c279af6a0752171864ffb3e5314 (diff)
ofz#947 line dashing is very problematic memory and size wise
Change-Id: I29ed7cd774d3ede077edfe2893c7a9e72b83abad Reviewed-on: https://gerrit.libreoffice.org/35748 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/primitive2d/polygonprimitive2d.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/drawinglayer/source/primitive2d/polygonprimitive2d.cxx b/drawinglayer/source/primitive2d/polygonprimitive2d.cxx
index 0d41a8d88a7c..147af59b6404 100644
--- a/drawinglayer/source/primitive2d/polygonprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/polygonprimitive2d.cxx
@@ -345,10 +345,16 @@ namespace drawinglayer
bUseDecomposition = true;
}
- if(bUseDecomposition)
+ if (bUseDecomposition)
{
// get correct range by using the decomposition fallback, reasons see above cases
+
+ // ofz#947 to optimize calculating the range, turn any slow dashes into a solid line
+ // when just calculating bounds
+ attribute::StrokeAttribute aOrigStrokeAttribute = maStrokeAttribute;
+ const_cast<PolygonStrokePrimitive2D*>(this)->maStrokeAttribute = attribute::StrokeAttribute();
aRetval = BufferedDecompositionPrimitive2D::getB2DRange(rViewInformation);
+ const_cast<PolygonStrokePrimitive2D*>(this)->maStrokeAttribute = aOrigStrokeAttribute;
}
else
{