summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2011-05-20 06:11:07 +0200
committerKohei Yoshida <kyoshida@novell.com>2011-05-20 11:47:38 -0400
commitdd3f3f575584a4fd71375b156a1f16ef7afb0e47 (patch)
tree5b71ac4992fb3dc0aa19cac91868bd6a010a638c
parente1043677355a7ce54de4e177285720560b8c5653 (diff)
update sheet local db data when sheets are inserted/deleted
Signed-off-by: Kohei Yoshida <kyoshida@novell.com>
-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 551ecbfdf..2927aa0e5 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -1402,7 +1402,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())
@@ -1411,7 +1416,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)