summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2010-11-12 15:41:15 +0100
committerFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2010-11-12 15:41:15 +0100
commit3a78a2dec20b22d686755f464b9e9c907a2c6d26 (patch)
tree5499078af5c4177ba7898ff4e32627aeee89bdb4 /svl
parent4a026bfdd9de518cffe88a4d60ce22702c17b336 (diff)
undoapi: delegate UndoManagerHelper's (modifying) API calls into a dedicated thread, serializing them this way
Diffstat (limited to 'svl')
-rw-r--r--svl/inc/svl/undo.hxx2
-rw-r--r--svl/source/undo/undo.cxx10
2 files changed, 6 insertions, 6 deletions
diff --git a/svl/inc/svl/undo.hxx b/svl/inc/svl/undo.hxx
index ce7a94dd50de..de9c26c7a946 100644
--- a/svl/inc/svl/undo.hxx
+++ b/svl/inc/svl/undo.hxx
@@ -145,7 +145,7 @@ public:
virtual void cleared() = 0;
virtual void clearedRedo() = 0;
virtual void listActionEntered( const String& i_comment ) = 0;
- virtual void listActionLeft() = 0;
+ virtual void listActionLeft( const String& i_comment ) = 0;
virtual void listActionLeftAndMerged() = 0;
virtual void listActionCancelled() = 0;
virtual void undoManagerDying() = 0;
diff --git a/svl/source/undo/undo.cxx b/svl/source/undo/undo.cxx
index e401c4843258..f9a51a6bf53d 100644
--- a/svl/source/undo/undo.cxx
+++ b/svl/source/undo/undo.cxx
@@ -978,7 +978,7 @@ USHORT SfxUndoManager::ImplLeaveListAction( const bool i_merge )
// If no undo action where added, delete the undo list action
const USHORT nListActionElements = pArrayToLeave->nCurUndoAction;
- if( nListActionElements == 0 )
+ if ( nListActionElements == 0 )
{
SfxUndoAction* pCurrentAction= m_pData->pActUndoArray->aUndoActions[ m_pData->pActUndoArray->nCurUndoAction-1 ];
m_pData->pActUndoArray->aUndoActions.Remove( --m_pData->pActUndoArray->nCurUndoAction );
@@ -991,9 +991,9 @@ USHORT SfxUndoManager::ImplLeaveListAction( const bool i_merge )
SfxUndoAction* pCurrentAction= m_pData->pActUndoArray->aUndoActions[ m_pData->pActUndoArray->nCurUndoAction-1 ];
SfxListUndoAction* pListAction = dynamic_cast< SfxListUndoAction * >( pCurrentAction );
- OSL_ENSURE( pListAction, "SfxUndoManager::ImplLeaveListAction: list action expected at this position!" );
+ ENSURE_OR_RETURN( pListAction, "SfxUndoManager::ImplLeaveListAction: list action expected at this position!", nListActionElements );
- if ( pListAction && i_merge )
+ if ( i_merge )
{
// merge the list action with its predecessor on the same level
OSL_ENSURE( m_pData->pActUndoArray->nCurUndoAction > 1,
@@ -1011,7 +1011,7 @@ USHORT SfxUndoManager::ImplLeaveListAction( const bool i_merge )
}
// if the undo array has no comment, try to get it from its children
- if ( pListAction && pListAction->GetComment().Len() == 0 )
+ if ( pListAction->GetComment().Len() == 0 )
{
for( USHORT n = 0; n < pListAction->aUndoActions.Count(); n++ )
{
@@ -1024,7 +1024,7 @@ USHORT SfxUndoManager::ImplLeaveListAction( const bool i_merge )
}
// notify listeners
- aGuard.scheduleNotification( &SfxUndoListener::listActionLeft );
+ aGuard.scheduleNotification( &SfxUndoListener::listActionLeft, pListAction->GetComment() );
// outta here
return nListActionElements;