summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-09-13 10:44:03 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-09-14 10:45:04 +0200
commiteaf6fa7dd8643a6d02704797b51e7a815b31f0bb (patch)
treef0baf34fd3053c142b8c59bb115b8dd6fe294dce
parentc62d02bcb9192c839767d6824751002696c3ed3f (diff)
loplugin:useuniqueptr in SwTable::OldSplitRow
Change-Id: Ie01de0c9463b9a1012d4b1adc9e92e8f8b1d8a58 Reviewed-on: https://gerrit.libreoffice.org/60447 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--sw/source/core/doc/tblrwcl.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx
index e9551ded7a87..9551e4480f9d 100644
--- a/sw/source/core/doc/tblrwcl.cxx
+++ b/sw/source/core/doc/tblrwcl.cxx
@@ -1050,10 +1050,10 @@ bool SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCn
// If the rows should get the same (min) height, we first have
// to store the old row heights before deleting the frames
- long* pRowHeights = nullptr;
+ std::unique_ptr<long[]> pRowHeights;
if ( bSameHeight )
{
- pRowHeights = new long[ rBoxes.size() ];
+ pRowHeights.reset(new long[ rBoxes.size() ]);
for (size_t n = 0; n < rBoxes.size(); ++n)
{
SwTableBox* pSelBox = rBoxes[n];
@@ -1165,7 +1165,7 @@ bool SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCn
pFrameFormat->ResetFormatAttr( RES_BOXATR_BEGIN, RES_BOXATR_END - 1 );
}
- delete[] pRowHeights;
+ pRowHeights.reset();
GCLines();