diff options
author | Thorsten Behrens <tbehrens@suse.com> | 2012-04-15 03:38:40 +0200 |
---|---|---|
committer | Petr Mladek <pmladek@suse.cz> | 2012-04-17 12:11:32 +0200 |
commit | 513ae531ccd3080fa1089d2d9d7dc829e96267cf (patch) | |
tree | 3181e9bdaba14fc03f994c89521b6c549bfbc9ae | |
parent | 35f7233f498785904f37968ee2dedfc59a64e992 (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.
Signed-off-by: Petr Mladek <pmladek@suse.cz>
-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 b2f1bb5aab2e..a16783de60b1 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: |