summaryrefslogtreecommitdiff
path: root/oox/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-09-13 09:13:25 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-09-13 12:57:56 +0200
commite06a1239371f14ef0ad84a4ddaa9309a601048da (patch)
treee7448680f5e4d3d38cd8783e6499389e9054f316 /oox/source
parent0302c9b192c3b7ba10daabed61d6864c24c14070 (diff)
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@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'oox/source')
-rw-r--r--oox/source/export/drawingml.cxx6
1 files changed, 3 insertions, 3 deletions
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)
{