summaryrefslogtreecommitdiff
path: root/sc/source/core
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-08-20 11:15:17 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-08-20 13:59:25 +0200
commit316b07d0af06948c69c1375c67c01903b8eeb134 (patch)
treed51f01c2f443c82de5a078b90f189af787308ccf /sc/source/core
parentff6e8c73adef7c86db12287948025954a4fc7746 (diff)
loplugin:constvars in package..sc
Change-Id: Ibaa9ebd6440d9229ba313f4c130f5752d432b338 Reviewed-on: https://gerrit.libreoffice.org/77792 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/core')
-rw-r--r--sc/source/core/data/bcaslot.cxx2
-rw-r--r--sc/source/core/data/documen3.cxx2
-rw-r--r--sc/source/core/data/documen7.cxx2
-rw-r--r--sc/source/core/data/documen8.cxx2
-rw-r--r--sc/source/core/data/document10.cxx2
-rw-r--r--sc/source/core/data/formulacell.cxx2
-rw-r--r--sc/source/core/data/table2.cxx4
-rw-r--r--sc/source/core/data/table3.cxx2
-rw-r--r--sc/source/core/opencl/op_math.cxx2
-rw-r--r--sc/source/core/opencl/op_statistical.cxx4
-rw-r--r--sc/source/core/tool/chgtrack.cxx2
-rw-r--r--sc/source/core/tool/dbdata.cxx2
-rw-r--r--sc/source/core/tool/jumpmatrix.cxx2
-rw-r--r--sc/source/core/tool/parclass.cxx2
-rw-r--r--sc/source/core/tool/rangelst.cxx10
15 files changed, 21 insertions, 21 deletions
diff --git a/sc/source/core/data/bcaslot.cxx b/sc/source/core/data/bcaslot.cxx
index d01c9dc32dfe..73e9c749d5c9 100644
--- a/sc/source/core/data/bcaslot.cxx
+++ b/sc/source/core/data/bcaslot.cxx
@@ -650,7 +650,7 @@ inline SCSIZE ScBroadcastAreaSlotMachine::ComputeSlotOffset(
OSL_FAIL( "Row/Col invalid, using first slot!" );
return 0;
}
- for (ScSlotData & i : aSlotDistribution)
+ for (const ScSlotData & i : aSlotDistribution)
{
if (nRow < i.nStopRow)
{
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index 3177f0adc888..8a0bd5ff47bc 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -204,7 +204,7 @@ bool ScDocument::IsAddressInRangeName( RangeNameScope eScope, const ScAddress& r
else
pRangeNames= GetRangeName(rAddress.Tab());
- for (auto& rEntry : *pRangeNames)
+ for (const auto& rEntry : *pRangeNames)
{
if (rEntry.second->IsValidReference(aNameRange))
{
diff --git a/sc/source/core/data/documen7.cxx b/sc/source/core/data/documen7.cxx
index 98e5321253a2..50ce32431e8f 100644
--- a/sc/source/core/data/documen7.cxx
+++ b/sc/source/core/data/documen7.cxx
@@ -365,7 +365,7 @@ void ScDocument::CalcFormulaTree( bool bOnlyForced, bool bProgressBar, bool bSet
}
pCell = pCell->GetNext();
}
- for (auto& rpCell : vAlwaysDirty)
+ for (const auto& rpCell : vAlwaysDirty)
{
pCell = rpCell;
if (!pCell->GetDirty())
diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx
index 7440e84a4f95..2c1fd4ec00bd 100644
--- a/sc/source/core/data/documen8.cxx
+++ b/sc/source/core/data/documen8.cxx
@@ -431,7 +431,7 @@ const ScDocumentThreadSpecific& ScDocument::CalculateInColumnInThread( ScInterpr
void ScDocument::HandleStuffAfterParallelCalculation( const ScAddress& rTopPos, size_t nLen )
{
assert(!IsThreadedGroupCalcInProgress());
- for( DelayedSetNumberFormat& data : GetNonThreadedContext().maDelayedSetNumberFormat)
+ for( const DelayedSetNumberFormat& data : GetNonThreadedContext().maDelayedSetNumberFormat)
SetNumberFormat( ScAddress( rTopPos.Col(), data.mRow, rTopPos.Tab()), data.mnNumberFormat );
GetNonThreadedContext().maDelayedSetNumberFormat.clear();
diff --git a/sc/source/core/data/document10.cxx b/sc/source/core/data/document10.cxx
index 877809901297..064196ef6806 100644
--- a/sc/source/core/data/document10.cxx
+++ b/sc/source/core/data/document10.cxx
@@ -519,7 +519,7 @@ void ScDocument::StartAllListeners( const ScRange& rRange )
void ScDocument::finalizeOutlineImport()
{
- for (auto& rxTab : maTabs)
+ for (const auto& rxTab : maTabs)
{
ScTable* p = rxTab.get();
p->finalizeOutlineImport();
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index 3daf8c4442af..d82e58ef6ffe 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -583,7 +583,7 @@ sc::FormulaGroupAreaListener* ScFormulaCellGroup::getAreaListener(
void ScFormulaCellGroup::endAllGroupListening( ScDocument& rDoc )
{
- for (auto& rEntry : mpImpl->m_AreaListeners)
+ for (const auto& rEntry : mpImpl->m_AreaListeners)
{
sc::FormulaGroupAreaListener *const pListener = rEntry.second.get();
ScRange aListenRange = pListener->getListeningRange();
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 25779341e2f5..df0a1517f63a 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -2058,7 +2058,7 @@ bool ScTable::HasAttribSelection( const ScMarkData& rMark, HasAttrFlags nMask )
{
std::vector<sc::ColRowSpan> aSpans = rMark.GetMarkedColSpans();
- for (sc::ColRowSpan & aSpan : aSpans)
+ for (const sc::ColRowSpan & aSpan : aSpans)
{
for (SCCOLROW j = aSpan.mnStart; j <= aSpan.mnEnd; ++j)
{
@@ -2361,7 +2361,7 @@ bool ScTable::HasSelectionMatrixFragment( const ScMarkData& rMark ) const
{
std::vector<sc::ColRowSpan> aSpans = rMark.GetMarkedColSpans();
- for (sc::ColRowSpan & aSpan : aSpans)
+ for (const sc::ColRowSpan & aSpan : aSpans)
{
SCCOL nEndCol = ClampToAllocatedColumns(aSpan.mnEnd);
for ( SCCOLROW j=aSpan.mnStart; j<=nEndCol; j++ )
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index 270603aa97e8..94a84b0cf941 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -1177,7 +1177,7 @@ void ScTable::SortReorderByRowRefUpdate(
aMoveRange, sc::AreaOverlapType::InsideOrOverlap, sc::ListenerGroupType::Group);
{
- for (auto& rGrpListener : aGrpListeners)
+ for (const auto& rGrpListener : aGrpListeners)
{
assert(rGrpListener.mbGroupListening);
SvtListener* pGrpLis = rGrpListener.mpListener;
diff --git a/sc/source/core/opencl/op_math.cxx b/sc/source/core/opencl/op_math.cxx
index 4ed984941d87..13f341b08a04 100644
--- a/sc/source/core/opencl/op_math.cxx
+++ b/sc/source/core/opencl/op_math.cxx
@@ -2373,7 +2373,7 @@ void OpSumSQ::GenSlidingWindowFunction(std::stringstream &ss,
ss << "{\n";
ss << " int gid0=get_global_id(0);\n";
ss << " double sum = 0.0f, arg;\n";
- for(DynamicKernelArgumentRef & rArg : vSubArguments)
+ for(const DynamicKernelArgumentRef & rArg : vSubArguments)
{
FormulaToken *tmpCur = rArg->GetFormulaToken();
assert(tmpCur);
diff --git a/sc/source/core/opencl/op_statistical.cxx b/sc/source/core/opencl/op_statistical.cxx
index 863f1be4db8c..ad0cf0358223 100644
--- a/sc/source/core/opencl/op_statistical.cxx
+++ b/sc/source/core/opencl/op_statistical.cxx
@@ -3415,7 +3415,7 @@ void OpGeoMean::GenSlidingWindowFunction(
ss << " int offset;\n";
ss << " barrier(CLK_LOCAL_MEM_FENCE);\n";
- for(DynamicKernelArgumentRef & rArg : vSubArguments)
+ for(const DynamicKernelArgumentRef & rArg : vSubArguments)
{
assert(rArg->GetFormulaToken());
@@ -4723,7 +4723,7 @@ void OpMedian::GenSlidingWindowFunction(
ss << " unsigned int startFlag = 0;\n";
ss << " unsigned int endFlag = 0;\n";
ss << " double dataIna;\n";
- for (DynamicKernelArgumentRef & rArg : vSubArguments)
+ for (const DynamicKernelArgumentRef & rArg : vSubArguments)
{
FormulaToken *pCur = rArg->GetFormulaToken();
assert(pCur);
diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx
index 9d9cab039814..d7f92341a634 100644
--- a/sc/source/core/tool/chgtrack.cxx
+++ b/sc/source/core/tool/chgtrack.cxx
@@ -2131,7 +2131,7 @@ void ScChangeTrack::DtorClear()
pNext = p->GetNext();
delete p;
}
- for( auto& rEntry : aPasteCutMap )
+ for( const auto& rEntry : aPasteCutMap )
{
delete rEntry.second;
}
diff --git a/sc/source/core/tool/dbdata.cxx b/sc/source/core/tool/dbdata.cxx
index c2076413e404..867952b88683 100644
--- a/sc/source/core/tool/dbdata.cxx
+++ b/sc/source/core/tool/dbdata.cxx
@@ -1427,7 +1427,7 @@ void ScDBCollection::DeleteOnTab( SCTAB nTab )
}
// Delete them all.
- for (auto& rIter : v)
+ for (const auto& rIter : v)
maNamedDBs.erase(rIter);
maAnonDBs.deleteOnTab(nTab);
diff --git a/sc/source/core/tool/jumpmatrix.cxx b/sc/source/core/tool/jumpmatrix.cxx
index f3eb438cb940..2bf712f649de 100644
--- a/sc/source/core/tool/jumpmatrix.cxx
+++ b/sc/source/core/tool/jumpmatrix.cxx
@@ -52,7 +52,7 @@ ScJumpMatrix::ScJumpMatrix( OpCode eOp, SCSIZE nColsP, SCSIZE nRowsP )
ScJumpMatrix::~ScJumpMatrix()
{
- for (auto & i : mvParams)
+ for (const auto & i : mvParams)
i->DecRef();
}
diff --git a/sc/source/core/tool/parclass.cxx b/sc/source/core/tool/parclass.cxx
index 18c4ad5b84f7..bb6c943299a6 100644
--- a/sc/source/core/tool/parclass.cxx
+++ b/sc/source/core/tool/parclass.cxx
@@ -329,7 +329,7 @@ void ScParameterClassification::Init()
pRun->aData.nParam[CommonData::nMaxParams-1] != Bounds)
pRun->nMinParams = CommonData::nMaxParams;
}
- for (formula::ParamClass & j : pRun->aData.nParam)
+ for (const formula::ParamClass & j : pRun->aData.nParam)
{
if ( j == ForceArray || j == ReferenceOrForceArray )
{
diff --git a/sc/source/core/tool/rangelst.cxx b/sc/source/core/tool/rangelst.cxx
index 1af32fe41de5..4298bb1ea92e 100644
--- a/sc/source/core/tool/rangelst.cxx
+++ b/sc/source/core/tool/rangelst.cxx
@@ -404,7 +404,7 @@ bool ScRangeList::UpdateReference(
void ScRangeList::InsertRow( SCTAB nTab, SCCOL nColStart, SCCOL nColEnd, SCROW nRowPos, SCSIZE nSize )
{
std::vector<ScRange> aNewRanges;
- for(auto & rRange : maRanges)
+ for(const auto & rRange : maRanges)
{
if(rRange.aStart.Tab() <= nTab && rRange.aEnd.Tab() >= nTab)
{
@@ -422,7 +422,7 @@ void ScRangeList::InsertRow( SCTAB nTab, SCCOL nColStart, SCCOL nColEnd, SCROW n
}
}
- for(auto & rRange : aNewRanges)
+ for(const auto & rRange : aNewRanges)
{
if(!rRange.IsValid())
continue;
@@ -434,7 +434,7 @@ void ScRangeList::InsertRow( SCTAB nTab, SCCOL nColStart, SCCOL nColEnd, SCROW n
void ScRangeList::InsertCol( SCTAB nTab, SCROW nRowStart, SCROW nRowEnd, SCCOL nColPos, SCSIZE nSize )
{
std::vector<ScRange> aNewRanges;
- for(auto & rRange : maRanges)
+ for(const auto & rRange : maRanges)
{
if(rRange.aStart.Tab() <= nTab && rRange.aEnd.Tab() >= nTab)
{
@@ -450,7 +450,7 @@ void ScRangeList::InsertCol( SCTAB nTab, SCROW nRowStart, SCROW nRowEnd, SCCOL n
}
}
- for(auto & rRange : aNewRanges)
+ for(const auto & rRange : aNewRanges)
{
if(!rRange.IsValid())
continue;
@@ -954,7 +954,7 @@ bool ScRangeList::DeleteArea( SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
continue;
}
}
- for(auto & rRange : aNewRanges)
+ for(const auto & rRange : aNewRanges)
Join(rRange);
return bChanged;