<changes>
<release version="3.7-beta3" date="2010-??-??">
+ <action dev="poi-developers" type="fix">49895 - avoid corruption of XSSFWorkbook after removing all merged cells from sheet</action>
<action dev="poi-developers" type="fix">49907 - fixed inconsistent behaviour between HSSF and XSSF when creating consecutive names</action>
<action dev="poi-developers" type="add">Add getMimeType() method to HWPF Picture, alongside existing file extension</action>
<action dev="poi-developers" type="add">Add code for reading Ole10Native data</action>
mergeCellsArray[i - 1] = ctMergeCells.getMergeCellArray(i);
}
}
- ctMergeCells.setMergeCellArray(mergeCellsArray);
+ if(mergeCellsArray.length > 0){
+ ctMergeCells.setMergeCellArray(mergeCellsArray);
+ } else{
+ worksheet.unsetMergeCells();
+ }
}
/**
sheet.removeMergedRegion(1);
sheet.removeMergedRegion(0);
assertEquals(0, sheet.getNumMergedRegions());
+ assertNull(" CTMergeCells should be deleted after removing the last merged " +
+ "region on the sheet.", sheet.getCTWorksheet().getMergeCells());
}
public void testSetDefaultColumnStyle() {