summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
Diffstat (limited to 'svl')
-rw-r--r--svl/source/undo/undo.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/svl/source/undo/undo.cxx b/svl/source/undo/undo.cxx
index 3b2085108126..ec0f280145c4 100644
--- a/svl/source/undo/undo.cxx
+++ b/svl/source/undo/undo.cxx
@@ -595,15 +595,16 @@ bool SfxUndoManager::ImplAddUndoAction_NoNotify( SfxUndoAction *pAction, bool bT
}
-void SfxUndoManager::AddUndoAction( SfxUndoAction *pAction, bool bTryMerge )
+void SfxUndoManager::AddUndoAction( std::unique_ptr<SfxUndoAction> pAction, bool bTryMerge )
{
UndoManagerGuard aGuard( *m_xData );
// add
- if ( ImplAddUndoAction_NoNotify( pAction, bTryMerge, true, aGuard ) )
+ auto pActionTmp = pAction.get();
+ if ( ImplAddUndoAction_NoNotify( pAction.release(), bTryMerge, true, aGuard ) )
{
// notify listeners
- aGuard.scheduleNotification( &SfxUndoListener::undoActionAdded, pAction->GetComment() );
+ aGuard.scheduleNotification( &SfxUndoListener::undoActionAdded, pActionTmp->GetComment() );
}
}