本文整理了Java中org.apache.poi.xwpf.usermodel.XWPFNumbering.addAbstractNum()
方法的一些代码示例,展示了XWPFNumbering.addAbstractNum()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XWPFNumbering.addAbstractNum()
方法的具体详情如下:
包路径:org.apache.poi.xwpf.usermodel.XWPFNumbering
类名称:XWPFNumbering
方法名:addAbstractNum
[英]add a new AbstractNum and return its AbstractNumID
[中]添加一个新的AbstractNum并返回其AbstractNumID
代码示例来源:origin: Sayi/poi-tl
public BigInteger addNewNumbericId(Pair<Enum, String> numFmt) {
XWPFNumbering numbering = this.getNumbering();
if (null == numbering) {
numbering = this.createNumbering();
}
NumberingWrapper numberingWrapper = new NumberingWrapper(numbering);
CTAbstractNum cTAbstractNum = CTAbstractNum.Factory.newInstance();
// if we have an existing document, we must determine the next
// free number first.
cTAbstractNum
.setAbstractNumId(BigInteger.valueOf(numberingWrapper.getAbstractNumsSize() + 10));
Enum fmt = numFmt.getLeft();
String val = numFmt.getRight();
CTLvl cTLvl = cTAbstractNum.addNewLvl();
cTLvl.addNewNumFmt().setVal(fmt);
cTLvl.addNewLvlText().setVal(val);
cTLvl.addNewStart().setVal(BigInteger.valueOf(1));
cTLvl.setIlvl(BigInteger.valueOf(0));
if (fmt == STNumberFormat.BULLET) {
cTLvl.addNewLvlJc().setVal(STJc.LEFT);
} else {
// cTLvl.setIlvl(BigInteger.valueOf(0));
}
XWPFAbstractNum abstractNum = new XWPFAbstractNum(cTAbstractNum);
BigInteger abstractNumID = numbering.addAbstractNum(abstractNum);
return numbering.addNum(abstractNumID);
}
代码示例来源:origin: Sayi/poi-tl
BigInteger numID = numbering.addNum(numbering.addAbstractNum(new XWPFAbstractNum(cTAbstractNum)));
代码示例来源:origin: stackoverflow.com
id = numbering.addAbstractNum(abs);
内容来源于网络,如有侵权,请联系作者删除!