diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-11-01 10:39:45 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-11-01 13:09:25 +0100 |
commit | 35975f9ea30e9ec8ac9276f90874ffe272001038 (patch) | |
tree | 188ea402a985f6f6915e793ffc1c5ca8780f0aca /sc | |
parent | 2f9a6802793467823ce47a255591ff9e023a6dec (diff) |
pass SfxItemSet by const & to CreateNoteFromObjectData
Because in an upcoming patch the CloneAsValue() call in
XclImpNoteObj::DoPreProcessSdrObj will stop working, because the
underlying SfxItemSet will no longer be an SfxAllItemSet
Change-Id: I8361a1b1c1c64cff49c736812fbfb2597ab41140
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158750
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/postit.hxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/postit.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/excel/xiescher.cxx | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/sc/inc/postit.hxx b/sc/inc/postit.hxx index df114eaf64a5..5e7f6f81d16f 100644 --- a/sc/inc/postit.hxx +++ b/sc/inc/postit.hxx @@ -246,7 +246,7 @@ public: */ static ScPostIt* CreateNoteFromObjectData( ScDocument& rDoc, const ScAddress& rPos, - SfxItemSet&& oItemSet, const OUString& rStyleName, + const SfxItemSet& rItemSet, const OUString& rStyleName, const OutlinerParaObject& rOutlinerObj, const tools::Rectangle& rCaptionRect, bool bShown ); diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx index e46836f12e53..fa84f0212b81 100644 --- a/sc/source/core/data/postit.cxx +++ b/sc/source/core/data/postit.cxx @@ -957,14 +957,14 @@ ScNoteData ScNoteUtil::CreateNoteData(ScDocument& rDoc, const ScAddress& rPos, } ScPostIt* ScNoteUtil::CreateNoteFromObjectData( - ScDocument& rDoc, const ScAddress& rPos, SfxItemSet&& rItemSet, const OUString& rStyleName, + ScDocument& rDoc, const ScAddress& rPos, const SfxItemSet& rItemSet, const OUString& rStyleName, const OutlinerParaObject& rOutlinerObj, const tools::Rectangle& rCaptionRect, bool bShown ) { ScNoteData aNoteData(CreateNoteData(rDoc, rPos, rCaptionRect, bShown)); ScCaptionInitData& rInitData = *aNoteData.mxInitData; rInitData.mxOutlinerObj = rOutlinerObj; - rInitData.moItemSet.emplace(std::move(rItemSet)); + rInitData.moItemSet.emplace(rItemSet); rInitData.maStyleName = ScStyleNameConversion::ProgrammaticToDisplayName(rStyleName, SfxStyleFamily::Frame); return InsertNote(rDoc, rPos, std::move(aNoteData), /*bAlwaysCreateCaption*/false, 0/*nPostItId*/); diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx index 3f5969cead78..62e35213a045 100644 --- a/sc/source/filter/excel/xiescher.cxx +++ b/sc/source/filter/excel/xiescher.cxx @@ -1876,7 +1876,7 @@ void XclImpNoteObj::DoPreProcessSdrObj( XclImpDffConverter& rDffConv, SdrObject& // create cell note with all data from drawing object ScNoteUtil::CreateNoteFromObjectData( GetDoc(), maScPos, - rSdrObj.GetMergedItemSet().CloneAsValue(), // new object on heap expected + rSdrObj.GetMergedItemSet(), OUString(), *pOutlinerObj, rSdrObj.GetLogicRect(), ::get_flag( mnNoteFlags, EXC_NOTE_VISIBLE ) ); |