From c090ecc4aa43004ef6da8dce3ba1e00cc778be4d Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 29 Oct 2014 09:53:44 +0000 Subject: coverity#735663 Division or modulo by zero Change-Id: I69410ebe3dcded9951bfa9e83844644147f4416a --- xmloff/source/draw/sdxmlexp.cxx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'xmloff') diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx index 607913500266..8840494c0025 100644 --- a/xmloff/source/draw/sdxmlexp.cxx +++ b/xmloff/source/draw/sdxmlexp.cxx @@ -1085,6 +1085,9 @@ void SdXMLExport::ImpWriteAutoLayoutInfos() nRowCnt = nZwi; } + if (nColCnt == 0 || nRowCnt == 0) + break; + aPartSize.Width() = (aPartSize.Width() - ((nColCnt - 1) * nGapX)) / nColCnt; aPartSize.Height() = (aPartSize.Height() - ((nRowCnt - 1) * nGapY)) / nRowCnt; -- cgit