InlineStoryIsMoveToRevision Property |
Namespace: Aspose.Words
// Open a document that has revisions from changes being tracked Document doc = new Document(MyDir + "Revision footnotes.docx"); Assert.IsTrue(doc.HasRevisions); // Get a collection of all footnotes from the document List<Footnote> footnotes = doc.GetChildNodes(NodeType.Footnote, true).Cast<Footnote>().ToList(); Assert.AreEqual(5, footnotes.Count); // If a node was inserted in Microsoft Word while changes were being tracked, this flag will be set to true Assert.IsTrue(footnotes[2].IsInsertRevision); // If one node was moved from one place to another while changes were tracked, // the node will be placed at the departure location as a "move to revision", // and a "move from revision" node will be left behind at the origin, in case we want to reject changes // Highlighting text and dragging it to another place with the mouse and cut-and-pasting (but not copy-pasting) both count as "move revisions" // The node with the "IsMoveToRevision" flag is the arrival of the move operation, and the node with the "IsMoveFromRevision" flag is the departure point Assert.IsTrue(footnotes[1].IsMoveToRevision); Assert.IsTrue(footnotes[4].IsMoveFromRevision); // If a node was deleted while changes were being tracked, it will stay behind as a delete revision until we accept/reject changes Assert.IsTrue(footnotes[3].IsDeleteRevision);