public class RevisionsView
Example:
Document doc = new Document(getMyDir() + "Revisions at list levels.docx");
doc.updateListLabels();
ParagraphCollection paragraphs = doc.getFirstSection().getBody().getParagraphs();
Assert.assertEquals("1.", paragraphs.get(0).getListLabel().getLabelString());
Assert.assertEquals("a.", paragraphs.get(1).getListLabel().getLabelString());
Assert.assertEquals("", paragraphs.get(2).getListLabel().getLabelString());
// View the document object as if all the revisions are accepted. Currently supports list labels.
doc.setRevisionsView(RevisionsView.FINAL);
Assert.assertEquals("", paragraphs.get(0).getListLabel().getLabelString());
Assert.assertEquals("1.", paragraphs.get(1).getListLabel().getLabelString());
Assert.assertEquals("a.", paragraphs.get(2).getListLabel().getLabelString());
Field Summary | ||
---|---|---|
static final int | ORIGINAL | |
Specifies original version of a document.
|
||
static final int | FINAL | |
Specifies revised version of a document.
|