sd/source/filter/eppt/epptso.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
New commits: commit 6a91d66a9339a0479b832dcabcbeee63a71a0d2a Author: Caolán McNamara <[email protected]> AuthorDate: Mon Nov 3 08:34:32 2025 +0000 Commit: Caolán McNamara <[email protected]> CommitDate: Fri Nov 7 17:36:28 2025 +0100 cid#1660467 related Division or modulo by float zero Change-Id: Ie5348068a7d56fd81abf98c8449af251f9fba905 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193569 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx index 2ed414db9bdb..8676a3f9aee8 100644 --- a/sd/source/filter/eppt/epptso.cxx +++ b/sd/source/filter/eppt/epptso.cxx @@ -93,7 +93,9 @@ sal_uInt16 PPTExBulletProvider::GetId(Graphic const & rGraphic, Size& rGraphicSi Size aPrefSize( rGraphic.GetPrefSize() ); Bitmap aBmp( rGraphic.GetBitmap() ); - if ( rGraphicSize.Width() && rGraphicSize.Height() ) + const auto nGraphicWidth = rGraphicSize.Width(); + const auto nGraphicHeight = rGraphicSize.Height(); + if (nGraphicWidth && nGraphicHeight) { if (aPrefSize.IsEmpty()) { @@ -102,7 +104,7 @@ sal_uInt16 PPTExBulletProvider::GetId(Graphic const & rGraphic, Size& rGraphicSi else { double fQ1 = static_cast<double>(aPrefSize.Width()) / static_cast<double>(aPrefSize.Height()); - double fQ2 = static_cast<double>(rGraphicSize.Width()) / static_cast<double>(rGraphicSize.Height()); + double fQ2 = static_cast<double>(nGraphicWidth) / static_cast<double>(nGraphicHeight); double fXScale = 1; double fYScale = 1; @@ -114,8 +116,8 @@ sal_uInt16 PPTExBulletProvider::GetId(Graphic const & rGraphic, Size& rGraphicSi if ( ( fXScale != 1.0 ) || ( fYScale != 1.0 ) ) { aBmp.Scale( fXScale, fYScale ); - rGraphicSize = Size( static_cast<sal_Int32>(static_cast<double>(rGraphicSize.Width()) / fXScale + 0.5 ), - static_cast<sal_Int32>(static_cast<double>(rGraphicSize.Height()) / fYScale + 0.5 ) ); + rGraphicSize = Size( static_cast<sal_Int32>(static_cast<double>(nGraphicWidth) / fXScale + 0.5 ), + static_cast<sal_Int32>(static_cast<double>(nGraphicHeight) / fYScale + 0.5 ) ); aMappedGraphic = Graphic( aBmp ); aGraphicObject.SetGraphic(aMappedGraphic);
