[Libreoffice-commits] core.git: sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Sep 14 08:45:28 UTC 2018
sw/source/core/doc/tblrwcl.cxx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit eaf6fa7dd8643a6d02704797b51e7a815b31f0bb
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Sep 13 10:44:03 2018 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Sep 14 10:45:04 2018 +0200
loplugin:useuniqueptr in SwTable::OldSplitRow
Change-Id: Ie01de0c9463b9a1012d4b1adc9e92e8f8b1d8a58
Reviewed-on: https://gerrit.libreoffice.org/60447
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
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();
More information about the Libreoffice-commits
mailing list