diff options
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/drawingml/diagram/diagramlayoutatoms.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
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 ( ; nCol<nCount; nCol++) { nRow = (nCount+nCol-1) / nCol; - if ((rShape->getSize().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); |