Kaydet (Commit) f45c52d0 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1267635 Logically dead code

Change-Id: If2f26bd6414622889fc15d3806851e497882558c
üst 23393015
...@@ -762,8 +762,7 @@ bool SwDoc::GotoOutline( SwPosition& rPos, const OUString& rName ) const ...@@ -762,8 +762,7 @@ bool SwDoc::GotoOutline( SwPosition& rPos, const OUString& rName ) const
static void lcl_ChgNumRule( SwDoc& rDoc, const SwNumRule& rRule ) static void lcl_ChgNumRule( SwDoc& rDoc, const SwNumRule& rRule )
{ {
SwNumRule* pOld = rDoc.FindNumRulePtr( rRule.GetName() ); SwNumRule* pOld = rDoc.FindNumRulePtr( rRule.GetName() );
assert(pOld); //we cannot proceed without the old NumRule if (!pOld) //we cannot proceed without the old NumRule
if (!pOld)
return; return;
sal_uInt16 nChgFmtLevel = 0; sal_uInt16 nChgFmtLevel = 0;
...@@ -855,12 +854,12 @@ void SwDoc::SetNumRule( const SwPaM& rPam, ...@@ -855,12 +854,12 @@ void SwDoc::SetNumRule( const SwPaM& rPam,
else if ( rRule != *pNewOrChangedNumRule ) else if ( rRule != *pNewOrChangedNumRule )
{ {
// change existing numbering rule // change existing numbering rule
if( pUndo != NULL ) if (pUndo)
{ {
pUndo->SaveOldNumRule( *pNewOrChangedNumRule ); pUndo->SaveOldNumRule( *pNewOrChangedNumRule );
} }
::lcl_ChgNumRule( *this, rRule ); ::lcl_ChgNumRule( *this, rRule );
if( pUndo != NULL ) if (pUndo)
{ {
pUndo->SetLRSpaceEndPos(); pUndo->SetLRSpaceEndPos();
} }
...@@ -1060,9 +1059,10 @@ void SwDoc::ChgNumRuleFmts( const SwNumRule& rRule ) ...@@ -1060,9 +1059,10 @@ void SwDoc::ChgNumRuleFmts( const SwNumRule& rRule )
GetIDocumentUndoRedo().AppendUndo( pUndo ); GetIDocumentUndoRedo().AppendUndo( pUndo );
} }
::lcl_ChgNumRule( *this, rRule ); ::lcl_ChgNumRule( *this, rRule );
if (pUndo)
if( pUndo ) {
pUndo->SetLRSpaceEndPos(); pUndo->SetLRSpaceEndPos();
}
getIDocumentState().SetModified(); getIDocumentState().SetModified();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment