diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-04 13:57:28 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-05 08:08:09 +0200 |
commit | dbe85d6613f96192417059acb3274e981a57819d (patch) | |
tree | 9914c026427f93b4779738a3ae823754f7304fe2 /sw/source/core/edit/edfcol.cxx | |
parent | d46061c3190b66cbf698f6ff5e97ec1fd9fe0d44 (diff) |
use std::unique_ptr in sw::IDocumentUndoRedo
Change-Id: I504706ff1a3fc11a7a06ebe935f9dbc5323aefe8
Reviewed-on: https://gerrit.libreoffice.org/61369
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/core/edit/edfcol.cxx')
-rw-r--r-- | sw/source/core/edit/edfcol.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx index 3e1d3a74c778..962c9f6773f4 100644 --- a/sw/source/core/edit/edfcol.cxx +++ b/sw/source/core/edit/edfcol.cxx @@ -666,8 +666,8 @@ void lcl_ValidateParagraphSignatures(SwDoc* pDoc, const uno::Reference<text::XTe else if (!lcl_MakeParagraphSignatureFieldText(xModel, xParagraph, xField, utf8Text).first) { pDoc->GetIDocumentUndoRedo().StartUndo(SwUndoId::PARA_SIGN_ADD, nullptr); - SwUndoParagraphSigning* pUndo = new SwUndoParagraphSigning(pDoc, xField, xParagraph, false); - pDoc->GetIDocumentUndoRedo().AppendUndo(pUndo); + pDoc->GetIDocumentUndoRedo().AppendUndo( + o3tl::make_unique<SwUndoParagraphSigning>(pDoc, xField, xParagraph, false)); lcl_RemoveParagraphMetadataField(xField); pDoc->GetIDocumentUndoRedo().EndUndo(SwUndoId::PARA_SIGN_ADD, nullptr); } @@ -1799,8 +1799,8 @@ void SwEditShell::SignParagraph() lcl_UpdateParagraphSignatureField(GetDoc(), xModel, xParagraph, xField, utf8Text); - SwUndoParagraphSigning* pUndo = new SwUndoParagraphSigning(GetDoc(), xField, xParagraph, true); - GetDoc()->GetIDocumentUndoRedo().AppendUndo(pUndo); + GetDoc()->GetIDocumentUndoRedo().AppendUndo( + o3tl::make_unique<SwUndoParagraphSigning>(GetDoc(), xField, xParagraph, true)); GetDoc()->GetIDocumentUndoRedo().EndUndo(SwUndoId::PARA_SIGN_ADD, nullptr); } |