sc/source/core/data/documen9.cxx | 2 +- sc/source/core/data/table1.cxx | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-)
New commits: commit 6b7080c102e56651803831aaa12c3c86efbce858 Author: Kohei Yoshida <kohei.yosh...@suse.com> Date: Sat Jan 7 18:18:15 2012 -0500 Reset sheet ID of cell-anchored drawing objects when deleting sheet(s). This prevents drawing objects from disappearing on file reload. diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx index e4dec4f..d701597 100644 --- a/sc/source/core/data/documen9.cxx +++ b/sc/source/core/data/documen9.cxx @@ -257,7 +257,7 @@ 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())); + 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/table1.cxx b/sc/source/core/data/table1.cxx index 06b8203..2464340 100644 --- a/sc/source/core/data/table1.cxx +++ b/sc/source/core/data/table1.cxx @@ -331,7 +331,10 @@ ScTable::~ScTable() ScDrawLayer* pDrawLayer = pDocument->GetDrawLayer(); if (pDrawLayer) + { pDrawLayer->ScRemovePage( nTab ); + pDrawLayer->ResetTab(nTab, pDocument->GetTableCount()-1); + } } delete[] pColWidth; _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits