summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell/dbdocfun.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-08-30 12:25:15 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-08-31 13:27:11 +0200
commitb0d94ba8efe46c3ff7e90fa98f9a8708f48c5e66 (patch)
tree5a2dbd8cbbbca92f0c2120e5e85e861e5fab801a /sc/source/ui/docshell/dbdocfun.cxx
parent64cb57c82d9e7f7069821b2e2ef92574ec73ebe2 (diff)
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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/docshell/dbdocfun.cxx')
-rw-r--r--sc/source/ui/docshell/dbdocfun.cxx6
1 files changed, 3 insertions, 3 deletions
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<ScOutlineTable> pUndoTab;
std::unique_ptr<ScRangeName> pUndoRange;
std::unique_ptr<ScDBCollection> 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 ) );
}