summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2011-03-15 20:54:02 +0100
committerMichael Meeks <michael.meeks@suse.com>2012-07-06 20:29:12 +0100
commitfc68fb4bb4198e7fca395309e721030247d869aa (patch)
tree8913b72069c1c1fb4208cc5615db4cd4016afa22 /sw
parent11af41cf9ed32e7912bff92ffd8e428804e11ba9 (diff)
fs34b: #i117039# restore old behavior of SfxUndoManager::EnableUndo: don't count the calls, but maintain a simple flag.
Consequently, let sw's UndoManager simply delegate now, and change the UndoManagerHelper to maintain a lock counter itself.
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/undo/docundo.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/sw/source/core/undo/docundo.cxx b/sw/source/core/undo/docundo.cxx
index 18dc5b654d29..76f6660d4f02 100644
--- a/sw/source/core/undo/docundo.cxx
+++ b/sw/source/core/undo/docundo.cxx
@@ -402,12 +402,9 @@ SwUndo * UndoManager::RemoveLastUndo()
void UndoManager::EnableUndo(bool bEnable)
{
- // UGLY: SfxUndoManager has a counter to match enable/disable calls
- // but the writer code expects that a single call switches
- while (IsUndoEnabled() != bEnable)
- {
- SfxUndoManager::EnableUndo(bEnable);
- }
+ // SfxUndoManager does not have a counter anymore, but reverted to the old behavior of
+ // having a simple boolean flag for locking. So, simply forward.
+ SfxUndoManager::EnableUndo(bEnable);
}
void UndoManager::AddUndoAction(SfxUndoAction *pAction, sal_Bool bTryMerge)