com.aspose.words

Class RevisionsView

  • java.lang.Object
    • com.aspose.words.RevisionsView
public class RevisionsView 
extends java.lang.Object

Utility class containing constants. Allows to specify whether to work with the original or revised version of a document.

Example:

Shows how to get revised version of list label and list level formatting in a document.
Document doc = new Document(getMyDir() + "Revisions at list levels.docx");
doc.updateListLabels();

// Switch to the revised version of the document
doc.setRevisionsView(RevisionsView.FINAL);

for (Revision revision : doc.getRevisions()) {
    if (revision.getParentNode().getNodeType() == NodeType.PARAGRAPH) {
        Paragraph paragraph = (Paragraph) revision.getParentNode();

        if (paragraph.isListItem()) {
            // Print revised version of LabelString and ListLevel
            System.out.println(paragraph.getListLabel().getLabelString());
            System.out.println(paragraph.getListFormat().getListLevel());
        }
    }
}

Field Summary
static final intORIGINAL = 0
Specifies original version of a document.
static final intFINAL = 1
Specifies revised version of a document.
 

    • Field Detail

      • ORIGINAL = 0

        public static final int ORIGINAL
        Specifies original version of a document.
      • FINAL = 1

        public static final int FINAL
        Specifies revised version of a document.