summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/table2.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 88a7ea1941ba..d016c6b41764 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -264,7 +264,7 @@ void ScTable::DeleteRow( SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCSIZE
if (nRow >= nStartRow)
{
- if(nRow > static_cast<SCROW>(nSize))
+ if(nRow - nStartRow > static_cast<SCROW>(nSize))
{
aNotes.insert(nCol, nRow - nSize, pPostIt);
maNotes.ReleaseNote(nCol, nRow);
@@ -377,7 +377,7 @@ void ScTable::InsertCol( SCCOL nStartCol, SCROW nStartRow, SCROW nEndRow, SCSIZE
ScPostIt* pPostIt = itr->second;
++itr;
- if (nCol >= nStartCol)
+ if (nCol - nStartCol >= nStartCol)
{
aNotes.insert(nCol + nSize, nRow, pPostIt);
maNotes.ReleaseNote(nCol, nRow);