diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-03-22 20:48:01 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-03-23 16:33:29 +0100 |
commit | 1f7adcdfa2d2c0838254f6823e2f3ba0d6c92746 (patch) | |
tree | 6158dc007b157fbb63f6dc7cc6e5e370552eb294 /svx/source/customshapes/EnhancedCustomShape2d.cxx | |
parent | 2a7617653fb3d31e44e5cbcf8daf4b4c2a24e2c8 (diff) |
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@redhat.com>
Diffstat (limited to 'svx/source/customshapes/EnhancedCustomShape2d.cxx')
-rw-r--r-- | svx/source/customshapes/EnhancedCustomShape2d.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
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; |