diff options
author | Thorsten Behrens <tbehrens@suse.com> | 2012-04-15 03:38:40 +0200 |
---|---|---|
committer | Thorsten Behrens <tbehrens@suse.com> | 2012-04-16 15:52:59 +0200 |
commit | 983c27402e151126c5bef6623eeb07f333456243 (patch) | |
tree | e1c7bae7a51343c9b94f017ddb5dd14c8474da6e | |
parent | 25de2a561b8f2618c2fa42dab39f57c727ce03e5 (diff) |
Fix fdo#33591 - edge-case trans gradients came out empty
Gradients with start==end got us zero steps, thus no fill at all.
Funnily this was wrong since pre-3.0 or somesuch.
-rw-r--r-- | drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx b/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx index 25afcfe365ce..7eb55ab0659e 100644 --- a/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx @@ -72,6 +72,8 @@ namespace drawinglayer nSteps = nMaxSteps; } + nSteps = std::max(sal_uInt32(1), nSteps); + switch(getFillGradient().getStyle()) { case attribute::GRADIENTSTYLE_LINEAR: |