diff options
author | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2011-01-06 10:34:42 +0100 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2011-01-06 10:34:42 +0100 |
commit | 1c380574d3151fae02f3719468352a407e920595 (patch) | |
tree | ac74ad0dca5ec897ce616048d5dfaa58c837b590 /svl/inc/svl | |
parent | 80090015ec2d7ef403a1692e4c85de2c87f17c73 (diff) |
undoapi: don't let sw's UndoManager call into SfxUndoManager::Clear when in a list action - introdce a dedicated method (ClearAllLelves) for the pattern needed by sw
Diffstat (limited to 'svl/inc/svl')
-rw-r--r-- | svl/inc/svl/undo.hxx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/svl/inc/svl/undo.hxx b/svl/inc/svl/undo.hxx index cfa3e6155862..08d2fa6c5b84 100644 --- a/svl/inc/svl/undo.hxx +++ b/svl/inc/svl/undo.hxx @@ -400,12 +400,23 @@ protected: void ImplClearRedo_NoLock( bool const i_currentLevel ); + /** clears all undo actions on the current level, plus all undo actions on superordinate levels, + as soon as those levels are reached. + + If no list action is active currently, i.e. we're on the top level already, this method is equivalent to + ->Clear. + + Otherwise, the Undo actions on the current level are removed. Upon leaving the current list action, all + undo actions on the then-current level are removed, too. This is continued until the top level is reached. + */ + void ClearAllLevels(); + private: size_t ImplLeaveListAction( const bool i_merge, ::svl::undo::impl::UndoManagerGuard& i_guard ); bool ImplAddUndoAction_NoNotify( SfxUndoAction* pAction, bool bTryMerge, bool bClearRedo, ::svl::undo::impl::UndoManagerGuard& i_guard ); void ImplClearRedo( ::svl::undo::impl::UndoManagerGuard& i_guard, bool const i_currentLevel ); void ImplClearUndo( ::svl::undo::impl::UndoManagerGuard& i_guard ); - void ImplClear( ::svl::undo::impl::UndoManagerGuard& i_guard ); + void ImplClearCurrentLevel_NoNotify( ::svl::undo::impl::UndoManagerGuard& i_guard ); size_t ImplGetRedoActionCount_Lock( bool const i_currentLevel = CurrentLevel ) const; bool ImplIsUndoEnabled_Lock() const; bool ImplIsInListAction_Lock() const; |