use of org.openxmlformats.schemas.drawingml.x2006.main.CTTextAutonumberBullet in project poi by apache.
the class XSLFTextParagraph method setBulletAutoNumber.
/**
* Specifies that automatic numbered bullet points should be applied to this paragraph
*
* @param scheme type of auto-numbering
* @param startAt the number that will start number for a given sequence of automatically
numbered bullets (1-based).
*/
public void setBulletAutoNumber(AutoNumberingScheme scheme, int startAt) {
if (startAt < 1)
throw new IllegalArgumentException("Start Number must be greater or equal that 1");
CTTextParagraphProperties pr = _p.isSetPPr() ? _p.getPPr() : _p.addNewPPr();
CTTextAutonumberBullet lst = pr.isSetBuAutoNum() ? pr.getBuAutoNum() : pr.addNewBuAutoNum();
lst.setType(STTextAutonumberScheme.Enum.forInt(scheme.ooxmlId));
lst.setStartAt(startAt);
}
Aggregations