new Revision()
The Revision
object is created when requesting the revisions for a document comparison. It represents a change identified in a document comparison and retrieved using PCCViewer.ViewerControl#requestRevisions.
This constructor should not be used directly. Instead, only access revisions created by PCCViewer.ViewerControl#requestRevisions, through the PCCViewer.RevisionsRequest object.
- See:
-
- Use PCCViewer.RevisionsRequest#getRevisions to get results from a `RevisionsRequest` object.
- Use PCCViewer.RevisionsRequest#revisions to get results from a `RevisionsRequest` object.
Members
(static, readonly) Type :string
The PCCViewer.Revision.Type
enumeration defines Revision Types known to the ViewerControl.
Type:
- string
Properties:
Name | Description |
---|---|
ContentInserted : string |
Indicates that an insertion occurred. |
ContentDeleted : string |
Indicates that a deletion occurred. |
PropertyChanged : string |
Indicates that a property was changed. |
ParagraphNumberChanged : string |
Indicates that a paragraph number changed. |
FieldDisplayChanged : string |
Indicates that a field display changed. |
RevisionMarkedAsReconciledConflict : string |
Indicates that a revision was marked as reconciled conflict. |
RevisionMarkedAsConflict : string |
Indicates that a revision was marked as conflict. |
StyleChanged : string |
Indicates a style change. |
ContentReplaced : string |
Indicates that content was replaced. |
ParagraphPropertyChanged : string |
Indicates that a paragraph property changed. |
TablePropertyChanged : string |
Indicates that a table property changed. |
SectionPropertyChanged : string |
Indicates that a section property changed. |
StyleDefinitionChanged : string |
Indicates that a style definition changed. |
ContentMovedFrom : string |
Indicates that content was moved from this location. |
ContentMovedTo : string |
Indicates that content was moved to this location. |
TableCellInserted : string |
Indicates that a table cell was inserted. |
TableCellDeleted : string |
Indicates that a table cell was deleted. |
TableCellsMerged : string |
Indicates that table cells were merged. |
Unknown : string |
Indicates a revision of an unknown type. |
(readonly) id :number
Gets the ID of the revision.
The ID is unique only to revisions in the current revisions request and may be repeated in later revisions requests.
This is an ECMA 5 accessor property that is defined only in browsers supporting ECMA 5. This property is not available in the older browsers like IE8.
Type:
- number
(readonly) pageNumber :number
Gets the page number of the document on which the revision ends.
If the revision is contained on a single page, this returns the page number of that page. If the revision spans multiple pages, this returns the page number of the last page.
This is an ECMA 5 accessor property that is defined only in browsers supporting ECMA 5. This property is not available in the older browsers like IE8.
Type:
- number
(readonly) type :PCCViewer.Revision.Type
Gets the type of the revision.
This is an ECMA 5 accessor property that is defined only in browsers supporting ECMA 5. This property is not available in the older browsers like IE8.
Type:
Methods
getEndPageNumber() → {number}
Gets the page number of the document on which the revision ends.
If the revision is contained on a single page, this returns the page number of that page. If the revision spans multiple pages, this returns the page number of the last page.
Returns:
The page number on which the revision ends.
- Type
- number
Example
var revisions = revisionsRequest.getRevisions();
var revision = revisions[0];
var pageNumber = revision.getEndPageNumber();
alert("Revision found on page: " + pageNumber);
getId() → {number}
Gets the ID of the revision.
The ID is unique only to revisions in the current revisions request and may be repeated in later revisions requests.
Returns:
The ID of the revision.
- Type
- number
Example
var revisions = revisionsRequest.getRevisions();
var revision = revisions[0];
var id = revision.getId();
getType() → {PCCViewer.Revision.Type}
Gets the type of the revision.
Returns:
The type of the revision.
Example
var revisions = revisionsRequest.getRevisions();
var revision = revisions[0];
var revisionType = revision.getType();