[Libreoffice-commits] .: drawinglayer/source

Thorsten Behrens thorsten at kemper.freedesktop.org
Mon Apr 16 06:54:34 PDT 2012


 drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 983c27402e151126c5bef6623eeb07f333456243
Author: Thorsten Behrens <tbehrens at suse.com>
Date:   Sun Apr 15 03:38:40 2012 +0200

    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.

diff --git a/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx b/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx
index 25afcfe..7eb55ab 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:


More information about the Libreoffice-commits mailing list