summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-10-29 09:53:44 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-10-29 10:40:10 +0000
commitc090ecc4aa43004ef6da8dce3ba1e00cc778be4d (patch)
tree52aad6e7fb2e9526272ad24a17cabf9fe53e46cf /xmloff
parent6fa813da677e303ca61074a2cda2c0e103fe5469 (diff)
coverity#735663 Division or modulo by zero
Change-Id: I69410ebe3dcded9951bfa9e83844644147f4416a
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/draw/sdxmlexp.cxx3
1 files changed, 3 insertions, 0 deletions
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;