From 647e11dc2fcbf0c8f7e39f4260d2b89057267e36 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 12 Jul 2017 18:58:17 +0200 Subject: loplugin:useuniqueptr in sc Change-Id: I004e1f0292c8a40515880546574255ab835dbdbe Reviewed-on: https://gerrit.libreoffice.org/39875 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sc/source/ui/undo/undoblk.cxx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'sc/source/ui/undo/undoblk.cxx') diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx index 5d4444dd06b3..4696623ead07 100644 --- a/sc/source/ui/undo/undoblk.cxx +++ b/sc/source/ui/undo/undoblk.cxx @@ -96,9 +96,6 @@ ScUndoInsertCells::ScUndoInsertCells( ScDocShell* pNewDocShell, ScUndoInsertCells::~ScUndoInsertCells() { - delete pPasteUndo; - delete []pTabs; - delete []pScenarios; } OUString ScUndoInsertCells::GetComment() const @@ -121,7 +118,7 @@ bool ScUndoInsertCells::Merge( SfxUndoAction* pNextAction ) // Store paste action if this is part of paste with inserting cells. // A list action isn't used because Repeat wouldn't work (insert wrong cells). - pPasteUndo = pWrappedAction; + pPasteUndo.reset( pWrappedAction ); pWrapper->ForgetWrappedUndo(); // pWrapper is deleted by UndoManager return true; } @@ -352,8 +349,6 @@ ScUndoDeleteCells::ScUndoDeleteCells( ScDocShell* pNewDocShell, ScUndoDeleteCells::~ScUndoDeleteCells() { - delete []pTabs; - delete []pScenarios; } OUString ScUndoDeleteCells::GetComment() const -- cgit