[Libreoffice-commits] .: Branch 'libreoffice-3-6-3' - sc/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Oct 16 03:05:42 PDT 2012


 sc/source/core/data/table2.cxx |   18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

New commits:
commit 39e7aefe5d3645f08867c84e1c5dd08c7209a439
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Fri Oct 12 16:46:55 2012 +0200

    don't insert notes from deleted cells, fdo#55885
    
    Change-Id: I036f0531dc2290c5eb480258bc70ec13b810e6bc
    Signed-off-by: Kohei Yoshida <kohei.yoshida at gmail.com>
    Signed-off-by: Eike Rathke <erack at redhat.com>
    Signed-off-by: Noel Power <nopower at novell.com>

diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 4230cbd..cd193c1 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -267,8 +267,13 @@ void ScTable::DeleteRow( SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCSIZE
 
         if (nRow >= nStartRow)
         {
-            aNotes.insert(nCol, nRow - nSize, pPostIt);
-            maNotes.ReleaseNote(nCol, nRow);
+            if(nRow - nStartRow > static_cast<SCROW>(nSize))
+            {
+                aNotes.insert(nCol, nRow - nSize, pPostIt);
+                maNotes.ReleaseNote(nCol, nRow);
+            }
+            else
+                maNotes.erase(nCol, nRow);
         }
     }
 
@@ -486,8 +491,13 @@ void ScTable::DeleteCol( SCCOL nStartCol, SCROW nStartRow, SCROW nEndRow, SCSIZE
 
         if (nCol >= nStartCol)
         {
-            aNotes.insert(nCol - nSize, nRow, pPostIt);
-            maNotes.ReleaseNote(nCol, nRow);
+            if(nCol - nStartCol > static_cast<SCCOL>(nSize))
+            {
+                aNotes.insert(nCol - nSize, nRow, pPostIt);
+                maNotes.ReleaseNote(nCol, nRow);
+            }
+            else
+                maNotes.erase(nCol, nRow);
         }
     }
 


More information about the Libreoffice-commits mailing list