public class RevisionsView
extends java.lang.Object
Examples:
Shows how to switch between the revised and the original view of a document.
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());
| Modifier and Type | Field and Description |
|---|---|
static int |
FINAL
Specifies revised version of a document.
|
static int |
length |
static int |
ORIGINAL
Specifies original version of a document.
|
| Modifier and Type | Method and Description |
|---|---|
static int |
fromName(java.lang.String revisionsViewName) |
static java.lang.String |
getName(int revisionsView) |
static int[] |
getValues() |
static java.lang.String |
toString(int revisionsView) |