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

loplugin:useuniqueptr in DocumentContentOperationsManager::MoveNodeRange

Change-Id: I2e32dba4ad9770ed62dbf74769ee00c05235bd40
Reviewed-on: https://gerrit.libreoffice.org/60445
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 761308ed
......@@ -2249,9 +2249,9 @@ bool DocumentContentOperationsManager::MoveNodeRange( SwNodeRange& rRange, SwNod
// Set it to before the Position, so that it cannot be moved further.
SwNodeIndex aIdx( rPos, -1 );
SwNodeIndex* pSaveInsPos = nullptr;
std::unique_ptr<SwNodeIndex> pSaveInsPos;
if( pUndo )
pSaveInsPos = new SwNodeIndex( rRange.aStart, -1 );
pSaveInsPos.reset(new SwNodeIndex( rRange.aStart, -1 ));
// move the Nodes
bool bNoDelFrames = bool(SwMoveFlags::NO_DELFRMS & eMvFlags);
......@@ -2302,7 +2302,7 @@ bool DocumentContentOperationsManager::MoveNodeRange( SwNodeRange& rRange, SwNod
m_rDoc.GetIDocumentUndoRedo().AppendUndo(pUndo);
}
delete pSaveInsPos;
pSaveInsPos.reset();
if( bUpdateFootnote )
{
......
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