[Libreoffice-commits] core.git: svgio/source

Joren De Cuyper jorendc at libreoffice.org
Fri Jul 25 08:17:28 PDT 2014


 svgio/source/svgreader/svgstyleattributes.cxx |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit 0198b3a9451700d875c1b389d30e1a0cc9ab4b47
Author: Joren De Cuyper <jorendc at libreoffice.org>
Date:   Thu Jul 24 23:08:02 2014 +0200

    fdo#48065 SVG: correctly clamp fill-opacity
    
    See W3 test http://www.w3.org/Graphics/SVG/Test/20061213/htmlObjectHarness/full-painting-fill-05-b.html
    which is also attached to the bug document.
    This fixes the behavior of the insert > image > from file behavior.
    The open behavior is already fixed by 79a6e40e6f19a896dbc25640deb3d4507eddad95
    
    Change-Id: I9e3a3755bac25ca596d418c229a78cb23e07d3f3
    Reviewed-on: https://gerrit.libreoffice.org/10522
    Reviewed-by: David Tardon <dtardon at redhat.com>
    Tested-by: David Tardon <dtardon at redhat.com>

diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx
index cece396..4d9448a 100644
--- a/svgio/source/svgreader/svgstyleattributes.cxx
+++ b/svgio/source/svgreader/svgstyleattributes.cxx
@@ -1246,10 +1246,7 @@ namespace svgio
 
                     if(readSingleNumber(aContent, aNum))
                     {
-                        if(aNum.isPositive())
-                        {
-                            setFillOpacity(aNum);
-                        }
+                        setFillOpacity(SvgNumber(basegfx::clamp(aNum.getNumber(), 0.0, 1.0), aNum.getUnit(), aNum.isSet()));
                     }
                     break;
                 }


More information about the Libreoffice-commits mailing list