*/
@SuppressWarnings("deprecation")
public void removeMergedRegions(Set<Integer> indices) {
if (!worksheet.isSetMergeCells()) return;
CTMergeCells ctMergeCells = worksheet.getMergeCells();
List<CTMergeCell> newMergeCells = new ArrayList<CTMergeCell>(ctMergeCells.sizeOfMergeCellArray());
int idx = 0;
for (CTMergeCell mc : ctMergeCells.getMergeCellArray()) {
if (!indices.contains(idx++)) newMergeCells.add(mc);
}
if (newMergeCells.isEmpty()) {
worksheet.unsetMergeCells();
} else{
CTMergeCell[] newMergeCellsArray = new CTMergeCell[newMergeCells.size()];
ctMergeCells.setMergeCellArray(newMergeCells.toArray(newMergeCellsArray));
}
}