/**
* 테이블 셀 병합 rowspan
* @param table
*/
private void mergeCellVertically(XWPFTable table) {
XWPFTableCell prevNoCell = null;
XWPFTableCell curNoCell = null;
XWPFTableCell curRawPerCell = null;
XWPFTableCell curFuncCell = null;
CTVMerge vmerge = CTVMerge.Factory.newInstance();
table.getRow(0).getCell(0).getCTTc().getTcPr().setVMerge(vmerge);
table.getRow(0).getCell(3).getCTTc().getTcPr().setVMerge(vmerge);
table.getRow(0).getCell(6).getCTTc().getTcPr().setVMerge(vmerge);
for(int row = 1 ;row <table.getRows().size(); row++) {
prevNoCell = table.getRow(row - 1).getCell(0);
curNoCell = table.getRow(row).getCell(0);
curRawPerCell = table.getRow(row).getCell(3);
curFuncCell = table.getRow(row).getCell(6);
if(!curNoCell.getText().equals(prevNoCell.getText())) {
vmerge.setVal(STMerge.RESTART);
curNoCell.getCTTc().getTcPr().setVMerge(vmerge);
curRawPerCell.getCTTc().getTcPr().setVMerge(vmerge);
curFuncCell.getCTTc().getTcPr().setVMerge(vmerge);
}else {
vmerge.setVal(STMerge.CONTINUE);
curNoCell.getCTTc().getTcPr().setVMerge(vmerge);
curRawPerCell.getCTTc().getTcPr().setVMerge(vmerge);
curFuncCell.getCTTc().getTcPr().setVMerge(vmerge);
}
}
}