summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-12-08 07:43:14 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-12-08 07:46:19 +0100
commitfeb749092d1008fba6acb9206d1f8655749519af (patch)
treee17a4bc7ddb3e8ec6b548322cb7486113b4c5b9a
parentc5abf965fae4aa979989e60b00ab926ddf35ae8f (diff)
we need the SdrPage for deleting the notes, fdo#86166
The SdrPage that contains the shapes for the note captions is deleted before the notes. Prevent that case by deleting the notes before deleting the SdrPage. Change-Id: I13727cea7df0b033fb386a6a8e20dcadec743335
-rw-r--r--sc/inc/column.hxx1
-rw-r--r--sc/source/core/data/column3.cxx6
-rw-r--r--sc/source/core/data/table1.cxx4
3 files changed, 11 insertions, 0 deletions
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index 86d39ab954d0..b9009cbcaa09 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -183,6 +183,7 @@ public:
void Delete( SCROW nRow );
void FreeAll();
+ void FreeNotes();
void Swap( ScColumn& rOther, SCROW nRow1, SCROW nRow2, bool bPattern );
bool HasAttrib( SCROW nRow1, SCROW nRow2, sal_uInt16 nMask ) const;
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index 146e0261fcb4..c8e6839d3836 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -141,6 +141,12 @@ void ScColumn::FreeAll()
CellStorageModified();
}
+void ScColumn::FreeNotes()
+{
+ maCellNotes.clear();
+ maCellNotes.resize(MAXROWCOUNT);
+}
+
namespace {
/**
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index 834dfe1cfc65..b06fa28fbd60 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -320,6 +320,10 @@ ScTable::~ScTable()
{
if (!pDocument->IsInDtorClear())
{
+ for (SCCOL nCol = 0; nCol < MAXCOL; ++nCol)
+ {
+ aCol[nCol].FreeNotes();
+ }
// nicht im dtor die Pages in der falschen Reihenfolge loeschen
// (nTab stimmt dann als Page-Number nicht!)
// In ScDocument::Clear wird hinterher per Clear am Draw Layer alles geloescht.