[Libreoffice-commits] .: Branch 'libreoffice-3-5' - drawinglayer/source

Petr Mladek pmladek at kemper.freedesktop.org
Tue Apr 17 03:12:16 PDT 2012


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

New commits:
commit 513ae531ccd3080fa1089d2d9d7dc829e96267cf
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.
    
    Signed-off-by: Petr Mladek <pmladek at suse.cz>

diff --git a/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx b/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx
index b2f1bb5..a16783d 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