[Libreoffice-commits] core.git: vcl/source
Noel (via logerrit)
logerrit at kemper.freedesktop.org
Wed Oct 21 18:35:39 UTC 2020
vcl/source/gdi/TypeSerializer.cxx | 5 +++++
1 file changed, 5 insertions(+)
New commits:
commit 0e8e352cc78af9b8cee27a77b0ac8e2e8f98f8cc
Author: Noel <noelgrandin at gmail.com>
AuthorDate: Wed Oct 21 15:44:32 2020 +0200
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Wed Oct 21 20:35:01 2020 +0200
clamp angle to valid value
fallout from
commit 0fb58a1ff168ae122e9c8993a3136658e3b0e3f0
new tools::Degree10 strong typedef
which caused failures in CppunitTest_vcl_filters_test
Change-Id: Ief60aae62935137330118b1a8d8dd0c428430430
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104631
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/vcl/source/gdi/TypeSerializer.cxx b/vcl/source/gdi/TypeSerializer.cxx
index 0b1b53372030..bbfdbf430160 100644
--- a/vcl/source/gdi/TypeSerializer.cxx
+++ b/vcl/source/gdi/TypeSerializer.cxx
@@ -58,6 +58,11 @@ void TypeSerializer::readGradient(Gradient& rGradient)
rGradient.SetStyle(static_cast<GradientStyle>(nStyle));
rGradient.SetStartColor(aStartColor);
rGradient.SetEndColor(aEndColor);
+ if (nAngle > 3600)
+ {
+ SAL_WARN("vcl", "angle out of range " << nAngle);
+ nAngle = 0;
+ }
rGradient.SetAngle(Degree10(nAngle));
rGradient.SetBorder(nBorder);
rGradient.SetOfsX(nOffsetX);
More information about the Libreoffice-commits
mailing list