From 783f943ebaf84731767a176012f4329dc3ae39d5 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 26 Aug 2024 08:50:57 +0100 Subject: cid#1555526 COPY_INSTEAD_OF_MOVE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit and cid#1555615 COPY_INSTEAD_OF_MOVE cid#1555637 COPY_INSTEAD_OF_MOVE cid#1555640 COPY_INSTEAD_OF_MOVE cid#1555768 COPY_INSTEAD_OF_MOVE cid#1555840 COPY_INSTEAD_OF_MOVE cid#1556731 COPY_INSTEAD_OF_MOVE cid#1556751 COPY_INSTEAD_OF_MOVE cid#1556807 COPY_INSTEAD_OF_MOVE cid#1558026 COPY_INSTEAD_OF_MOVE cid#1558032 COPY_INSTEAD_OF_MOVE just silence these Change-Id: I8a120bb0badc8d2987c41768ec116a78324e9821 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172515 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara --- sc/source/core/data/clipcontext.cxx | 2 +- sc/source/core/data/column.cxx | 3 +-- sc/source/core/data/column3.cxx | 4 ++-- sc/source/core/data/document.cxx | 3 +-- sc/source/core/data/document10.cxx | 6 +++--- sc/source/core/data/table4.cxx | 2 +- sc/source/ui/unoobj/chart2uno.cxx | 2 +- 7 files changed, 10 insertions(+), 12 deletions(-) diff --git a/sc/source/core/data/clipcontext.cxx b/sc/source/core/data/clipcontext.cxx index bccbdf0a086e..579f7928b57e 100644 --- a/sc/source/core/data/clipcontext.cxx +++ b/sc/source/core/data/clipcontext.cxx @@ -151,7 +151,7 @@ public: void CopyFromClipContext::startListeningFormulas() { - auto pSet = std::make_shared(mrDestDoc); + const auto pSet = std::make_shared(mrDestDoc); sc::StartListeningContext aStartCxt(mrDestDoc, pSet); sc::EndListeningContext aEndCxt(mrDestDoc, pSet, nullptr); diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx index f744f741f1b5..2c1db80ce2c3 100644 --- a/sc/source/core/data/column.cxx +++ b/sc/source/core/data/column.cxx @@ -2156,8 +2156,7 @@ class UpdateRefOnNonCopy // Make sure that the start and end listening contexts share the // same block position set, else an invalid iterator may ensue. - auto pPosSet = std::make_shared(mpCxt->mrDoc); - + const auto pPosSet = std::make_shared(mpCxt->mrDoc); sc::StartListeningContext aStartCxt(mpCxt->mrDoc, pPosSet); sc::EndListeningContext aEndCxt(mpCxt->mrDoc, pPosSet, &aOldCode); diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx index 26fcd36de0ba..1b4ccafa5d54 100644 --- a/sc/source/core/data/column3.cxx +++ b/sc/source/core/data/column3.cxx @@ -437,7 +437,7 @@ void ScColumn::StartListeningUnshared( const std::vector& rNewSharedRows if (rNewSharedRows.empty() || rDoc.IsDelayedFormulaGrouping()) return; - auto pPosSet = std::make_shared(rDoc); + const auto pPosSet = std::make_shared(rDoc); sc::StartListeningContext aStartCxt(rDoc, pPosSet); sc::EndListeningContext aEndCxt(rDoc, pPosSet); if (rNewSharedRows.size() >= 2) @@ -708,7 +708,7 @@ void ScColumn::AttachNewFormulaCell( { case sc::ConvertToGroupListening: { - auto pPosSet = std::make_shared(rDocument); + const auto pPosSet = std::make_shared(rDocument); sc::StartListeningContext aStartCxt(rDocument, pPosSet); sc::EndListeningContext aEndCxt(rDocument, pPosSet); SCROW nStartRow, nEndRow; diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index b631e74a6a22..bbce2d15031b 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -2627,8 +2627,7 @@ void ScDocument::StartListeningFromClip( SCCOL nCol1, SCROW nRow1, if (!(nInsFlag & InsertDeleteFlags::CONTENTS)) return; - auto pSet = std::make_shared(*this); - + const auto pSet = std::make_shared(*this); sc::StartListeningContext aStartCxt(*this, pSet); sc::EndListeningContext aEndCxt(*this, pSet, nullptr); diff --git a/sc/source/core/data/document10.cxx b/sc/source/core/data/document10.cxx index a958a9b1543c..e41a3affd91a 100644 --- a/sc/source/core/data/document10.cxx +++ b/sc/source/core/data/document10.cxx @@ -225,7 +225,7 @@ void ScDocument::SwapNonEmpty( sc::TableValues& rValues ) if (!rRange.IsValid()) return; - auto pPosSet = std::make_shared(*this); + const auto pPosSet = std::make_shared(*this); sc::StartListeningContext aStartCxt(*this, pPosSet); sc::EndListeningContext aEndCxt(*this, pPosSet); @@ -409,7 +409,7 @@ void ScDocument::EnableDelayStartListeningFormulaCells( ScColumn* column, bool d { if( it->second.first != -1 ) { - auto pPosSet = std::make_shared(*this); + const auto pPosSet = std::make_shared(*this); sc::StartListeningContext aStartCxt(*this, pPosSet); sc::EndListeningContext aEndCxt(*this, pPosSet); column->StartListeningFormulaCells(aStartCxt, aEndCxt, it->second.first, it->second.second); @@ -563,7 +563,7 @@ void ScDocument::StartAllListeners( const ScRange& rRange ) if (IsClipOrUndo() || GetNoListening()) return; - auto pPosSet = std::make_shared(*this); + const auto pPosSet = std::make_shared(*this); sc::StartListeningContext aStartCxt(*this, pPosSet); sc::EndListeningContext aEndCxt(*this, pPosSet); diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx index 56588d6df5fb..9f33d0dc6d24 100644 --- a/sc/source/core/data/table4.cxx +++ b/sc/source/core/data/table4.cxx @@ -1808,7 +1808,7 @@ void ScTable::FillFormulaVertical( aCol[nCol].DeleteRanges(aSpans, InsertDeleteFlags::VALUE | InsertDeleteFlags::DATETIME | InsertDeleteFlags::STRING | InsertDeleteFlags::FORMULA | InsertDeleteFlags::OUTLINE); aCol[nCol].CloneFormulaCell(rSrcCell, sc::CellTextAttr(), aSpans); - auto pSet = std::make_shared(rDocument); + const auto pSet = std::make_shared(rDocument); sc::StartListeningContext aStartCxt(rDocument, pSet); sc::EndListeningContext aEndCxt(rDocument, pSet); diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx index e82c5c2f8b6e..11519b2ff3ad 100644 --- a/sc/source/ui/unoobj/chart2uno.cxx +++ b/sc/source/ui/unoobj/chart2uno.cxx @@ -925,7 +925,7 @@ private: return false; bool bExternal = ScRefTokenHelper::isExternalRef(pToken); sal_uInt16 nFileId = bExternal ? pToken->GetIndex() : 0; - svl::SharedString aTabName = bExternal ? pToken->GetString() : svl::SharedString::getEmptyString(); + const svl::SharedString aTabName = bExternal ? pToken->GetString() : svl::SharedString::getEmptyString(); // In saving to XML, we don't prepend address with '$'. setRelative(aData.Ref1); -- cgit