diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-02-06 13:03:37 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-02-06 16:45:14 +0000 |
commit | f45c52d0c8fc326b4cb12e1b8f581a60991079ba (patch) | |
tree | e0e0e3e1227833f9668aace287b1c2ffa8bc07dd /sw | |
parent | 233930159fa9bd18af81b9c5c358123d790cb5e9 (diff) |
coverity#1267635 Logically dead code
Change-Id: If2f26bd6414622889fc15d3806851e497882558c
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/doc/docnum.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx index cc1efe0ac6fd..1618e0b25261 100644 --- a/sw/source/core/doc/docnum.cxx +++ b/sw/source/core/doc/docnum.cxx @@ -762,8 +762,7 @@ bool SwDoc::GotoOutline( SwPosition& rPos, const OUString& rName ) const static void lcl_ChgNumRule( SwDoc& rDoc, const SwNumRule& rRule ) { SwNumRule* pOld = rDoc.FindNumRulePtr( rRule.GetName() ); - assert(pOld); //we cannot proceed without the old NumRule - if (!pOld) + if (!pOld) //we cannot proceed without the old NumRule return; sal_uInt16 nChgFmtLevel = 0; @@ -855,12 +854,12 @@ void SwDoc::SetNumRule( const SwPaM& rPam, else if ( rRule != *pNewOrChangedNumRule ) { // change existing numbering rule - if( pUndo != NULL ) + if (pUndo) { pUndo->SaveOldNumRule( *pNewOrChangedNumRule ); } ::lcl_ChgNumRule( *this, rRule ); - if( pUndo != NULL ) + if (pUndo) { pUndo->SetLRSpaceEndPos(); } @@ -1060,9 +1059,10 @@ void SwDoc::ChgNumRuleFmts( const SwNumRule& rRule ) GetIDocumentUndoRedo().AppendUndo( pUndo ); } ::lcl_ChgNumRule( *this, rRule ); - - if( pUndo ) + if (pUndo) + { pUndo->SetLRSpaceEndPos(); + } getIDocumentState().SetModified(); } |