diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-09-13 09:13:25 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-09-13 12:57:56 +0200 |
commit | e06a1239371f14ef0ad84a4ddaa9309a601048da (patch) | |
tree | e7448680f5e4d3d38cd8783e6499389e9054f316 /oox/source/export | |
parent | 0302c9b192c3b7ba10daabed61d6864c24c14070 (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/export')
-rw-r--r-- | oox/source/export/drawingml.cxx | 6 |
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) { |