summaryrefslogtreecommitdiff
path: root/sc/source/core
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-07-25 21:47:39 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-07-30 23:49:54 -0400
commit43bb6f2b562f20dc8bf6d46fe1748f0bbeccf526 (patch)
tree697b99e03c224f9def2cdac78cfb4b7bff459c06 /sc/source/core
parent407a677409707f017db464105aac51684126db44 (diff)
Remove unused parameters to clean it up a bit.
Change-Id: Ief629aea8b0df0b5a340871e13bc1a6e7c244816
Diffstat (limited to 'sc/source/core')
-rw-r--r--sc/source/core/data/column.cxx10
-rw-r--r--sc/source/core/data/document.cxx10
-rw-r--r--sc/source/core/data/formulacell.cxx2
-rw-r--r--sc/source/core/data/table1.cxx9
4 files changed, 12 insertions, 19 deletions
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index 523362918688..94a08b1aeca0 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -2443,21 +2443,19 @@ class DeleteTabUpdater
SCTAB mnDelPos;
SCTAB mnSheets;
SCTAB mnTab;
- bool mbIsMove;
bool mbModified;
public:
- DeleteTabUpdater(sc::CellTextAttrStoreType& rTextAttrs, SCTAB nDelPos, SCTAB nSheets, SCTAB nTab, bool bIsMove) :
+ DeleteTabUpdater(sc::CellTextAttrStoreType& rTextAttrs, SCTAB nDelPos, SCTAB nSheets, SCTAB nTab) :
mrTextAttrs(rTextAttrs),
miAttrPos(rTextAttrs.begin()),
mnDelPos(nDelPos),
mnSheets(nSheets),
mnTab(nTab),
- mbIsMove(bIsMove),
mbModified(false) {}
void operator() (size_t, ScFormulaCell* pCell)
{
- pCell->UpdateDeleteTab(mnDelPos, mbIsMove, mnSheets);
+ pCell->UpdateDeleteTab(mnDelPos, mnSheets);
mbModified = true;
}
@@ -2892,7 +2890,7 @@ void ScColumn::UpdateInsertTabOnlyCells(SCTAB nInsPos, SCTAB nNewSheets)
CellStorageModified();
}
-void ScColumn::UpdateDeleteTab(SCTAB nDelPos, bool bIsMove, ScColumn* /*pRefUndo*/, SCTAB nSheets)
+void ScColumn::UpdateDeleteTab(SCTAB nDelPos, SCTAB nSheets)
{
if (nTab > nDelPos)
{
@@ -2900,7 +2898,7 @@ void ScColumn::UpdateDeleteTab(SCTAB nDelPos, bool bIsMove, ScColumn* /*pRefUndo
pAttrArray->SetTab(nTab);
}
- DeleteTabUpdater aFunc(maCellTextAttrs, nDelPos, nSheets, nTab, bIsMove);
+ DeleteTabUpdater aFunc(maCellTextAttrs, nDelPos, nSheets, nTab);
sc::ProcessFormulaEditText(maCells, aFunc);
if (aFunc.isModified())
CellStorageModified();
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index ef73c7cf4b40..e6b281a68bad 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -604,7 +604,7 @@ bool ScDocument::InsertTabs( SCTAB nPos, const std::vector<OUString>& rNames,
}
-bool ScDocument::DeleteTab( SCTAB nTab, ScDocument* pRefUndoDoc )
+bool ScDocument::DeleteTab( SCTAB nTab )
{
bool bValid = false;
if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()))
@@ -653,8 +653,7 @@ bool ScDocument::DeleteTab( SCTAB nTab, ScDocument* pRefUndoDoc )
for (SCTAB i = 0, n = static_cast<SCTAB>(maTabs.size()); i < n; ++i)
if (maTabs[i])
- maTabs[i]->UpdateDeleteTab(
- nTab, false, pRefUndoDoc ? pRefUndoDoc->maTabs[i] : 0);
+ maTabs[i]->UpdateDeleteTab(nTab);
TableContainer::iterator it = maTabs.begin() + nTab;
delete *it;
@@ -689,7 +688,7 @@ bool ScDocument::DeleteTab( SCTAB nTab, ScDocument* pRefUndoDoc )
}
-bool ScDocument::DeleteTabs( SCTAB nTab, SCTAB nSheets, ScDocument* pRefUndoDoc )
+bool ScDocument::DeleteTabs( SCTAB nTab, SCTAB nSheets )
{
bool bValid = false;
if (ValidTab(nTab) && (nTab + nSheets) < static_cast<SCTAB>(maTabs.size()))
@@ -740,8 +739,7 @@ bool ScDocument::DeleteTabs( SCTAB nTab, SCTAB nSheets, ScDocument* pRefUndoDoc
for (SCTAB i = 0, n = static_cast<SCTAB>(maTabs.size()); i < n; ++i)
if (maTabs[i])
- maTabs[i]->UpdateDeleteTab(
- nTab, false, pRefUndoDoc ? pRefUndoDoc->maTabs[i] : 0,nSheets);
+ maTabs[i]->UpdateDeleteTab(nTab, nSheets);
TableContainer::iterator it = maTabs.begin() + nTab;
TableContainer::iterator itEnd = it + nSheets;
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index b20fa0c28d88..11388e8eddf3 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -2575,7 +2575,7 @@ void ScFormulaCell::UpdateInsertTab(SCTAB nTable, SCTAB nNewSheets)
// no StartListeningTo because the new sheets have not been inserted yet.
}
-bool ScFormulaCell::UpdateDeleteTab(SCTAB nTable, bool /*bIsMove*/, SCTAB nSheets)
+bool ScFormulaCell::UpdateDeleteTab(SCTAB nTable, SCTAB nSheets)
{
bool bPosChanged = ( aPos.Tab() >= nTable + nSheets ? true : false );
pCode->Reset();
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index ba9ada3b0772..74d41f7d4263 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -1603,7 +1603,7 @@ void ScTable::UpdateInsertTab(SCTAB nTable, SCTAB nNewSheets)
mpCondFormatList->UpdateReference( URM_INSDEL, ScRange(0,0, nTable, MAXCOL, MAXROW, nTable+nNewSheets-1),0,0, nNewSheets);
}
-void ScTable::UpdateDeleteTab( SCTAB nTable, bool bIsMove, ScTable* pRefUndo, SCTAB nSheets )
+void ScTable::UpdateDeleteTab( SCTAB nTable, SCTAB nSheets )
{
if (nTab > nTable)
{
@@ -1612,11 +1612,8 @@ void ScTable::UpdateDeleteTab( SCTAB nTable, bool bIsMove, ScTable* pRefUndo, SC
pDBDataNoName->UpdateMoveTab(nTab + 1,nTab);
}
- SCCOL i;
- if (pRefUndo)
- for (i=0; i <= MAXCOL; i++) aCol[i].UpdateDeleteTab(nTable, bIsMove, &pRefUndo->aCol[i], nSheets);
- else
- for (i=0; i <= MAXCOL; i++) aCol[i].UpdateDeleteTab(nTable, bIsMove, NULL, nSheets);
+ for (SCCOL i = 0; i <= MAXCOL; ++i)
+ aCol[i].UpdateDeleteTab(nTable, nSheets);
if (mpRangeName)
{