coverity#735663 Division or modulo by zero

Change-Id: I69410ebe3dcded9951bfa9e83844644147f4416a
This commit is contained in:
Caolán McNamara
2014-10-29 09:53:44 +00:00
parent 6fa813da67
commit c090ecc4aa

View File

@@ -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;