diff options
author | Joren De Cuyper <jorendc@libreoffice.org> | 2014-07-24 23:08:02 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2014-07-25 15:17:02 +0000 |
commit | 0198b3a9451700d875c1b389d30e1a0cc9ab4b47 (patch) | |
tree | c0811c690dae4a36f746d4409ddf31b561df6a17 /svgio | |
parent | 0497864bd4f603605997938d504ef9598623e713 (diff) |
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@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'svgio')
-rw-r--r-- | svgio/source/svgreader/svgstyleattributes.cxx | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx index cece3967efdc..4d9448a5491f 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; } |