editeng/source/editeng/eertfpar.cxx | 4 ++-- editeng/source/rtf/svxrtf.cxx | 2 +- include/editeng/svxrtf.hxx | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)
New commits: commit 56e0f1fcd43e0d4ab8c7a678cbbed1ea2c612868 Author: Noel Grandin <[email protected]> Date: Wed Apr 11 10:47:14 2018 +0200 make EditPosition::Clone return std::unique_ptr Change-Id: Ie1f987f58fd7be8067dba47e47300dd97a01a393 Reviewed-on: https://gerrit.libreoffice.org/52714 Tested-by: Jenkins <[email protected]> Reviewed-by: Noel Grandin <[email protected]> diff --git a/editeng/source/editeng/eertfpar.cxx b/editeng/source/editeng/eertfpar.cxx index 1b6bfce431a1..ccecfa5723de 100644 --- a/editeng/source/editeng/eertfpar.cxx +++ b/editeng/source/editeng/eertfpar.cxx @@ -617,9 +617,9 @@ sal_Int32 EditNodeIdx::GetIdx() const EditPosition::EditPosition(EditEngine* pEE, EditSelection* pSel) : mpEditEngine(pEE), mpCurSel(pSel) {} -EditPosition* EditPosition::Clone() const +std::unique_ptr<EditPosition> EditPosition::Clone() const { - return new EditPosition(mpEditEngine, mpCurSel); + return std::unique_ptr<EditPosition>(new EditPosition(mpEditEngine, mpCurSel)); } EditNodeIdx* EditPosition::MakeNodeIdx() const diff --git a/editeng/source/rtf/svxrtf.cxx b/editeng/source/rtf/svxrtf.cxx index 1b0efa0617b0..369995b1d293 100644 --- a/editeng/source/rtf/svxrtf.cxx +++ b/editeng/source/rtf/svxrtf.cxx @@ -87,7 +87,7 @@ SvxRTFParser::~SvxRTFParser() void SvxRTFParser::SetInsPos( const EditPosition& rNew ) { - pInsPos.reset( rNew.Clone() ); + pInsPos = rNew.Clone(); } SvParserState SvxRTFParser::CallParser() diff --git a/include/editeng/svxrtf.hxx b/include/editeng/svxrtf.hxx index 8273e64b6f12..89f1cdc4bfae 100644 --- a/include/editeng/svxrtf.hxx +++ b/include/editeng/svxrtf.hxx @@ -81,7 +81,7 @@ public: sal_Int32 GetCntIdx() const; // clone - EditPosition* Clone() const; + std::unique_ptr<EditPosition> Clone() const; // clone NodeIndex EditNodeIdx* MakeNodeIdx() const; _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
