diff options
author | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2011-03-15 20:54:02 +0100 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2011-03-15 20:54:02 +0100 |
commit | a013e99f22f1d412fc9802887ddfd593fb40380d (patch) | |
tree | 75768f8bc0cd6774e3dd409cc20ef2a2c259c230 | |
parent | CWS-TOOLING: integrate CWS os146 (diff) | |
download | core-a013e99f22f1d412fc9802887ddfd593fb40380d.tar.gz core-a013e99f22f1d412fc9802887ddfd593fb40380d.zip |
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.
-rw-r--r-- | sw/source/core/undo/docundo.cxx | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sw/source/core/undo/docundo.cxx b/sw/source/core/undo/docundo.cxx index 2e91da080c7c..b82d67002f33 100644 --- a/sw/source/core/undo/docundo.cxx +++ b/sw/source/core/undo/docundo.cxx @@ -406,12 +406,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) |