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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Sep 13 10:58:25 UTC 2018


 oox/source/export/drawingml.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit e06a1239371f14ef0ad84a4ddaa9309a601048da
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Sep 13 09:13:25 2018 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Sep 13 12:57:56 2018 +0200

    crashtesting: divide by zero
    
    since...
    
    commit f3d6c44c9cb533fe4f1cd28fc95adc36cac4bfd5
    Date:   Mon Sep 3 11:05:44 2018 -0400
    
        tdf#108064 OOXML export: keep preset dashes with any line width
    
    Change-Id: I948123977f48d1f1005788f6a2c117e8971cab6f
    Reviewed-on: https://gerrit.libreoffice.org/60423
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 56caab75d8b2..8e554ad671bd 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -701,9 +701,9 @@ void DrawingML::WriteOutline( const Reference<XPropertySet>& rXPropSet )
     if( bDashSet && aStyleLineStyle != drawing::LineStyle_DASH )
     {
         // convert absolute dash/dot length to relative length
-        int relDotLen = aLineDash.DotLen / nLineWidth;
-        int relDashLen = aLineDash.DashLen / nLineWidth;
-        int relDistance = aLineDash.Distance / nLineWidth;
+        int relDotLen = nLineWidth ? aLineDash.DotLen / nLineWidth : -1;
+        int relDashLen = nLineWidth ? aLineDash.DashLen / nLineWidth : -1;
+        int relDistance = nLineWidth ? aLineDash.Distance / nLineWidth : -1;
         // keep default mso preset linestyles (instead of custdash)
         if (aLineDash.Dots == 1 && relDotLen == 1 && aLineDash.Dashes == 0 && relDashLen == 0 && relDistance == 3)
         {


More information about the Libreoffice-commits mailing list