[Libreoffice-commits] core.git: svx/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Tue Mar 23 15:34:27 UTC 2021
svx/source/customshapes/EnhancedCustomShape2d.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 1f7adcdfa2d2c0838254f6823e2f3ba0d6c92746
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Mar 22 20:48:01 2021 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Mar 23 16:33:29 2021 +0100
ofz: Integer-overflow
convert to double earlier
Change-Id: I6d6a1bf3a09161772eb11a5ac260dc0cac2b6e0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112944
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index 32c458df7848..c33031a86605 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -832,8 +832,8 @@ double EnhancedCustomShape2d::GetEnumFunc( const ExpressionFunct eFunc ) const
case ExpressionFunct::EnumPi : fRet = F_PI; break;
case ExpressionFunct::EnumLeft : fRet = static_cast<double>(nCoordLeft); break;
case ExpressionFunct::EnumTop : fRet = static_cast<double>(nCoordTop); break;
- case ExpressionFunct::EnumRight : fRet = static_cast<double>(nCoordLeft + nCoordWidth) * fXRatio; break;
- case ExpressionFunct::EnumBottom : fRet = static_cast<double>(nCoordTop + nCoordHeight) * fYRatio; break;
+ case ExpressionFunct::EnumRight : fRet = (static_cast<double>(nCoordLeft) + static_cast<double>(nCoordWidth)) * fXRatio; break;
+ case ExpressionFunct::EnumBottom : fRet = (static_cast<double>(nCoordTop) + static_cast<double>(nCoordHeight)) * fYRatio; break;
case ExpressionFunct::EnumXStretch : fRet = nXRef; break;
case ExpressionFunct::EnumYStretch : fRet = nYRef; break;
case ExpressionFunct::EnumHasStroke : fRet = bStroked ? 1.0 : 0.0; break;
More information about the Libreoffice-commits
mailing list