summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-10-10 19:29:16 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-10-10 22:19:40 +0200
commit06bc9956769cef5e0f45d621453517e95845bbdb (patch)
tree47cf7883def6843284041a6b25c5b7234781a4d8 /sc
parentfb8973f31f111229be5184f4e4223e963ced2c7b (diff)
we throw away the original of the clone
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 <caolanm@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/excel/xiescher.cxx2
-rw-r--r--sc/source/ui/unoobj/editsrc.cxx4
2 files changed, 2 insertions, 4 deletions
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<OutlinerParaObject> pOutlineObj(new OutlinerParaObject( *xEditObj ));
+ std::unique_ptr<OutlinerParaObject> 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<EditTextObject> pEditObj = pEditEngine->CreateTextObject();
- std::unique_ptr<OutlinerParaObject> pOPO( new OutlinerParaObject( *pEditObj ) );
- pEditObj.reset();
+ std::unique_ptr<OutlinerParaObject> pOPO( new OutlinerParaObject(pEditEngine->CreateTextObject()) );
pOPO->SetOutlinerMode( OutlinerMode::TextObject );
pObj->NbcSetOutlinerParaObject( std::move(pOPO) );
pObj->ActionChanged();