summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2011-05-20 06:11:07 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2011-05-20 13:05:33 +0200
commite1d6a1c542ca2b21f11c581fa6e4be6235deb3af (patch)
treea644bb9d2629a1a775fb1bcfc909c033a3360a2c
parent6e1ff6d24f0c93af145a73b27918fe49b1960b71 (diff)
update sheet local db data when sheets are inserted/deletedfeature/gsoc2011_wizards
-rw-r--r--sc/source/core/data/table1.cxx14
1 files changed, 12 insertions, 2 deletions
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index 779fcb798..6c07d4ef8 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -1400,7 +1400,12 @@ void ScTable::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY )
void ScTable::UpdateInsertTab(SCTAB nTable)
{
- if (nTab >= nTable) nTab++;
+ if (nTab >= nTable)
+ {
+ nTab++;
+ if (pDBDataNoName)
+ pDBDataNoName->UpdateMoveTab(nTab - 1 ,nTab);
+ }
for (SCCOL i=0; i <= MAXCOL; i++) aCol[i].UpdateInsertTab(nTable);
if (IsStreamValid())
@@ -1409,7 +1414,12 @@ void ScTable::UpdateInsertTab(SCTAB nTable)
void ScTable::UpdateDeleteTab( SCTAB nTable, sal_Bool bIsMove, ScTable* pRefUndo )
{
- if (nTab > nTable) nTab--;
+ if (nTab > nTable)
+ {
+ nTab--;
+ if (pDBDataNoName)
+ pDBDataNoName->UpdateMoveTab(nTab + 1,nTab);
+ }
SCCOL i;
if (pRefUndo)