[Libreoffice-commits] core.git: drawinglayer/source

Caolán McNamara caolanm at redhat.com
Mon Mar 27 12:46:34 UTC 2017


 drawinglayer/source/primitive2d/polygonprimitive2d.cxx |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit c8c4c84a5dda6f06aedba8d4cfef208be6812dbc
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Mar 27 10:08:33 2017 +0100

    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 at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

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
                 {


More information about the Libreoffice-commits mailing list