[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - sc/inc sc/source

Markus Mohrhard markus.mohrhard at collabora.co.uk
Sun Dec 7 22:47:59 PST 2014


 sc/inc/column.hxx               |    1 +
 sc/source/core/data/column3.cxx |    6 ++++++
 sc/source/core/data/table1.cxx  |    4 ++++
 3 files changed, 11 insertions(+)

New commits:
commit d80a59a22dc993be8259e43f4d46e4471f1b7cc3
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Mon Dec 8 07:43:14 2014 +0100

    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

diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index 8709935..f07cf8a 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -189,6 +189,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 4ddbabc..44e3585 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 97d894f..654bf4a 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -322,6 +322,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.


More information about the Libreoffice-commits mailing list