diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-10-12 16:46:55 +0200 |
---|---|---|
committer | Petr Mladek <pmladek@suse.cz> | 2012-10-16 12:03:46 +0200 |
commit | 39e7aefe5d3645f08867c84e1c5dd08c7209a439 (patch) | |
tree | 82f9011f8278d5f9a7800053d5445bd90f07d18f /sc | |
parent | cc6c29d408245da325178da2f47e1c1220526de9 (diff) |
don't insert notes from deleted cells, fdo#55885
Change-Id: I036f0531dc2290c5eb480258bc70ec13b810e6bc
Signed-off-by: Kohei Yoshida <kohei.yoshida@gmail.com>
Signed-off-by: Eike Rathke <erack@redhat.com>
Signed-off-by: Noel Power <nopower@novell.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/table2.cxx | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx index 4230cbd764a5..cd193c142009 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); } } |