[Libreoffice-commits] core.git: filter/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Sun Sep 19 19:45:48 UTC 2021
filter/source/graphicfilter/icgm/class4.cxx | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
New commits:
commit 0e74bba03fb99e276637335f0b3320419a4fe1c1
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun Sep 19 19:36:25 2021 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Sep 19 21:45:14 2021 +0200
ofz: check radius arg
Change-Id: Ife72cf379e60c96046205746c62a35ead7f09b16
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122326
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/filter/source/graphicfilter/icgm/class4.cxx b/filter/source/graphicfilter/icgm/class4.cxx
index 1265ef70367c..91bda04906ac 100644
--- a/filter/source/graphicfilter/icgm/class4.cxx
+++ b/filter/source/graphicfilter/icgm/class4.cxx
@@ -426,18 +426,18 @@ void CGM::ImplDoClass4()
double fTop = aCenterPoint.Y - fRadius;
double fRight = fLeft + (2 * fRadius);
double fBottom = fTop + (2 * fRadius);
- bUseless = useless(fLeft) || useless(fTop) || useless(fRight) || useless(fBottom);
+ bUseless = useless(fLeft) || useless(fTop) || useless(2 * fRadius) || useless(fRight) || useless(fBottom);
if (!bUseless)
{
- double fWidth = fLeft + fRight;
- bUseless = !o3tl::convertsToAtLeast(fWidth, std::numeric_limits<tools::Long>::min()) ||
- !o3tl::convertsToAtMost(fWidth, std::numeric_limits<tools::Long>::max());
+ double fCenterCalc = fLeft + fRight;
+ bUseless = !o3tl::convertsToAtLeast(fCenterCalc, std::numeric_limits<tools::Long>::min()) ||
+ !o3tl::convertsToAtMost(fCenterCalc, std::numeric_limits<tools::Long>::max());
}
if (!bUseless)
{
- double fHeight = fTop + fBottom;
- bUseless = !o3tl::convertsToAtLeast(fHeight, std::numeric_limits<tools::Long>::min()) ||
- !o3tl::convertsToAtMost(fHeight, std::numeric_limits<tools::Long>::max());
+ double fCenterCalc = fTop + fBottom;
+ bUseless = !o3tl::convertsToAtLeast(fCenterCalc, std::numeric_limits<tools::Long>::min()) ||
+ !o3tl::convertsToAtMost(fCenterCalc, std::numeric_limits<tools::Long>::max());
}
if (!bUseless)
{
@@ -567,18 +567,18 @@ void CGM::ImplDoClass4()
double fTop = aCenter.Y - aRadius.X;
double fRight = fLeft + (2 * aRadius.X);
double fBottom = fTop + (2 * aRadius.X);
- bUseless = useless(fLeft) || useless(fTop) || useless(fRight) || useless(fBottom);
+ bUseless = useless(fLeft) || useless(fTop) || useless(2 * aRadius.X) || useless(fRight) || useless(fBottom);
if (!bUseless)
{
- double fWidth = fLeft + fRight;
- bUseless = !o3tl::convertsToAtLeast(fWidth, std::numeric_limits<tools::Long>::min()) ||
- !o3tl::convertsToAtMost(fWidth, std::numeric_limits<tools::Long>::max());
+ double fCenterCalc = fLeft + fRight;
+ bUseless = !o3tl::convertsToAtLeast(fCenterCalc, std::numeric_limits<tools::Long>::min()) ||
+ !o3tl::convertsToAtMost(fCenterCalc, std::numeric_limits<tools::Long>::max());
}
if (!bUseless)
{
- double fHeight = fTop + fBottom;
- bUseless = !o3tl::convertsToAtLeast(fHeight, std::numeric_limits<tools::Long>::min()) ||
- !o3tl::convertsToAtMost(fHeight, std::numeric_limits<tools::Long>::max());
+ double fCenterCalc = fTop + fBottom;
+ bUseless = !o3tl::convertsToAtLeast(fCenterCalc, std::numeric_limits<tools::Long>::min()) ||
+ !o3tl::convertsToAtMost(fCenterCalc, std::numeric_limits<tools::Long>::max());
}
if (!bUseless)
{
More information about the Libreoffice-commits
mailing list