diff options
author | Ivan Timofeev <timofeev.i.s@gmail.com> | 2012-06-28 13:12:56 +0400 |
---|---|---|
committer | Ivan Timofeev <timofeev.i.s@gmail.com> | 2012-06-28 13:52:02 +0400 |
commit | 1eed4c837828c00dff4ef0b2cf29b1e2962e912d (patch) | |
tree | 1c427e801f302f936c78f734a82bcb87293011d2 /svl/source/undo | |
parent | b4fae0294601ac8e72f350ab9f7061532acd4210 (diff) |
i#119400 repair broken undo
Change-Id: I36d74fe1555bd436f93a5fa595e7da05bbd37493
Diffstat (limited to 'svl/source/undo')
-rw-r--r-- | svl/source/undo/undo.cxx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/svl/source/undo/undo.cxx b/svl/source/undo/undo.cxx index e27bf00e5ba4..e9166758cd17 100644 --- a/svl/source/undo/undo.cxx +++ b/svl/source/undo/undo.cxx @@ -635,10 +635,14 @@ bool SfxUndoManager::ImplAddUndoAction_NoNotify( SfxUndoAction *pAction, bool bT // merge, if required SfxUndoAction* pMergeWithAction = m_pData->pActUndoArray->nCurUndoAction ? m_pData->pActUndoArray->aUndoActions[m_pData->pActUndoArray->nCurUndoAction-1].pAction : NULL; - if ( bTryMerge && ( !pMergeWithAction || !pMergeWithAction->Merge( pAction ) ) ) + if ( bTryMerge && pMergeWithAction ) { - i_guard.markForDeletion( pAction ); - return false; + bool bMerged = pMergeWithAction->Merge( pAction ); + if ( bMerged ) + { + i_guard.markForDeletion( pAction ); + return false; + } } // clear redo stack, if requested |