sw/source/core/table/swnewtable.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
New commits: commit 81cf79d1af42fc9fb1f5500bcc3f55cce1548bab Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Wed Sep 26 14:11:43 2018 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Fri Sep 28 09:47:20 2018 +0200 loplugin:useuniqueptr in SwTable::NewInsertCol Change-Id: If22b13087ab193ed37ca092c2b252579d5ac5d0e Reviewed-on: https://gerrit.libreoffice.org/61003 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sw/source/core/table/swnewtable.cxx b/sw/source/core/table/swnewtable.cxx index e9398fd42414..f407a0eec839 100644 --- a/sw/source/core/table/swnewtable.cxx +++ b/sw/source/core/table/swnewtable.cxx @@ -734,10 +734,10 @@ bool SwTable::NewInsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, nLastRowSpan = nRowSpan; } const SvxBoxItem& aSelBoxItem = pBoxFrameFormat->GetBox(); - SvxBoxItem* pNoRightBorder = nullptr; + std::unique_ptr<SvxBoxItem> pNoRightBorder; if( aSelBoxItem.GetRight() ) { - pNoRightBorder = new SvxBoxItem( aSelBoxItem ); + pNoRightBorder.reset( new SvxBoxItem( aSelBoxItem )); pNoRightBorder->SetLine( nullptr, SvxBoxItemLine::RIGHT ); } for( sal_uInt16 j = 0; j < nCnt; ++j ) @@ -762,7 +762,6 @@ bool SwTable::NewInsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, SwFrameFormat* pFrameFormat = pBox->ClaimFrameFormat(); pFrameFormat->SetFormatAttr( *pNoRightBorder ); } - delete pNoRightBorder; } aFndBox.MakeFrames( *this ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits