use of org.openxmlformats.schemas.wordprocessingml.x2006.main.CTDecimalNumber in project tika by apache.
the class XWPFListManager method getFormattedNumber.
public String getFormattedNumber(BigInteger numId, int iLvl) {
if (numbering == null || iLvl < 0 || numId == null) {
return "";
}
int currNumId = numId.intValue();
XWPFNum xwpfNum = numbering.getNum(numId);
if (xwpfNum == null) {
return "";
}
CTNum ctNum = xwpfNum.getCTNum();
CTDecimalNumber abNum = ctNum.getAbstractNumId();
int currAbNumId = abNum.getVal().intValue();
ParagraphLevelCounter lc = listLevelMap.get(currAbNumId);
LevelTuple[] overrideTuples = overrideTupleMap.get(currNumId);
if (lc == null) {
lc = loadLevelTuples(abNum);
}
if (overrideTuples == null) {
overrideTuples = loadOverrideTuples(ctNum, lc.getNumberOfLevels());
}
String formattedString = lc.incrementLevel(iLvl, overrideTuples);
listLevelMap.put(currAbNumId, lc);
overrideTupleMap.put(currNumId, overrideTuples);
return formattedString;
}
use of org.openxmlformats.schemas.wordprocessingml.x2006.main.CTDecimalNumber in project Gargoyle by callakrsos.
the class MSWord method mergeCellHorizon.
/**
* 수평셀 병합
*
* @param table
* @param rowNum
* @param colNum
* @param span
*/
public void mergeCellHorizon(XWPFTable table, int rowNum, int colNum, int span) {
XWPFTableRow row = table.getRow(rowNum);
XWPFTableCell cell = row.getCell(colNum);
CTDecimalNumber grdSpan = cell.getCTTc().getTcPr().getGridSpan();
if (grdSpan == null) {
grdSpan = cell.getCTTc().getTcPr().addNewGridSpan();
}
grdSpan.setVal(BigInteger.valueOf((long) span));
}
use of org.openxmlformats.schemas.wordprocessingml.x2006.main.CTDecimalNumber in project poi by apache.
the class XWPFTable method getColBandSize.
public int getColBandSize() {
int size = 0;
CTTblPr tblPr = getTrPr();
if (tblPr.isSetTblStyleColBandSize()) {
CTDecimalNumber colSize = tblPr.getTblStyleColBandSize();
size = colSize.getVal().intValue();
}
return size;
}
Aggregations