You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by le...@apache.org on 2012/03/16 09:00:06 UTC

svn commit: r1301361 - /incubator/ooo/trunk/main/svx/source/table/tablemodel.cxx

Author: leiw
Date: Fri Mar 16 08:00:06 2012
New Revision: 1301361

URL: http://svn.apache.org/viewvc?rev=1301361&view=rev
Log:
#i118760# split the first table cell vertically, then undo&redo, the Presentation app will crash

Modified:
    incubator/ooo/trunk/main/svx/source/table/tablemodel.cxx

Modified: incubator/ooo/trunk/main/svx/source/table/tablemodel.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/source/table/tablemodel.cxx?rev=1301361&r1=1301360&r2=1301361&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/source/table/tablemodel.cxx (original)
+++ incubator/ooo/trunk/main/svx/source/table/tablemodel.cxx Fri Mar 16 08:00:06 2012
@@ -299,7 +299,11 @@ void TableModel::UndoRemoveColumns( sal_
 
 	sal_Int32 nRows = getRowCountImpl();
 	for( sal_Int32 nRow = 0; nRow < nRows; ++nRow )
-		maRows[nRow]->insertColumns( nIndex, nCount, &aIter );
+	{
+		CellVector::iterator aIter2 = aIter + nRow * nCount;
+		DBG_ASSERT(aIter2 < aCells.end(), "sdr::table::TableModel::UndoRemoveColumns(), invalid iterator!");
+		maRows[nRow]->insertColumns( nIndex, nCount, &aIter2 );
+	}
 
     updateColumns();
 	setModified(sal_True);