The following code causes an out of bounds exception on the third colmn of the last row. I create a table wth 3 columns and 2 rows and then procede to merge each row into 1 column. When I attempt to retrieve cell 2,1 the exception occurs. If I add another column the error still occurs on the third cell of the last row, similarly if i add more rows the same thing happens. I presume there is some problem with me merging all the cells in the previous rows but I cannot see it and the passed coords are the correct ones assuming that the cell retians its original coords despite merging of previous cells.
Java code
Table addTable = slide.getShapes().addtable(0, 0, slide.getBackground().getWidth(), 0, 3, 2, 2, color.Black );
for ( row = 0; row < 2; row++ ){
Cell cell = addtable.getCell ( 0 , row );
for ( col = 0; col < 2; col++ ){
Cell mergeCell = addTable.getCell (col + 1; row ); // code breaks on this line
addTable.mergeCells( cell, mergeCell );
}
}