From b0d94ba8efe46c3ff7e90fa98f9a8708f48c5e66 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 30 Aug 2018 12:25:15 +0200 Subject: use std::unique_ptr in various sc undo code Change-Id: I7906f4e78336d3b738ea3409838ce3404e7f5c30 Reviewed-on: https://gerrit.libreoffice.org/59796 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sc/source/ui/docshell/dbdocfun.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sc/source/ui/docshell/dbdocfun.cxx') diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx index f6c3a95b4c2e..a0f85a2712bd 100644 --- a/sc/source/ui/docshell/dbdocfun.cxx +++ b/sc/source/ui/docshell/dbdocfun.cxx @@ -342,7 +342,7 @@ bool ScDBDocFunc::RepeatDB( const OUString& rDBName, bool bApi, bool bIsUnnamed, //! Undo needed data only ? ScDocumentUniquePtr pUndoDoc; - ScOutlineTable* pUndoTab = nullptr; + std::unique_ptr pUndoTab; std::unique_ptr pUndoRange; std::unique_ptr pUndoDB; @@ -353,7 +353,7 @@ bool ScDBDocFunc::RepeatDB( const OUString& rDBName, bool bApi, bool bIsUnnamed, ScOutlineTable* pTable = rDoc.GetOutlineTable( nTab ); if (pTable) { - pUndoTab = new ScOutlineTable( *pTable ); + pUndoTab.reset(new ScOutlineTable( *pTable )); // column/row state SCCOLROW nOutStartCol, nOutEndCol; @@ -448,7 +448,7 @@ bool ScDBDocFunc::RepeatDB( const OUString& rDBName, bool bApi, bool bIsUnnamed, nNewEndRow, //nCurX, nCurY, nStartCol, nStartRow, - std::move(pUndoDoc), pUndoTab, + std::move(pUndoDoc), std::move(pUndoTab), std::move(pUndoRange), std::move(pUndoDB), pOld, pNew ) ); } -- cgit