diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-09-24 08:26:46 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-09-24 10:50:56 +0200 |
commit | e1600348e49e1538459a0374fd97cd3173d4a4b9 (patch) | |
tree | 0fce6d86a668841fe2c64b025b4c1f3373866fa4 /sc/source/filter | |
parent | c183a6eb292b31c7fb24f751630960f2035353c5 (diff) |
no need to allocate this SfxItemSet on the heap
Change-Id: If398e3725b691491e51e49eadeb37a7fdaad63db
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122554
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/filter')
-rw-r--r-- | sc/source/filter/excel/xiescher.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlcelli.cxx | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx index 9ccd3521c391..6677578801e4 100644 --- a/sc/source/filter/excel/xiescher.cxx +++ b/sc/source/filter/excel/xiescher.cxx @@ -1866,7 +1866,7 @@ void XclImpNoteObj::DoPreProcessSdrObj( XclImpDffConverter& rDffConv, SdrObject& // create cell note with all data from drawing object ScNoteUtil::CreateNoteFromObjectData( GetDoc(), maScPos, - rSdrObj.GetMergedItemSet().Clone(), // new object on heap expected + rSdrObj.GetMergedItemSet().CloneAsValue(), // new object on heap expected *pOutlinerObj, rSdrObj.GetLogicRect(), ::get_flag( mnNoteFlags, EXC_NOTE_VISIBLE ) ); diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx index 238befc186a5..46e6069268e2 100644 --- a/sc/source/filter/xml/xmlcelli.cxx +++ b/sc/source/filter/xml/xmlcelli.cxx @@ -860,7 +860,7 @@ void ScXMLTableRowCellContext::SetAnnotation(const ScAddress& rPos) if( pObject ) { // rescue settings from drawing object before the shape is removed - ::std::unique_ptr< SfxItemSet > xItemSet( new SfxItemSet( pObject->GetMergedItemSet() ) ); + SfxItemSet aItemSet( pObject->GetMergedItemSet() ); std::optional<OutlinerParaObject> pOutlinerObj; if (auto p = pObject->GetOutlinerParaObject()) pOutlinerObj = *p; @@ -881,14 +881,14 @@ void ScXMLTableRowCellContext::SetAnnotation(const ScAddress& rPos) if(!comphelper::LibreOfficeKit::isActive()) { pNote = ScNoteUtil::CreateNoteFromObjectData( *pDoc, rPos, - std::move(xItemSet), *pOutlinerObj, - aCaptionRect, mxAnnotationData->mbShown ); + std::move(aItemSet), *pOutlinerObj, + aCaptionRect, mxAnnotationData->mbShown ); } else { pNote = ScNoteUtil::CreateNoteFromObjectData( *pDoc, rPos, - std::move(xItemSet), *pOutlinerObj, - aCaptionRect, false ); + std::move(aItemSet), *pOutlinerObj, + aCaptionRect, false ); } } |