[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - svgio/source
Xisco Fauli
anistenis at gmail.com
Fri Jul 22 10:42:20 UTC 2016
svgio/source/svgreader/svgstyleattributes.cxx | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
New commits:
commit 4bb2f539b1d6e806ac992d142d5af0e44958a798
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>
(cherry picked from commit ecb34112cc4c768fd2f57499151920fa7798776f)
Reviewed-on: https://gerrit.libreoffice.org/27346
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx
index 8be96e6..1e8810b 100644
--- a/svgio/source/svgreader/svgstyleattributes.cxx
+++ b/svgio/source/svgreader/svgstyleattributes.cxx
@@ -1434,14 +1434,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