Kaydet (Commit) 81cf79d1 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:useuniqueptr in SwTable::NewInsertCol

Change-Id: If22b13087ab193ed37ca092c2b252579d5ac5d0e
Reviewed-on: https://gerrit.libreoffice.org/61003
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 36fca319
......@@ -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 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment