summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 6911ca0e34ff..dee712f0ede0 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -187,6 +187,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 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.