summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-10-06 09:56:29 +0100
committerMichael Stahl <mstahl@redhat.com>2016-10-06 10:57:32 +0000
commit91e0a73984f72e0f04e6087524332f6354f627d0 (patch)
tree9275e7353ad1cc014a24a1b380ec6981d946f1b5
parentbump product version to 5.1.7 (diff)
downloadcore-91e0a73984f72e0f04e6087524332f6354f627d0.tar.gz
core-91e0a73984f72e0f04e6087524332f6354f627d0.zip
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>
-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 af94c38d2259..8feda7a9ca2a 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++ )