Skip to main content

Module changes

Module changes 

Source
Expand description

Tracked changes one at a time: list, accept or reject a selection. Tracked changes one at a time: list each with an id, accept or reject a selection and keep the rest tracked, as Word’s Accept/Reject This Change does.

A change is one revision element (w:ins, w:del, w:moveFrom, w:moveTo, w:cellIns, w:cellDel, w:*PrChange, …), named by its short id: r12 in the body, header1.r1, footnotes.r1, comments.r9 or styles.r0 in another story, the story being a header, footer, notes or comments part’s file stem (header1, footnotes, comments, as jubarte read names them) (crate::ids::ChangeId::short). Resolving some changes never renumbers the rest, so an id listed before stays valid after. Word moves text as one change: selecting either side of a move selects both sides and their range markers. A revision inside a comment body (word/comments.xml) is comments.rN, the same id accept and reject select (#1706).

Structs§

Change
One tracked change.
ChangeFilter
Which changes to resolve. A change is selected when it matches every list given; a list left out matches any change, so the default filter selects every change, and an empty list selects none.
ChangeMember
One mark of a logical change: an element Word wrote for it.
ResolvedChanges
A resolved document and the comments removed with its revisions.

Enums§

ChangeError
Why changes could not be listed or resolved.
ChangeKind
What a change does.
MoveSide
Which side of a move a change is.

Functions§

accept_changes
Accept the changes filter selects; the others stay tracked. A Strict package is written back transitional, as the comparer writes it; with nothing selected the bytes come back untouched.
accept_changes_keeping_comments
Accept selected changes, keeping wholly removed comment threads on empty anchors (#1279). The CLI’s --keep-nested-comment opt-in; the default removes them, as Word does.
accept_changes_with_report
Accept selected changes and report comments that disappeared with them.
accept_elements
Accept the elements filter selects, each w:ins, w:del or other mark by its own id (list_changes), even when it is only part of a logical change: for tools that work mark by mark, such as a comparison with Word’s own handling of each element. accept_changes refuses such a selection.
accept_revisions_keeping_comments
Accept every revision through the processor, rescuing wholly removed comment threads onto empty anchors (#1279). The CLI’s --keep-nested-comment opt-in on convert --track-changes accept. Lives here in the doc layer with the settlement it drives; the facade’s document_comparer module composes it back.
by_authors
The changes authors wrote, matched as ChangeFilter::authors matches them (exact names); every change when authors is empty. A logical change has one author, so it is kept or left whole: the filter jubarte changes --author applies (#1690).
changes_text
jubarte changes’ listing: one line per change, {ref}\t{kind}\t{target} \t{author}\t{paragraph}\t{text}[\t({n} elements)][\tinside {ref}][\tholds comment {c}'s mark] (- for an absent author or paragraph; the text quoted, its first 60 characters; ({n} elements) for a logical change Word wrote as several; holds comment marks {c}, {c} for several), then {n} change(s). A row has six fields, and one more for each suffix.
comment_changes_in
The listed changes of the comments part only (empty when the package has none). The same changes are in changes_in as comments.rN.
list_changes
Every tracked change, story by story (body, headers, footers, endnotes, footnotes, comments, styles), in document order. A revision inside a comment body is comments.r9 (#1706).
list_logical_changes
Every logical change, story by story, in document order: the changes jubarte changes lists. One author’s touching insertions, or touching deletions, are one change with a composite id (r7+8+9+10) and Change::members; a deletion run followed by the same author’s insertion run is one ChangeKind::Replacement (module logical has the rule). Every other element is listed as list_changes lists it.
reject_changes
Reject the changes filter selects; the others stay tracked. A Strict package is written back transitional, as accept_changes writes it.
reject_changes_keeping_comments
Reject selected changes, keeping wholly removed comment threads on empty anchors (#1279). The CLI’s --keep-nested-comment opt-in; the default removes them, as Word does.
reject_changes_with_report
Reject selected changes and report comments that disappeared with them.
reject_elements
Reject the elements filter selects, as accept_elements accepts them.
reject_revisions_keeping_comments
Reject every revision through the processor, rescuing wholly removed comment threads onto empty anchors (#1279). The CLI’s --keep-nested-comment opt-in on convert --track-changes reject.