diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-09-23 09:04:25 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-09-23 10:17:30 +0100 |
commit | 5840a28fd43146e1d76beacdedacd48107e5f8c6 (patch) | |
tree | 78363950068e0d527e377b61e4ffb724b4283aab /sw | |
parent | 78cc97405be83aaea6bf47102c2465233bbcd25f (diff) |
coverity#1373351 make SetTabRows the same as SetTabCols
Change-Id: I9cfe2f3ec96ee72ff2e7657661a003086d301db6
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/docnode/ndtbl.cxx | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index eb15585a3989..e0518927ab0c 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -2767,11 +2767,17 @@ void SwDoc::SetTabCols( const SwTabCols &rNew, bool bCurRowOnly, void SwDoc::SetTabRows( const SwTabCols &rNew, bool bCurColOnly, const SwCellFrame* pBoxFrame ) { - SwTabFrame *pTab; - - OSL_ENSURE( pBoxFrame, "SetTabRows called without pBoxFrame" ); + SwTabFrame *pTab = nullptr; - pTab = const_cast<SwFrame*>(static_cast<SwFrame const *>(pBoxFrame))->ImplFindTabFrame(); + if( pBoxFrame ) + { + pTab = const_cast<SwFrame*>(static_cast<SwFrame const *>(pBoxFrame))->ImplFindTabFrame(); + } + else + { + OSL_ENSURE( false, "must specify pBoxFrame" ); + return ; + } // If the Table is still using relative values (USHRT_MAX) // we need to switch to absolute ones. |