[Libreoffice-commits] core.git: editeng/source include/editeng
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Sat Oct 10 20:20:10 UTC 2020
editeng/source/outliner/outliner.cxx | 4 ++--
editeng/source/outliner/outlobj.cxx | 4 ++--
include/editeng/outlobj.hxx | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
New commits:
commit fb8973f31f111229be5184f4e4223e963ced2c7b
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Oct 10 19:21:38 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Oct 10 22:19:25 2020 +0200
ofz#23492 the only user of this ctor throws away the original of the clone
so we can take ownership of the original instead
Change-Id: I26fd4303a3b205df309f91bfa5bcddbbc41dfd7a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104173
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index 5684c64a44a7..2fba66dc2d4e 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -373,7 +373,7 @@ std::unique_ptr<OutlinerParaObject> Outliner::CreateParaObject( sal_Int32 nStart
if (nCount <= 0)
return nullptr;
- std::unique_ptr<EditTextObject> pText = pEditEngine->CreateTextObject( nStartPara, nCount );
+ std::unique_ptr<EditTextObject> xText = pEditEngine->CreateTextObject( nStartPara, nCount );
const bool bIsEditDoc(OutlinerMode::TextObject == ImplGetOutlinerMode());
ParagraphDataVector aParagraphDataVector(nCount);
const sal_Int32 nLastPara(nStartPara + nCount - 1);
@@ -383,7 +383,7 @@ std::unique_ptr<OutlinerParaObject> Outliner::CreateParaObject( sal_Int32 nStart
aParagraphDataVector[nPara-nStartPara] = *GetParagraph(nPara);
}
- std::unique_ptr<OutlinerParaObject> pPObj(new OutlinerParaObject(*pText, aParagraphDataVector, bIsEditDoc));
+ std::unique_ptr<OutlinerParaObject> pPObj(new OutlinerParaObject(std::move(xText), aParagraphDataVector, bIsEditDoc));
pPObj->SetOutlinerMode(GetMode());
return pPObj;
diff --git a/editeng/source/outliner/outlobj.cxx b/editeng/source/outliner/outlobj.cxx
index 48c7aa02ab08..61b0a40d6b98 100644
--- a/editeng/source/outliner/outlobj.cxx
+++ b/editeng/source/outliner/outlobj.cxx
@@ -62,8 +62,8 @@ bool OutlinerParaObjData::isWrongListEqual(const OutlinerParaObjData& rCompare)
}
OutlinerParaObject::OutlinerParaObject(
- const EditTextObject& rTextObj, const ParagraphDataVector& rParagraphDataVector, bool bIsEditDoc ) :
- mpImpl(OutlinerParaObjData(rTextObj.Clone(), rParagraphDataVector, bIsEditDoc))
+ std::unique_ptr<EditTextObject> xTextObj, const ParagraphDataVector& rParagraphDataVector, bool bIsEditDoc ) :
+ mpImpl(OutlinerParaObjData(std::move(xTextObj), rParagraphDataVector, bIsEditDoc))
{
}
diff --git a/include/editeng/outlobj.hxx b/include/editeng/outlobj.hxx
index 98414deda072..5c11180d27de 100644
--- a/include/editeng/outlobj.hxx
+++ b/include/editeng/outlobj.hxx
@@ -68,7 +68,7 @@ class EDITENG_DLLPUBLIC OutlinerParaObject
public:
// constructors/destructor
- OutlinerParaObject( const EditTextObject&, const ParagraphDataVector&, bool bIsEditDoc);
+ OutlinerParaObject(std::unique_ptr<EditTextObject>, const ParagraphDataVector&, bool bIsEditDoc);
OutlinerParaObject( const EditTextObject&);
OutlinerParaObject( std::unique_ptr<EditTextObject> );
OutlinerParaObject( const OutlinerParaObject&);
More information about the Libreoffice-commits
mailing list