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;