From bc2552fa3197617ec909e90996076ea45a27ce5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Sun, 23 Jul 2017 21:39:38 +0100 Subject: [PATCH] coverity#1415611 Result is not floating-point Change-Id: Icaeeb835e9a3c8ab6917fe15297ad884db792299 --- oox/source/drawingml/diagram/diagramlayoutatoms.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx index 80f99673243b..d1c172862541 100644 --- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx +++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx @@ -261,7 +261,9 @@ void AlgAtom::layoutShape( const ShapePtr& rShape, for ( ; nColgetSize().Height / nRow) / (rShape->getSize().Width / nCol) >= fAspectRatio) + const double fShapeHeight = rShape->getSize().Height; + const double fShapeWidth = rShape->getSize().Width; + if ((fShapeHeight / nRow) / (fShapeWidth / nCol) >= fAspectRatio) break; } SAL_INFO("oox.drawingml", "Snake layout grid: " << nCol << "x" << nRow);