I use the following code to create a list point:
- Code: Select all
private void addUnorderedListPoint(String text, int i) {
docx4jParagraph[i] = factory.createP();
org.docx4j.wml.Text t = factory.createText();
t.setValue(text);
org.docx4j.wml.R run = factory.createR();
run.getContent().add(t);
docx4jParagraph[i].getContent().add(run);
org.docx4j.wml.PPr ppr = factory.createPPr();
docx4jParagraph[i].setPPr( ppr );
PPrBase.Spacing space = new PPrBase.Spacing();
space.setAfter(BigInteger.ZERO);
space.setBefore(BigInteger.ZERO);
ppr.setSpacing(space);
NumPr numPr = factory.createPPrBaseNumPr();
ppr.setNumPr(numPr);
Ilvl ilvlElement = factory.createPPrBaseNumPrIlvl();
numPr.setIlvl(ilvlElement);
ilvlElement.setVal(BigInteger.valueOf(0));
NumId numIdElement = factory.createPPrBaseNumPrNumId();
numPr.setNumId(numIdElement);
numIdElement.setVal(BigInteger.valueOf(listNumber));
}
but there is no way for me the get a "unordered" list with "dots" in front of each entry. Every time this creates an ordered list with leading numbers. I also tried to compare the XML code Word creates for unordered and ordered lists, but i can't see the difference...
Hope anyone has an idea to solve this problem.
Best regards
Sandra