summaryrefslogtreecommitdiff
path: root/sd/source/core/undo/undomanager.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/core/undo/undomanager.cxx')
-rwxr-xr-xsd/source/core/undo/undomanager.cxx41
1 files changed, 4 insertions, 37 deletions
diff --git a/sd/source/core/undo/undomanager.cxx b/sd/source/core/undo/undomanager.cxx
index 5b7ed22e3a9e..37f4ebe75dfa 100755
--- a/sd/source/core/undo/undomanager.cxx
+++ b/sd/source/core/undo/undomanager.cxx
@@ -34,40 +34,22 @@ using namespace sd;
UndoManager::UndoManager( sal_uInt16 nMaxUndoActionCount /* = 20 */ )
: SfxUndoManager( nMaxUndoActionCount )
-, mnListLevel( 0 )
, mpLinkedUndoManager(NULL)
{
}
void UndoManager::EnterListAction(const UniString &rComment, const UniString& rRepeatComment, sal_uInt16 nId /* =0 */)
{
- if( !isInUndo() )
+ if( !IsDoing() )
{
ClearLinkedRedoActions();
- mnListLevel++;
SfxUndoManager::EnterListAction( rComment, rRepeatComment, nId );
}
}
-void UndoManager::LeaveListAction()
+void UndoManager::AddUndoAction( SfxUndoAction *pAction, sal_Bool bTryMerg /* = FALSE */ )
{
- if( !isInUndo() )
- {
- SfxUndoManager::LeaveListAction();
- if( mnListLevel )
- {
- mnListLevel--;
- }
- else
- {
- DBG_ERROR("sd::UndoManager::LeaveListAction(), no open list action!" );
- }
- }
-}
-
-void UndoManager::AddUndoAction( SfxUndoAction *pAction, sal_Bool bTryMerg /* = sal_False */ )
-{
- if( !isInUndo() )
+ if( !IsDoing() )
{
ClearLinkedRedoActions();
SfxUndoManager::AddUndoAction( pAction, bTryMerg );
@@ -79,22 +61,7 @@ void UndoManager::AddUndoAction( SfxUndoAction *pAction, sal_Bool bTryMerg /* =
}
-sal_Bool UndoManager::Undo( sal_uInt16 nCount )
-{
- ScopeLockGuard aGuard( maIsInUndoLock );
- return SfxUndoManager::Undo( nCount );
-}
-
-sal_Bool UndoManager::Redo( sal_uInt16 nCount )
-{
- ScopeLockGuard aGuard( maIsInUndoLock );
- return SfxUndoManager::Redo( nCount );
-}
-
-
-
-
-void UndoManager::SetLinkedUndoManager (SfxUndoManager* pLinkedUndoManager)
+void UndoManager::SetLinkedUndoManager (::svl::IUndoManager* pLinkedUndoManager)
{
mpLinkedUndoManager = pLinkedUndoManager;
}