diff options
author | Michael Stahl <mst@openoffice.org> | 2010-11-25 14:31:10 +0100 |
---|---|---|
committer | Michael Stahl <mst@openoffice.org> | 2010-11-25 14:31:10 +0100 |
commit | 56d8fb7501a4834779529cd15b02efa61ca24ff4 (patch) | |
tree | 4ab5580c4d03992e5a90bcaed590d42a86bed8dd /sw/source/core/edit/edundo.cxx | |
parent | 0fcdedd36417d76441081b53814d40772e03e841 (diff) |
unodapi: #i114888#: sw: clean up some more, using sw::UndoGuard.
note: some of this relies on ClearRedo() not checking DoesUndo().
Diffstat (limited to 'sw/source/core/edit/edundo.cxx')
-rw-r--r-- | sw/source/core/edit/edundo.cxx | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/sw/source/core/edit/edundo.cxx b/sw/source/core/edit/edundo.cxx index 71dfaf4c0da3..832cc2dbaa19 100644 --- a/sw/source/core/edit/edundo.cxx +++ b/sw/source/core/edit/edundo.cxx @@ -54,10 +54,9 @@ BOOL SwEditShell::Undo( SwUndoId nUndoId, USHORT nCnt ) SET_CURR_SHELL( this ); // #105332# current undo state was not saved + ::sw::UndoGuard const undoGuard(GetDoc()->GetIDocumentUndoRedo()); BOOL bRet = FALSE; - bool const bSaveDoesUndo = GetDoc()->GetIDocumentUndoRedo().DoesUndo(); - GetDoc()->GetIDocumentUndoRedo().DoUndo(false); StartAllAction(); { // eigentlich muesste ja nur der aktuelle Cursor berarbeitet @@ -137,8 +136,6 @@ BOOL SwEditShell::Undo( SwUndoId nUndoId, USHORT nCnt ) } EndAllAction(); - // #105332# undo state was not restored but set to FALSE everytime - GetDoc()->GetIDocumentUndoRedo().DoUndo(bSaveDoesUndo); return bRet; } @@ -149,9 +146,8 @@ USHORT SwEditShell::Redo( USHORT nCnt ) BOOL bRet = FALSE; // #105332# undo state was not saved - bool const bSaveDoesUndo = GetDoc()->GetIDocumentUndoRedo().DoesUndo(); + ::sw::UndoGuard const undoGuard(GetDoc()->GetIDocumentUndoRedo()); - GetDoc()->GetIDocumentUndoRedo().DoUndo(false); StartAllAction(); { @@ -225,8 +221,6 @@ USHORT SwEditShell::Redo( USHORT nCnt ) EndAllAction(); - // #105332# undo state was not restored but set FALSE everytime - GetDoc()->GetIDocumentUndoRedo().DoUndo(bSaveDoesUndo); return bRet; } |