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.
- Change
Filter - 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.
- Change
Member - One mark of a logical change: an element Word wrote for it.
- Resolved
Changes - A resolved document and the comments removed with its revisions.
Enums§
- Change
Error - Why changes could not be listed or resolved.
- Change
Kind - What a change does.
- Move
Side - Which side of a move a change is.
Functions§
- accept_
changes - Accept the changes
filterselects; 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-commentopt-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
filterselects, eachw:ins,w:delor 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_changesrefuses 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-commentopt-in onconvert --track-changes accept. Lives here in the doc layer with the settlement it drives; the facade’sdocument_comparermodule composes it back. - by_
authors - The changes
authorswrote, matched asChangeFilter::authorsmatches them (exact names); every change whenauthorsis empty. A logical change has one author, so it is kept or left whole: the filterjubarte changes --authorapplies (#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_inascomments.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 changeslists. One author’s touching insertions, or touching deletions, are one change with a composite id (r7+8+9+10) andChange::members; a deletion run followed by the same author’s insertion run is oneChangeKind::Replacement(modulelogicalhas the rule). Every other element is listed aslist_changeslists it. - reject_
changes - Reject the changes
filterselects; the others stay tracked. A Strict package is written back transitional, asaccept_changeswrites it. - reject_
changes_ keeping_ comments - Reject selected changes, keeping wholly removed comment threads on
empty anchors (#1279). The CLI’s
--keep-nested-commentopt-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
filterselects, asaccept_elementsaccepts 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-commentopt-in onconvert --track-changes reject.