diff --git a/src/java/org/apache/poi/sl/draw/PathGradientPaint.java b/src/java/org/apache/poi/sl/draw/PathGradientPaint.java index c7d3cfbb67..40c802ccac 100644 --- a/src/java/org/apache/poi/sl/draw/PathGradientPaint.java +++ b/src/java/org/apache/poi/sl/draw/PathGradientPaint.java @@ -173,7 +173,9 @@ public class PathGradientPaint implements Paint { lower = mid; } } - return upper; + + // always report at least one gradient step + return Math.max(upper, 1); } public WritableRaster createRaster() {