diff options
author | Kohei Yoshida <kyoshida@novell.com> | 2011-05-03 17:22:28 -0400 |
---|---|---|
committer | Kohei Yoshida <kyoshida@novell.com> | 2011-05-03 17:22:28 -0400 |
commit | 184b7e7b959a1769d84f9a1581c71dd315eb184d (patch) | |
tree | 1fad26c784ef30289f24f784d91be213753c86f4 /sc | |
parent | dc40dabec04300ab3a4578e80a0b2170e62df674 (diff) |
Simplify the code a bit.
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/document.cxx | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index c5f8b1c1c71c..b8f026503dc4 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -5427,16 +5427,8 @@ void ScDocument::EnableUndo( bool bVal ) // enabled, or else re-enabling it may not actually re-enable undo unless // the lock count becomes zero. - if (bVal) - { - if (!GetUndoManager()->IsUndoEnabled()) - GetUndoManager()->EnableUndo(true); - } - else - { - if (GetUndoManager()->IsUndoEnabled()) - GetUndoManager()->EnableUndo(false); - } + if (bVal != GetUndoManager()->IsUndoEnabled()) + GetUndoManager()->EnableUndo(bVal); mbUndoEnabled = bVal; } |