summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThorsten Behrens <tbehrens@suse.com>2012-04-15 03:38:40 +0200
committerPetr Mladek <pmladek@suse.cz>2012-04-17 12:11:32 +0200
commit513ae531ccd3080fa1089d2d9d7dc829e96267cf (patch)
tree3181e9bdaba14fc03f994c89521b6c549bfbc9ae
parentto find the headers and (static) library of our internal openssl (diff)
downloadcore-513ae531ccd3080fa1089d2d9d7dc829e96267cf.tar.gz
core-513ae531ccd3080fa1089d2d9d7dc829e96267cf.zip
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.cxx2
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: