From 06bc9956769cef5e0f45d621453517e95845bbdb Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sat, 10 Oct 2020 19:29:16 +0100 Subject: we throw away the original of the clone MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit so we can take ownership of the original instead Change-Id: I2399aa77b22e606008a5aed2bc73361e13b68455 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104174 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- sc/source/filter/excel/xiescher.cxx | 2 +- sc/source/ui/unoobj/editsrc.cxx | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'sc') diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx index 0aff723b16b4..c0d63ee01d1e 100644 --- a/sc/source/filter/excel/xiescher.cxx +++ b/sc/source/filter/excel/xiescher.cxx @@ -1497,7 +1497,7 @@ void XclImpTextObj::DoPreProcessSdrObj( XclImpDffConverter& rDffConv, SdrObject& // rich text std::unique_ptr< EditTextObject > xEditObj( XclImpStringHelper::CreateTextObject( GetRoot(), *maTextData.mxString ) ); - std::unique_ptr pOutlineObj(new OutlinerParaObject( *xEditObj )); + std::unique_ptr pOutlineObj(new OutlinerParaObject(std::move(xEditObj))); pOutlineObj->SetOutlinerMode( OutlinerMode::TextObject ); pTextObj->NbcSetOutlinerParaObject( std::move(pOutlineObj) ); } diff --git a/sc/source/ui/unoobj/editsrc.cxx b/sc/source/ui/unoobj/editsrc.cxx index a54ff4f0e6ee..6b3fa37447e6 100644 --- a/sc/source/ui/unoobj/editsrc.cxx +++ b/sc/source/ui/unoobj/editsrc.cxx @@ -169,9 +169,7 @@ void ScAnnotationEditSource::UpdateData() if( SdrObject* pObj = GetCaptionObj() ) { - std::unique_ptr pEditObj = pEditEngine->CreateTextObject(); - std::unique_ptr pOPO( new OutlinerParaObject( *pEditObj ) ); - pEditObj.reset(); + std::unique_ptr pOPO( new OutlinerParaObject(pEditEngine->CreateTextObject()) ); pOPO->SetOutlinerMode( OutlinerMode::TextObject ); pObj->NbcSetOutlinerParaObject( std::move(pOPO) ); pObj->ActionChanged(); -- cgit