[Libreoffice-commits] core.git: svgio/source
Xisco Fauli
anistenis at gmail.com
Wed Jul 20 08:54:03 UTC 2016
svgio/source/svgreader/svgstyleattributes.cxx | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
New commits:
commit ecb34112cc4c768fd2f57499151920fa7798776f
Author: Xisco Fauli <anistenis at gmail.com>
Date: Tue Jul 19 23:25:14 2016 +0200
SVGIO: use clamp on strokeOpacity in case it's negative
testcase: painting-stroke-08-t.svg
Change-Id: Ia09a4581e5189cbb88aca4391474ada89e7af042
testcase: painting-stroke-08-t.svg
Reviewed-on: https://gerrit.libreoffice.org/27326
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Xisco FaulĂ <anistenis at gmail.com>
diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx
index 993521c..3366ce0 100644
--- a/svgio/source/svgreader/svgstyleattributes.cxx
+++ b/svgio/source/svgreader/svgstyleattributes.cxx
@@ -1455,14 +1455,12 @@ namespace svgio
}
case SVGTokenStrokeOpacity:
{
+
SvgNumber aNum;
if(readSingleNumber(aContent, aNum))
{
- if(aNum.isPositive())
- {
- setStrokeOpacity(aNum);
- }
+ setStrokeOpacity(SvgNumber(basegfx::clamp(aNum.getNumber(), 0.0, 1.0), aNum.getUnit(), aNum.isSet()));
}
break;
}
More information about the Libreoffice-commits
mailing list