cid#1521560 Division or modulo by float zero

and

cid#1521558 Division or modulo by float zero

Change-Id: I42a82f294950ea22a2557f76d4589b06b50d9d46
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148071
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
Caolán McNamara 2023-03-01 17:33:46 +00:00
parent 9a0710bb05
commit 2e25787325

View file

@ -1970,7 +1970,7 @@ void DrawingML::WriteXGraphicCustomPosition(uno::Reference<beans::XPropertySet>
}
sal_Int32 nL = 0, nT = 0, nR = 0, nB = 0;
if (GetProperty(rXPropSet, "FillBitmapRectanglePoint"))
if (GetProperty(rXPropSet, "FillBitmapRectanglePoint") && rSize.Width != 0 && rSize.Height != 0)
{
sal_Int32 nWidth = (1 - (nSizeX / rSize.Width)) * 100000;
sal_Int32 nHeight = (1 - (nSizeY / rSize.Height)) * 100000;