From 6a28de4944a9c40be901f2356e7c295e184c5c95 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Mon, 23 Jan 2012 21:16:46 +0100 Subject: erase the correct element in ScColumn::Delete(), not the last one This fixes the dreaded crash in sc_unoapi test. Thanks to Kohei for pointing in the right direction. --- sc/source/core/data/column3.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx index 687c62db5aa6..73c0bbbde9bb 100644 --- a/sc/source/core/data/column3.cxx +++ b/sc/source/core/data/column3.cxx @@ -172,7 +172,7 @@ void ScColumn::Delete( SCROW nRow ) else { pNoteCell->Delete(); - maItems.erase(maItems.end() - 1); + maItems.erase( maItems.begin() + nIndex); // Soll man hier den Speicher freigeben (delta)? Wird dann langsamer! } pCell->EndListeningTo( pDocument ); -- cgit v1.2.3