summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorIvan Timofeev <timofeev.i.s@gmail.com>2012-06-28 13:12:56 +0400
committerIvan Timofeev <timofeev.i.s@gmail.com>2012-06-28 14:05:32 +0400
commitaf18adbad7de00a7b0b1eda659ec6552a760556d (patch)
treeaf58fb2ee3e6d34664b7cac2e0b96d55c2c06b36 /svl
parente5f690b3711b61c05671d46d19439dd1100f4bff (diff)
i#119400 repair broken undo
(cherry picked from commit 1eed4c837828c00dff4ef0b2cf29b1e2962e912d) Change-Id: I36d74fe1555bd436f93a5fa595e7da05bbd37493 Signed-off-by: Michael Meeks <michael.meeks@suse.com>
Diffstat (limited to 'svl')
-rw-r--r--svl/source/undo/undo.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/svl/source/undo/undo.cxx b/svl/source/undo/undo.cxx
index b3bd44099631..e3b8cd1812cb 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