summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-05-10 09:15:20 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-05-10 12:13:31 +0200
commit95ceaa5c5572690e220cfac80fbaff8eb68dd940 (patch)
tree90346b9d1b28e4d0d924d352329c27416db3d9ff /sc/source
parent60cfdb9af53d4c5c976b52e3bf41bb54c779d169 (diff)
loplugin:checkunusedparams in sc(part2)
Change-Id: I1d54d16dbe5648a21baa9bf96444e60fcd034c81 Reviewed-on: https://gerrit.libreoffice.org/37457 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/data/documen2.cxx4
-rw-r--r--sc/source/core/data/dpcache.cxx6
-rw-r--r--sc/source/core/data/dpfilteredcache.cxx11
-rw-r--r--sc/source/core/data/dpobject.cxx4
-rw-r--r--sc/source/core/data/dpresfilter.cxx2
-rw-r--r--sc/source/core/data/dptabdat.cxx6
-rw-r--r--sc/source/core/data/dptabres.cxx2
-rw-r--r--sc/source/core/data/dptabsrc.cxx4
-rw-r--r--sc/source/core/data/table1.cxx2
-rw-r--r--sc/source/ui/view/printfun.cxx2
10 files changed, 14 insertions, 29 deletions
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index d9149ff1788f..5cd5bdbb6aa7 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -649,11 +649,11 @@ bool ScDocument::GetPrintArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow,
}
bool ScDocument::GetPrintAreaHor( SCTAB nTab, SCROW nStartRow, SCROW nEndRow,
- SCCOL& rEndCol, bool bNotes ) const
+ SCCOL& rEndCol ) const
{
if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
{
- bool bAny = maTabs[nTab]->GetPrintAreaHor( nStartRow, nEndRow, rEndCol, bNotes );
+ bool bAny = maTabs[nTab]->GetPrintAreaHor( nStartRow, nEndRow, rEndCol );
if (pDrawLayer)
{
ScRange aDrawRange(0,nStartRow,nTab, MAXCOL,nEndRow,nTab);
diff --git a/sc/source/core/data/dpcache.cxx b/sc/source/core/data/dpcache.cxx
index e73bee5e80d5..0afeedfe3580 100644
--- a/sc/source/core/data/dpcache.cxx
+++ b/sc/source/core/data/dpcache.cxx
@@ -1206,12 +1206,6 @@ sal_Int32 ScDPCache::GetGroupType(long nDim) const
return 0;
}
-SCROW ScDPCache::GetOrder(long /*nDim*/, SCROW nIndex)
-{
- return nIndex;
-}
-
-
#if DUMP_PIVOT_TABLE
namespace {
diff --git a/sc/source/core/data/dpfilteredcache.cxx b/sc/source/core/data/dpfilteredcache.cxx
index e43132cf38ee..d4b85c4369e0 100644
--- a/sc/source/core/data/dpfilteredcache.cxx
+++ b/sc/source/core/data/dpfilteredcache.cxx
@@ -170,8 +170,7 @@ void ScDPFilteredCache::fillTable(
}
SCROW nIndex = getCache().GetItemDataId(nCol, nRow, bRepeatIfEmpty);
- SCROW nOrder = getOrder(nCol, nIndex);
- aAdded[nOrder] = nIndex;
+ aAdded[nIndex] = nIndex;
// tdf#96588 - large numbers of trailing identical empty
// rows generate the same nIndex & nOrder.
@@ -217,8 +216,7 @@ void ScDPFilteredCache::fillTable()
for (SCROW nRow = 0; nRow < nRowCount; ++nRow)
{
SCROW nIndex = getCache().GetItemDataId(nCol, nRow, false);
- SCROW nOrder = getOrder(nCol, nIndex);
- aAdded[nOrder] = nIndex;
+ aAdded[nIndex] = nIndex;
}
for (SCROW nRow = 0; nRow < nMemCount; ++nRow)
{
@@ -368,11 +366,6 @@ void ScDPFilteredCache::filterTable(const vector<Criterion>& rCriteria, Sequence
rTabData[i] = tableData[i];
}
-SCROW ScDPFilteredCache::getOrder(long nDim, SCROW nIndex)
-{
- return ScDPCache::GetOrder(nDim, nIndex);
-}
-
void ScDPFilteredCache::clear()
{
maFieldEntries.clear();
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index 8fee2dd71f45..e012d727a33d 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -419,7 +419,7 @@ const ScRange& ScDPObject::GetOutRange() const
return aOutRange;
}
-void ScDPObject::SetSheetDesc(const ScSheetSourceDesc& rDesc, bool /*bFromRefUpdate*/)
+void ScDPObject::SetSheetDesc(const ScSheetSourceDesc& rDesc)
{
if ( pSheetDesc && rDesc == *pSheetDesc )
return; // nothing to do
@@ -1144,7 +1144,7 @@ void ScDPObject::WriteRefsTo( ScDPObject& r ) const
{
r.SetOutRange( aOutRange );
if ( pSheetDesc )
- r.SetSheetDesc( *pSheetDesc, true );
+ r.SetSheetDesc( *pSheetDesc );
}
void ScDPObject::GetPositionData(const ScAddress& rPos, DataPilotTablePositionData& rPosData)
diff --git a/sc/source/core/data/dpresfilter.cxx b/sc/source/core/data/dpresfilter.cxx
index 163782a94157..5ba161d7dc82 100644
--- a/sc/source/core/data/dpresfilter.cxx
+++ b/sc/source/core/data/dpresfilter.cxx
@@ -88,7 +88,7 @@ ScDPResultTree::~ScDPResultTree()
}
void ScDPResultTree::add(
- const std::vector<ScDPResultFilter>& rFilters, long /*nCol*/, long /*nRow*/, double fVal)
+ const std::vector<ScDPResultFilter>& rFilters, double fVal)
{
// TODO: I'll work on the col / row to value node mapping later.
diff --git a/sc/source/core/data/dptabdat.cxx b/sc/source/core/data/dptabdat.cxx
index 4b996827ad5a..5e44937bc04f 100644
--- a/sc/source/core/data/dptabdat.cxx
+++ b/sc/source/core/data/dptabdat.cxx
@@ -282,11 +282,9 @@ long ScDPTableData::Compare( long nDim, long nDataId1, long nDataId2)
if ( getIsDataLayoutDimension(nDim) )
return 0;
- long n1 = ScDPFilteredCache::getOrder(nDim, nDataId1);
- long n2 = ScDPFilteredCache::getOrder(nDim, nDataId2);
- if ( n1 > n2 )
+ if ( nDataId1 > nDataId2 )
return 1;
- else if ( n1 == n2 )
+ else if ( nDataId1 == nDataId2 )
return 0;
else
return -1;
diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx
index fb9e71031219..d9d4f35a8cd1 100644
--- a/sc/source/core/data/dptabres.cxx
+++ b/sc/source/core/data/dptabres.cxx
@@ -2152,7 +2152,7 @@ void ScDPDataMember::FillDataRow(
if ( bHasChild || bIsSubTotalRow )
rRes.Flags |= sheet::DataResultFlags::SUBTOTAL;
- rFilterCxt.maFilterSet.add(rFilterCxt.maFilters, rFilterCxt.mnCol, rFilterCxt.mnRow, rRes.Value);
+ rFilterCxt.maFilterSet.add(rFilterCxt.maFilters, rRes.Value);
rFilterCxt.mnCol += 1;
}
}
diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx
index e289ec995822..3537b46863ea 100644
--- a/sc/source/core/data/dptabsrc.cxx
+++ b/sc/source/core/data/dptabsrc.cxx
@@ -312,7 +312,7 @@ void ScDPSource::SetDupCount( long nNew )
nDupCount = nNew;
}
-ScDPDimension* ScDPSource::AddDuplicated(long /* nSource */, const OUString& rNewName)
+ScDPDimension* ScDPSource::AddDuplicated(const OUString& rNewName)
{
OSL_ENSURE( pDimensions.is(), "AddDuplicated without dimensions?" );
@@ -1382,7 +1382,7 @@ ScDPDimension* ScDPDimension::CreateCloneObject()
//TODO: set new name here, or temporary name ???
OUString aNewName = aName;
- ScDPDimension* pNew = pSource->AddDuplicated( nDim, aNewName );
+ ScDPDimension* pNew = pSource->AddDuplicated( aNewName );
pNew->aName = aNewName; //TODO: here or in source?
pNew->nSourceDim = nDim; //TODO: recursive?
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index 577a7859febd..73133b0c1933 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -675,7 +675,7 @@ bool ScTable::GetPrintArea( SCCOL& rEndCol, SCROW& rEndRow, bool bNotes ) const
}
bool ScTable::GetPrintAreaHor( SCROW nStartRow, SCROW nEndRow,
- SCCOL& rEndCol, bool /* bNotes */ ) const
+ SCCOL& rEndCol ) const
{
bool bFound = false;
SCCOL nMaxX = 0;
diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx
index 6c99a32a6605..a4edfae9770d 100644
--- a/sc/source/ui/view/printfun.cxx
+++ b/sc/source/ui/view/printfun.cxx
@@ -691,7 +691,7 @@ bool ScPrintFunc::AdjustPrintArea( bool bNew )
if ( bChangeCol && bChangeRow )
bFound = pDoc->GetPrintArea( nPrintTab, nEndCol, nEndRow, bNotes );
else if ( bChangeCol )
- bFound = pDoc->GetPrintAreaHor( nPrintTab, nStartRow, nEndRow, nEndCol, bNotes );
+ bFound = pDoc->GetPrintAreaHor( nPrintTab, nStartRow, nEndRow, nEndCol );
else if ( bChangeRow )
bFound = pDoc->GetPrintAreaVer( nPrintTab, nStartCol, nEndCol, nEndRow, bNotes );