[Libreoffice-commits] core.git: oox/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Fri Oct 2 09:58:23 UTC 2020


 oox/source/drawingml/diagram/diagramlayoutatoms.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit d1e98b13079b11c202222808d1970d2827d1ecd7
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Oct 2 08:52:17 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Oct 2 11:57:41 2020 +0200

    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 at redhat.com>

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)
                 {


More information about the Libreoffice-commits mailing list