diff options
author | Kohei Yoshida <kohei.yoshida@suse.com> | 2012-01-07 18:38:12 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@suse.com> | 2012-01-07 18:48:56 -0500 |
commit | aeb3af4ea06cb1f17b0177ab77c88f809fb99427 (patch) | |
tree | f00b48ea42eab49770da4ab99c3f09c0527b1490 /sc | |
parent | d3a52bd7b3fe11fc6cf5f3296dd00eba524e40a0 (diff) |
Better to internalize the sheet ID reset within ScDrawLayer...
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/documen9.cxx | 1 | ||||
-rw-r--r-- | sc/source/core/data/drwlayer.cxx | 4 | ||||
-rw-r--r-- | sc/source/core/data/table1.cxx | 3 |
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 61e9bb6091b7..93285a294c1c 100644 --- a/sc/source/core/data/table1.cxx +++ b/sc/source/core/data/table1.cxx @@ -333,10 +333,7 @@ ScTable::~ScTable() ScDrawLayer* pDrawLayer = pDocument->GetDrawLayer(); if (pDrawLayer) - { pDrawLayer->ScRemovePage( nTab ); - pDrawLayer->ResetTab(nTab, pDocument->GetTableCount()-1); - } } delete[] pColWidth; |