summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-10-06 09:56:29 +0100
committerAndras Timar <andras.timar@collabora.com>2016-10-10 10:33:17 +0200
commitf7c78ad2ea504ade0232337c56d4774b62ffaa19 (patch)
tree6c23ace497c677c15470c59b4f90b4b999bc75cd
parent5a052d8a792fb1a5156030cf827c6f8cf15344c7 (diff)
Resolves: tdf#103026 invalid dash causes CAIRO_STATUS_INVALID_DASH state
(cherry picked from commit c5d355e9c9cbc94eede8f438895e192d834f7096) Change-Id: I072635ff7c67022ebfd5bdb475e390f3aab7a51c Reviewed-on: https://gerrit.libreoffice.org/29553 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit 91e0a73984f72e0f04e6087524332f6354f627d0)
-rw-r--r--canvas/source/cairo/cairo_canvashelper.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/canvas/source/cairo/cairo_canvashelper.cxx b/canvas/source/cairo/cairo_canvashelper.cxx
index 8d974afc25d4..1e41b3ae0964 100644
--- a/canvas/source/cairo/cairo_canvashelper.cxx
+++ b/canvas/source/cairo/cairo_canvashelper.cxx
@@ -1209,7 +1209,10 @@ namespace cairocanvas
break;
}
- if( strokeAttributes.DashArray.getLength() > 0 )
+ //tdf#103026 If the w scaling is 0, then all dashes become zero so
+ //cairo will set the cairo_t status to CAIRO_STATUS_INVALID_DASH
+ //and no further drawing will occur
+ if (strokeAttributes.DashArray.getLength() > 0 && w > 0.0)
{
double* pDashArray = new double[ strokeAttributes.DashArray.getLength() ];
for( sal_Int32 i=0; i<strokeAttributes.DashArray.getLength(); i++ )