From a013e99f22f1d412fc9802887ddfd593fb40380d Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 15 Mar 2011 20:54:02 +0100 Subject: 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. --- sw/source/core/undo/docundo.cxx | 9 +++------ 1 file 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) -- cgit From fbd46bbdd8d405f1a16fb29b34d01062509f6239 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 29 Mar 2011 10:43:06 +0200 Subject: fs34b: #i117545# (patch provided by mathias.bauer@oracle.com) --- sw/source/ui/uno/unomod.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sw/source/ui/uno/unomod.cxx b/sw/source/ui/uno/unomod.cxx index 25b09c895687..f8fbfdde04ca 100644 --- a/sw/source/ui/uno/unomod.cxx +++ b/sw/source/ui/uno/unomod.cxx @@ -782,6 +782,12 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c aOpt.setBrowseMode( bVal ); pView->GetWrtShell().ApplyViewOptions( aOpt ); pView->RecheckBrowseMode(); + + // must be set in mpViewOption as this will overwrite settings in _post! + mpViewOption->setBrowseMode( bVal ); + + // disable multiple layout + pView->GetDocShell()->ToggleBrowserMode(bVal, pView ); } } break; -- cgit