[Libreoffice-commits] .: sc/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Oct 12 22:08:31 PDT 2012


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

New commits:
commit 9ffba6a8dafe881c2c18a3b3358f029ac557afe7
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Sat Oct 13 07:02:32 2012 +0200

    need to set the row/col relative to the start row/col
    
    Change-Id: Ic423924dc12cc8aef1a45d494c6a623ddc45cff0

diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 88a7ea1..d016c6b 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);


More information about the Libreoffice-commits mailing list