originalPositions[i] = findCellPosition( cell ); originalRowSpans[i] = contextInfo.getRowSpan( );
	protected void pasteCells( List copiedCells, List originalCells,			int columnIndex, boolean isInsert ) throws SemanticException	{		int[] originalPositions = new int[originalCells.size( )];		int[] originalRowSpans = new int[originalCells.size( )];		// remove cells first.		for ( int i = 0; i < originalCells.size( ); i++ )		{			CellContextInfo contextInfo = (CellContextInfo) originalCells					.get( i );			CellHandle cell = contextInfo.getCell( ).handle( getDesign( ) );			originalPositions[i] = findCellPosition( cell );			originalRowSpans[i] = contextInfo.getRowSpan( );			if ( !isInsert )				cell.getContainerSlotHandle( ).drop( cell );		}		int[] copiedRowSpans = new int[copiedCells.size( )];		for ( int i = 0; i < copiedCells.size( ); i++ )		{			CellContextInfo contextInfo = (CellContextInfo) copiedCells.get( i );			copiedRowSpans[i] = contextInfo.getRowSpan( );		}		// insert column index that is from 1.		int[] insertPosition = getIndexToAdd( originalPositions,				originalRowSpans, copiedRowSpans );		// adds the copied cells to the destination.		for ( int i = 0; i < copiedCells.size( ); i++ )		{			CellContextInfo contextInfo = (CellContextInfo) copiedCells.get( i );			// groupId is equal to -1, means this is a top slot in the table			RowHandle row = getRow( contextInfo.getSlotId( ), contextInfo					.getGroupId( ), contextInfo.getRowNumber( ) );			assert row != null;			int pos = insertPosition[i];			CellHandle cell = contextInfo.getCell( ).handle( getDesign( ) );			// if this is only paste operation, then paste it to the old			// position. Otherwise, apppend it to the next avaiable position.			if ( !isInsert )				pos--;			row.addElement( cell, TableRow.CONTENT_SLOT, pos );		}	}