[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Nov 2 03:32:35 PDT 2012
sc/source/core/data/column.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 4499ed3b610ee9c7762ed5b9c082a37e48d98c8e
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date: Thu Nov 1 20:36:25 2012 -0400
Remove the correct range, or else maItems would end up with invalid pointer.
nStopPos is non-inclusive, and STL's erase() method also expects a
non-inclusive end position (like any other STL methods do). It's wrong
to -1 here which would end up not erasing the last element containing
a pointer to the deleted cell instance.
Change-Id: Ic09ab4a6bb03d0f56bb854a91bf93a99be867116
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index eebb17a..79bf31f 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -1555,7 +1555,7 @@ void ScColumn::MoveTo(SCROW nStartRow, SCROW nEndRow, ScColumn& rCol)
rAddress.SetRow( maItems[i].nRow );
pDocument->AreaBroadcast( aHint );
}
- maItems.erase(maItems.begin() + nStartPos, maItems.begin() + nStopPos - 1);
+ maItems.erase(maItems.begin() + nStartPos, maItems.begin() + nStopPos);
}
pNoteCell->Delete();
}
More information about the Libreoffice-commits
mailing list