sc/inc/column.hxx                   |    2 +-
 sc/inc/document.hxx                 |    4 ++--
 sc/inc/formulacell.hxx              |    2 +-
 sc/inc/table.hxx                    |    2 +-
 sc/source/core/data/column.cxx      |   10 ++++------
 sc/source/core/data/document.cxx    |   10 ++++------
 sc/source/core/data/formulacell.cxx |    2 +-
 sc/source/core/data/table1.cxx      |    9 +++------
 sc/source/ui/docshell/docfunc.cxx   |    2 +-
 sc/source/ui/view/viewfun2.cxx      |    4 ++--
 10 files changed, 20 insertions(+), 27 deletions(-)

New commits:
commit 1af0c0be7cb58bbdbaa0984c7d22498ea8039edb
Author: Kohei Yoshida <kohei.yosh...@gmail.com>
Date:   Thu Jul 25 21:47:39 2013 -0400

    Remove unused parameters to clean it up a bit.
    
    Change-Id: Ief629aea8b0df0b5a340871e13bc1a6e7c244816

diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index 5ef6cce..9850840 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 d730a6f..09f0874 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 7260ea0..d19c01c 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 00cc7e5..2ce8cac 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 da3cb49..2e63c90 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 f32fcd5..1a4d379 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 b20fa0c..11388e8 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 ba9ada3..74d41f7 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 c272a27..2b26a73 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 9ce1c27..790cbd1 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 )
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to