summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@suse.com>2012-01-07 18:38:12 -0500
committerKohei Yoshida <kohei.yoshida@suse.com>2012-01-07 18:38:12 -0500
commit292cec8ff30181a7c3c253362cd5e2a93cc134db (patch)
tree757cd39944b116ad87df2e061025e161802a890c /sc/source
parent6b7080c102e56651803831aaa12c3c86efbce858 (diff)
Better to internalize the sheet ID reset within ScDrawLayer...
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/data/documen9.cxx1
-rw-r--r--sc/source/core/data/drwlayer.cxx4
-rw-r--r--sc/source/core/data/table1.cxx3
3 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx
index d7015973527a..b8cca4c9f52e 100644
--- a/sc/source/core/data/documen9.cxx
+++ b/sc/source/core/data/documen9.cxx
@@ -257,7 +257,6 @@ void ScDocument::DrawCopyPage( sal_uInt16 nOldPos, sal_uInt16 nNewPos )
{
// angelegt wird die Page schon im ScTable ctor
pDrawLayer->ScCopyPage( nOldPos, nNewPos, false );
- pDrawLayer->ResetTab(static_cast<SCTAB>(nNewPos), static_cast<SCTAB>(maTabs.size()-1));
}
void ScDocument::DeleteObjectsInArea( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index 91820f494dcc..2bbd35e718c4 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -407,6 +407,8 @@ void ScDrawLayer::ScRemovePage( SCTAB nTab )
}
else
DeletePage( static_cast<sal_uInt16>(nTab) ); // einfach weg damit
+
+ ResetTab(nTab, pDoc->GetTableCount()-1);
}
void ScDrawLayer::ScRenamePage( SCTAB nTab, const String& rNewName )
@@ -470,6 +472,8 @@ void ScDrawLayer::ScCopyPage( sal_uInt16 nOldPos, sal_uInt16 nNewPos, sal_Bool b
if (bAlloc)
InsertPage(pNewPage, nNewPos);
+
+ ResetTab(static_cast<SCTAB>(nNewPos), pDoc->GetTableCount()-1);
}
void ScDrawLayer::ResetTab( SCTAB nStart, SCTAB nEnd )
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index 2464340753c5..06b8203c15d2 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -331,10 +331,7 @@ ScTable::~ScTable()
ScDrawLayer* pDrawLayer = pDocument->GetDrawLayer();
if (pDrawLayer)
- {
pDrawLayer->ScRemovePage( nTab );
- pDrawLayer->ResetTab(nTab, pDocument->GetTableCount()-1);
- }
}
delete[] pColWidth;