use of org.apache.poi.xwpf.usermodel.XWPFAbstractNum in project tika by apache.
the class XWPFListManager method loadLevelTuples.
private ParagraphLevelCounter loadLevelTuples(CTDecimalNumber abNum) {
//Unfortunately, we need to go this far into the underlying structure
//to get the abstract num information for the edge case where
//someone skips a level and the format is not context-free, e.g. "1.B.i".
XWPFAbstractNum abstractNum = numbering.getAbstractNum(abNum.getVal());
CTAbstractNum ctAbstractNum = abstractNum.getCTAbstractNum();
LevelTuple[] levels = new LevelTuple[ctAbstractNum.sizeOfLvlArray()];
for (int i = 0; i < levels.length; i++) {
levels[i] = buildTuple(i, ctAbstractNum.getLvlArray(i));
}
return new ParagraphLevelCounter(levels);
}
Aggregations