summaryrefslogtreecommitdiff
path: root/sc/source/ui/undo/undoblk.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-07-13 20:42:04 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-07-14 10:13:46 +0200
commit8e39ef66928a3e37c618d3a70a631e71266db274 (patch)
tree8cab0264e58c885ae7d78a77d90fd041bcdbe15d /sc/source/ui/undo/undoblk.cxx
parentd7e06e46acc2ee17101cef63e59b9f5efcbfab14 (diff)
extend loplugin useuniqueptr to POD types
Change-Id: I6ff24f048bd8f75bf87a78b718f37b57855d4781 Reviewed-on: https://gerrit.libreoffice.org/39932 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/undo/undoblk.cxx')
-rw-r--r--sc/source/ui/undo/undoblk.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx
index 4696623ead07..f4ad5170139a 100644
--- a/sc/source/ui/undo/undoblk.cxx
+++ b/sc/source/ui/undo/undoblk.cxx
@@ -2042,15 +2042,13 @@ ScUndoClearItems::ScUndoClearItems( ScDocShell* pNewDocShell, const ScMarkData&
sal_uInt16 nCount = 0;
while ( pW[nCount] )
++nCount;
- pWhich = new sal_uInt16[nCount+1];
+ pWhich.reset( new sal_uInt16[nCount+1] );
for (sal_uInt16 i=0; i<=nCount; i++)
pWhich[i] = pW[i];
}
ScUndoClearItems::~ScUndoClearItems()
{
- delete pUndoDoc;
- delete pWhich;
}
OUString ScUndoClearItems::GetComment() const
@@ -2074,7 +2072,7 @@ void ScUndoClearItems::Redo()
BeginRedo();
ScDocument& rDoc = pDocShell->GetDocument();
- rDoc.ClearSelectionItems( pWhich, aMarkData );
+ rDoc.ClearSelectionItems( pWhich.get(), aMarkData );
pDocShell->PostPaint( aBlockRange, PaintPartFlags::Grid, SC_PF_LINES | SC_PF_TESTMERGE );
EndRedo();
@@ -2085,7 +2083,7 @@ void ScUndoClearItems::Repeat(SfxRepeatTarget& rTarget)
if (dynamic_cast<const ScTabViewTarget*>( &rTarget) != nullptr)
{
ScViewData& rViewData = static_cast<ScTabViewTarget&>(rTarget).GetViewShell()->GetViewData();
- rViewData.GetDocFunc().ClearItems( rViewData.GetMarkData(), pWhich, false );
+ rViewData.GetDocFunc().ClearItems( rViewData.GetMarkData(), pWhich.get(), false );
}
}