diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-10-02 08:52:17 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-10-02 11:57:41 +0200 |
commit | d1e98b13079b11c202222808d1970d2827d1ecd7 (patch) | |
tree | ca0bfd14e47491c41673e7c22ed33311bc9cebfc /oox/source | |
parent | eac4526f07bdf3cce70d84fb6e3d7896e7cae61b (diff) |
cid#1467665 Division or modulo by float zero
Change-Id: I34446609f25b5fdf2c6c537a6a0f6085c707b0c6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103816
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'oox/source')
-rw-r--r-- | oox/source/drawingml/diagram/diagramlayoutatoms.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx index 156b15423a35..d1280406fedb 100644 --- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx +++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx @@ -252,7 +252,8 @@ void SnakeAlg::layoutShapeChildren(const AlgAtom::ParamMap& rMap, const ShapePtr nRowWidth += aShapeWidths[i]; } - if ((fShapeHeight * nRow) / nRowWidth >= fAspectRatio) + double fTotalShapesHeight = fShapeHeight * nRow; + if (nRowWidth && fTotalShapesHeight / nRowWidth >= fAspectRatio) { if (nRowWidth > nMaxRowWidth) { |