diff options
author | Henning Brinkmann <hbrinkm@openoffice.org> | 2002-11-22 14:05:28 +0000 |
---|---|---|
committer | Henning Brinkmann <hbrinkm@openoffice.org> | 2002-11-22 14:05:28 +0000 |
commit | e273db5d904bc980a9543053b47d673775a79a3d (patch) | |
tree | 4a406a70f15f178b69b6d9c9d96cccf9ff766a18 /sw/source/core/edit/edundo.cxx | |
parent | 53cab181dcd24d965b790831e4181e761bb7300f (diff) |
#105332# SwEditShell::Undo/Redo save/restore undo state
Diffstat (limited to 'sw/source/core/edit/edundo.cxx')
-rw-r--r-- | sw/source/core/edit/edundo.cxx | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/sw/source/core/edit/edundo.cxx b/sw/source/core/edit/edundo.cxx index d8965fc787c5..dddac03abf7d 100644 --- a/sw/source/core/edit/edundo.cxx +++ b/sw/source/core/edit/edundo.cxx @@ -2,9 +2,9 @@ * * $RCSfile: edundo.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: tl $ $Date: 2001-04-09 07:21:25 $ + * last change: $Author: hbrinkm $ $Date: 2002-11-22 15:05:28 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -105,7 +105,9 @@ BOOL SwEditShell::Undo( USHORT nUndoId, USHORT nCnt ) { SET_CURR_SHELL( this ); + // #105332# current undo state was not saved BOOL bRet = FALSE; + BOOL bSaveDoesUndo = GetDoc()->DoesUndo(); GetDoc()->DoUndo( FALSE ); StartAllAction(); @@ -192,7 +194,9 @@ BOOL SwEditShell::Undo( USHORT nUndoId, USHORT nCnt ) SaveTblBoxCntnt(); } EndAllAction(); - GetDoc()->DoUndo( TRUE ); + + // #105332# undo state was not restored but set to FALSE everytime + GetDoc()->DoUndo( bSaveDoesUndo ); return bRet; } @@ -202,6 +206,10 @@ USHORT SwEditShell::Redo( USHORT nCnt ) SET_CURR_SHELL( this ); BOOL bRet = FALSE; + + // #105332# undo state was not saved + BOOL bSaveDoesUndo = GetDoc()->DoesUndo(); + GetDoc()->DoUndo( FALSE ); StartAllAction(); @@ -282,7 +290,9 @@ USHORT SwEditShell::Redo( USHORT nCnt ) } EndAllAction(); - GetDoc()->DoUndo( TRUE ); + + // #105332# undo state was not restored but set FALSE everytime + GetDoc()->DoUndo( bSaveDoesUndo ); return bRet; } |