summaryrefslogtreecommitdiff
path: root/sc/source/core
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-12-08 07:43:14 +0100
committerAndras Timar <andras.timar@collabora.com>2014-12-13 16:01:05 +0100
commitba9d6012d37c69a9b46f7dcfa15e99a8bbb20960 (patch)
treebebb33d157b1151005003160d246b6cc48fdc7bf /sc/source/core
parent7717ec3e5cba51cd1a2c52c66054a35c0a0488ef (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 Reviewed-on: https://gerrit.libreoffice.org/13362 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source/core')
-rw-r--r--sc/source/core/data/column3.cxx6
-rw-r--r--sc/source/core/data/table1.cxx4
2 files changed, 10 insertions, 0 deletions
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index 924c9e33dbd6..3c39880514b1 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 {
class ShiftFormulaPosHandler
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index 94cf672460d6..2b1c2c93b0fd 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -319,6 +319,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.