Kaydet (Commit) 1f6e412a authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Reset sheet ID of cell-anchored drawing objects when deleting sheet(s).

This prevents drawing objects from disappearing on file reload.
üst 6c3cfe60
...@@ -257,7 +257,7 @@ void ScDocument::DrawCopyPage( sal_uInt16 nOldPos, sal_uInt16 nNewPos ) ...@@ -257,7 +257,7 @@ void ScDocument::DrawCopyPage( sal_uInt16 nOldPos, sal_uInt16 nNewPos )
{ {
// angelegt wird die Page schon im ScTable ctor // angelegt wird die Page schon im ScTable ctor
pDrawLayer->ScCopyPage( nOldPos, nNewPos, false ); 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, void ScDocument::DeleteObjectsInArea( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
......
...@@ -333,7 +333,10 @@ ScTable::~ScTable() ...@@ -333,7 +333,10 @@ ScTable::~ScTable()
ScDrawLayer* pDrawLayer = pDocument->GetDrawLayer(); ScDrawLayer* pDrawLayer = pDocument->GetDrawLayer();
if (pDrawLayer) if (pDrawLayer)
{
pDrawLayer->ScRemovePage( nTab ); pDrawLayer->ScRemovePage( nTab );
pDrawLayer->ResetTab(nTab, pDocument->GetTableCount()-1);
}
} }
delete[] pColWidth; delete[] pColWidth;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment