summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-10-12 16:46:55 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-10-13 04:33:33 +0200
commit2ec03fc221e80479557f05f53972ca864f1ff4bb (patch)
tree634cd920b4bf23fa8c2d547bfea9f30d758943cb /sc/source
parent979c4753831eec5e05df685880cc2052bea64307 (diff)
don't insert notes from deleted cells, fdo#55885
Change-Id: I036f0531dc2290c5eb480258bc70ec13b810e6bc
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/data/table2.cxx18
1 files changed, 14 insertions, 4 deletions
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 69c7d00ab0b8..88a7ea1941ba 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -264,8 +264,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 > static_cast<SCROW>(nSize))
+ {
+ aNotes.insert(nCol, nRow - nSize, pPostIt);
+ maNotes.ReleaseNote(nCol, nRow);
+ }
+ else
+ maNotes.erase(nCol, nRow);
}
}
@@ -483,8 +488,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 > static_cast<SCCOL>(nSize))
+ {
+ aNotes.insert(nCol - nSize, nRow, pPostIt);
+ maNotes.ReleaseNote(nCol, nRow);
+ }
+ else
+ maNotes.erase(nCol, nRow);
}
}