summaryrefslogtreecommitdiff
path: root/sw/source/core/docnode
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-08-31 21:26:03 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-09-01 10:40:14 +0100
commit1d07d8fb5ee361be5e15c753ddbde2f26fefe393 (patch)
treed4bd93decb1fecc621d5ce7373b1be6197f7aa5c /sw/source/core/docnode
parent671ac3a9221598febdc6304fceabbb2ade86f41e (diff)
coverity#1372376 assert can't have Division or modulo by zero
Change-Id: I0b7615bb5a29e1a275647670351f643784467885
Diffstat (limited to 'sw/source/core/docnode')
-rw-r--r--sw/source/core/docnode/ndtbl.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index 531066291adf..9ebeb535798d 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -336,8 +336,8 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTableOpts,
bool bCalledFromShell,
bool bNewModel )
{
- OSL_ENSURE( nRows, "Table without line?" );
- OSL_ENSURE( nCols, "Table without rows?" );
+ assert(nRows && "Table without line?");
+ assert(nCols && "Table without rows?");
{
// Do not copy into Footnotes!
@@ -428,7 +428,7 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTableOpts,
}
nWidth = nLastPos - nSttPos;
}
- else if( nCols )
+ else
{
nWidth /= nCols;
nWidth *= nCols; // to avoid rounding problems