Kaydet (Commit) 140d9b83 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:useuniqueptr in SwUndoDrawDelete

Change-Id: I7d7e89a9ffa67141e459772791caae2937458b8f
Reviewed-on: https://gerrit.libreoffice.org/57425
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst c2b0e016
......@@ -116,7 +116,7 @@ public:
class SwUndoDrawDelete : public SwUndo
{
std::unique_ptr<SwUndoGroupObjImpl[]> pObjArr;
SdrMarkList* pMarkLst; // MarkList for all selected SdrObjects
std::unique_ptr<SdrMarkList> pMarkLst; // MarkList for all selected SdrObjects
bool bDelFormat;
public:
......
......@@ -479,7 +479,7 @@ SwUndoDrawDelete::SwUndoDrawDelete( sal_uInt16 nCnt, const SwDoc* pDoc )
: SwUndo( SwUndoId::DRAWDELETE, pDoc ), bDelFormat( true )
{
pObjArr.reset( new SwUndoGroupObjImpl[ nCnt ] );
pMarkLst = new SdrMarkList();
pMarkLst.reset( new SdrMarkList() );
}
SwUndoDrawDelete::~SwUndoDrawDelete()
......@@ -490,7 +490,6 @@ SwUndoDrawDelete::~SwUndoDrawDelete()
for( size_t n = 0; n < pMarkLst->GetMarkCount(); ++n, ++pTmp )
delete pTmp->pFormat;
}
delete pMarkLst;
}
void SwUndoDrawDelete::UndoImpl(::sw::UndoRedoContext & rContext)
......@@ -516,7 +515,7 @@ void SwUndoDrawDelete::UndoImpl(::sw::UndoRedoContext & rContext)
if (pDrawFrameFormat)
pDrawFrameFormat->PosAttrSet();
}
rContext.SetSelections(nullptr, pMarkLst);
rContext.SetSelections(nullptr, pMarkLst.get());
}
void SwUndoDrawDelete::RedoImpl(::sw::UndoRedoContext & rContext)
......
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