summaryrefslogtreecommitdiff
path: root/svx/source/table/tablemodel.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-07-01 15:54:55 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-07-01 16:43:06 +0100
commit8a9bc476df2457870c2b41812d2828a81f67c783 (patch)
treef79af59d19c3b67ef2914a5f4aab6cfe275cb427 /svx/source/table/tablemodel.cxx
parenta7e1ffc248bed431693c6d50c02e7c936c67f360 (diff)
coverity#735883 Unchecked dynamic_cast
Change-Id: I4dec526d78dfaa1d894ab1be205e58e1224fbf72
Diffstat (limited to 'svx/source/table/tablemodel.cxx')
-rw-r--r--svx/source/table/tablemodel.cxx19
1 files changed, 6 insertions, 13 deletions
diff --git a/svx/source/table/tablemodel.cxx b/svx/source/table/tablemodel.cxx
index d40c3ba99f6d..71935c397f02 100644
--- a/svx/source/table/tablemodel.cxx
+++ b/svx/source/table/tablemodel.cxx
@@ -1124,12 +1124,12 @@ void TableModel::merge( sal_Int32 nCol, sal_Int32 nRow, sal_Int32 nColSpan, sal_
// merge first cell
CellRef xOriginCell( dynamic_cast< Cell* >( getCellByPosition( nCol, nRow ).get() ) );
- if( xOriginCell.is() )
- {
- if( bUndo )
- xOriginCell->AddUndo();
- xOriginCell->merge( nColSpan, nRowSpan );
- }
+ if(!xOriginCell.is())
+ return;
+
+ if( bUndo )
+ xOriginCell->AddUndo();
+ xOriginCell->merge( nColSpan, nRowSpan );
sal_Int32 nTempCol = nCol + 1;
@@ -1151,9 +1151,6 @@ void TableModel::merge( sal_Int32 nCol, sal_Int32 nRow, sal_Int32 nColSpan, sal_
}
}
-
-
-
void TableModel::updateRows()
{
sal_Int32 nRow = 0;
@@ -1164,8 +1161,6 @@ void TableModel::updateRows()
}
}
-
-
void TableModel::updateColumns()
{
sal_Int32 nColumn = 0;
@@ -1176,8 +1171,6 @@ void TableModel::updateColumns()
}
}
-
-
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */