summaryrefslogtreecommitdiff
path: root/sc
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
parent407a677409707f017db464105aac51684126db44 (diff)
Remove unused parameters to clean it up a bit.
Change-Id: Ief629aea8b0df0b5a340871e13bc1a6e7c244816
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/column.hxx2
-rw-r--r--sc/inc/document.hxx4
-rw-r--r--sc/inc/formulacell.hxx2
-rw-r--r--sc/inc/table.hxx2
-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
-rw-r--r--sc/source/ui/docshell/docfunc.cxx2
-rw-r--r--sc/source/ui/view/viewfun2.cxx4
10 files changed, 20 insertions, 27 deletions
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index 5ef6cce7eaed..9850840ef30d 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -324,7 +324,7 @@ public:
void UpdateInsertTab(SCTAB nInsPos, SCTAB nNewSheets = 1);
void UpdateInsertTabOnlyCells(SCTAB nInsPos, SCTAB nNewSheets = 1);
- void UpdateDeleteTab(SCTAB nDelPos, bool bIsMove, ScColumn* pRefUndo = NULL, SCTAB nSheets = 1);
+ void UpdateDeleteTab(SCTAB nDelPos, SCTAB nSheets = 1);
void UpdateMoveTab(SCTAB nOldPos, SCTAB nNewPos, SCTAB nTabNo);
void UpdateCompile( bool bForceIfNameInUse = false );
void UpdateTranspose( const ScRange& rSource, const ScAddress& rDest,
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index d730a6fff2bb..09f08741aab8 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -589,8 +589,8 @@ public:
bool bExternalDocument = false );
SC_DLLPUBLIC bool InsertTabs( SCTAB nPos, const std::vector<OUString>& rNames,
bool bExternalDocument = false, bool bNamesValid = false );
- SC_DLLPUBLIC bool DeleteTabs( SCTAB nTab, SCTAB nSheets, ScDocument* pRefUndoDoc = NULL );
- SC_DLLPUBLIC bool DeleteTab( SCTAB nTab, ScDocument* pRefUndoDoc = NULL );
+ SC_DLLPUBLIC bool DeleteTabs( SCTAB nTab, SCTAB nSheets );
+ SC_DLLPUBLIC bool DeleteTab( SCTAB nTab );
SC_DLLPUBLIC bool RenameTab( SCTAB nTab, const OUString& rName,
bool bUpdateRef = true,
bool bExternalDocument = false );
diff --git a/sc/inc/formulacell.hxx b/sc/inc/formulacell.hxx
index 7260ea07f69a..d19c01cbbe97 100644
--- a/sc/inc/formulacell.hxx
+++ b/sc/inc/formulacell.hxx
@@ -211,7 +211,7 @@ public:
void UpdateInsertTab(SCTAB nTable, SCTAB nNewSheets = 1);
void UpdateInsertTabAbs(SCTAB nTable);
- bool UpdateDeleteTab(SCTAB nTable, bool bIsMove = false, SCTAB nSheets = 1);
+ bool UpdateDeleteTab(SCTAB nTable, SCTAB nSheets = 1);
void UpdateMoveTab(SCTAB nOldPos, SCTAB nNewPos, SCTAB nTabNo);
void UpdateRenameTab(SCTAB nTable, const OUString& rName);
bool TestTabRefAbs(SCTAB nTable);
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index 00cc7e52e4df..2ce8cacffc00 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -515,7 +515,7 @@ public:
void UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY );
void UpdateInsertTab(SCTAB nTable, SCTAB nNewSheets = 1);
- void UpdateDeleteTab( SCTAB nTable, bool bIsMove, ScTable* pRefUndo = NULL, SCTAB nSheets = 1 );
+ void UpdateDeleteTab( SCTAB nTable, SCTAB nSheets = 1 );
void UpdateMoveTab(SCTAB nOldPos, SCTAB nNewPos, SCTAB nTabNo, ScProgress* pProgress );
void UpdateCompile( bool bForceIfNameInUse = false );
void SetTabNo(SCTAB nNewTab);
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)
{
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index c272a2729e97..2b26a7399a34 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -3052,7 +3052,7 @@ sal_Bool ScDocFunc::DeleteTable( SCTAB nTab, sal_Bool bRecord, sal_Bool /* bApi
pUndoData = new ScRefUndoData( pDoc );
}
- if (pDoc->DeleteTab( nTab, pUndoDoc ))
+ if (pDoc->DeleteTab(nTab))
{
if (bRecord)
{
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 9ce1c27e5d72..790cbd1841b5 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -2086,7 +2086,7 @@ bool ScViewFunc::DeleteTables( const SCTAB nTab, SCTAB nSheets )
while ( nNewTab > 0 && !pDoc->IsVisible( nNewTab ) )
--nNewTab;
- if (pDoc->DeleteTabs(nTab, nSheets, NULL))
+ if (pDoc->DeleteTabs(nTab, nSheets))
{
if( bVbaEnabled )
{
@@ -2195,7 +2195,7 @@ sal_Bool ScViewFunc::DeleteTables(const vector<SCTAB> &TheTabs, sal_Bool bRecord
{
OUString sCodeName;
sal_Bool bHasCodeName = pDoc->GetCodeName( TheTabs[i], sCodeName );
- if (pDoc->DeleteTab( TheTabs[i], pUndoDoc ))
+ if (pDoc->DeleteTab(TheTabs[i]))
{
bDelDone = sal_True;
if( bVbaEnabled )