From 2e2578732588d3f4b9dd10fef91ff3087836f11d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Wed, 1 Mar 2023 17:33:46 +0000 Subject: [PATCH] cid#1521560 Division or modulo by float zero MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Caolán McNamara --- oox/source/export/drawingml.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index d3fb8a3daf97..26858cac40cf 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -1970,7 +1970,7 @@ void DrawingML::WriteXGraphicCustomPosition(uno::Reference } 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;