summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2023-03-01 17:33:46 +0000
committerCaolán McNamara <caolanm@redhat.com>2023-03-01 19:55:26 +0000
commit2e2578732588d3f4b9dd10fef91ff3087836f11d (patch)
tree823ef425c3c51eff81604c379ba3793d249e6f2e /oox
parent9a0710bb05b6b9bc0873dbc2d2dc5eb40ce02eba (diff)
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>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/export/drawingml.cxx2
1 files changed, 1 insertions, 1 deletions
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<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;