* #7818: Review › Delete: Delete All Comments in Document and Delete All Resolved Comments
Review › Comments › Delete becomes a split button whose menu has Delete,
Delete All Comments in Document (the existing review.deleteComment
{"all": true}) and Delete All Resolved Comments, a new
review.deleteComment {"resolved": true} that deletes each resolved
comment with its replies and keeps the open ones, in one undo step.
thread_of becomes threads_of, taking several roots and building the
reply map once, so deleting many resolved threads stays one pass.
* #7818: regenerate the parity checklist after merging main
main added the headless count; with this PR's two commands it is 512.
---------
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
* fix(doc): collect text boxes inside nested shape groups (#8068)
Walk InlineObject::Group trees iteratively in member order in both
InlineObject::text_boxes and InlineObject::text_box_slots so text boxes
nested inside groups of groups are collected, kept alive by
Document::prune_text_boxes, and repointed consistently during fragment
adoption and comparison.
* test(doc,engine): cover nested-group text box collection, pruning and Session survival (#8068)
Add wordcraft-doc unit tests for nested-group text_boxes and text_box_slots
collection across depths 1..40, prune_text_boxes preservation with chain links
and unreachable boxes, and cyclic nested-group story termination. Add an
end-to-end wordcraft-engine Session test verifying nested-group text boxes
survive mutating commands and copy/paste adoption.
* test(doc): flatten text_box_slots iterator to satisfy clippy (#8068)
references.citation with a source and no tag now cites the tag that
source was added or edited under, instead of the last source in the
list. Manage Sources' add step moves into add_source, which returns
that tag.
* #3670: Insert Index doesn't add a second index when the existing one is in a table or text box
Insert Index looked for the INDEX field only in top-level body paragraphs.
An index in a table cell, a text box, a header or a footer (as imported
documents can have it) was missed, so a second index went in at the caret,
and Update Index reported success without rebuilding it.
Both commands now refuse with a message saying where the index is, the way
an index can't be inserted outside the main text either. Rebuilding an
index where it sits is not supported.
Builds on #3961 by @Silvertree2010; this version also finds an index
held as a range field (as Word files hold it) or in a text box.
Co-authored-by: Silvertree2010 <133535268+Silvertree2010@users.noreply.github.com>
* #3670: Insert Index counts only the headers a page shows, and leaves a range-field index to Update Index
* #3670: refuse a range-field index that follows text, and prove Update Index rebuilds one that starts its paragraph
* #3670: refuse an index in a table or box even when the main text has one too
---------
Co-authored-by: Silvertree2010 <133535268+Silvertree2010@users.noreply.github.com>
* #7874: Home › Borders with whole table cells selected borders the cells
Home › Paragraph › Borders always set paragraph borders, so with the
table (or rows, columns or a block of cells) selected, All Borders drew
a separate box around each paragraph instead of a grid on the cell
edges. With whole cells selected, para.borders now applies the kind to
the cells as one block: all borders every cell, outside the block's
edges, inside the lines between its cells, none clears every side, and
one side toggles along that edge. A caret or text selection still
borders the paragraphs.
* #7874: block borders reach the cells beyond the edge and rows with gridBefore
Review fixes for #7946. Each cell draws its own sides, so a line set on
the selected block's edge is now also set on the facing side of the cell
beyond it: No Border on a row no longer leaves the neighbouring rows'
lines showing. A row's first and last cells count as the block's outer
edge when the row skips grid columns (gridBefore/gridAfter), as the
layout draws them.
* #7874: Borders on whole cells judges the block's edges by the cells picked, and toggles a line the table style draws
A row that skips the selected grid columns (w:gridBefore) leaves a gap: the selected cells above
and below it now face it with an outer edge, so Outside draws those lines and Inside doesn't.
One side now toggles on the line the cells show, the table style's included: the layout's cell
border resolution is cell_borders in wordcraft-layout, and the first press on a Table Grid line
takes it off.
* #7874: Borders on whole cells looks up the selected cells by row, and toggles a line off only when it runs all along the edge
A line the cells beyond an edge draw counts as shown only when every one of them draws it, so a
line along part of a wide cell's edge is completed rather than taken off.
* #7874: Borders on whole cells resolves the table's style, borders and grid width once per press
wordcraft_layout::CellBorders resolves them for one table; cell_borders stays a wrapper.
* #7874: Borders on whole cells takes in all of a vertically merged cell
Selecting a cell merged over several rows from its first row selects only that row; the rest of
the merge now counts as selected, so No Border clears the whole cell's outline.
* #7874: Borders on whole cells counts a line beyond an edge as shown only where it spans the whole edge
A row below that skips columns (w:gridAfter) draws the facing line along part of the edge only;
the press now completes the line instead of taking it off.
* #6851: date tracked changes in local time, as Word reads w:date
Word writes w:date as the local wall-clock time with a Z it doesn't mean,
and reads it back the same way. WordCraft stamped new tracked changes with
UTC, so Word showed them shifted by the author's offset from UTC.
Typing, deletions, moves, formatting changes and Compare's result now take
cmd::revision_date(): the local time from the existing local_offset_secs
helper, written with a Z. Comments keep their w16cex:dateUtc and are
unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* #6851: the local-time test accepts any second between its samples
Review on #6876: the tracked change may be stamped a second after the
first sample and before the second, so compare against the interval, in
order, rather than its two ends.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* #6851: check the stamp against each second's own local time
Review on #6876: across a backward daylight-saving change the local times
of the two samples no longer bound the stamp. Sample the UTC clock instead
and accept the local time of any second between the samples.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* #6851: the local-time test pins its zone and covers every revision
A test-only, per-thread zone for revision_date() lets tracked_changes_carry_the_local_time
stamp at UTC+8:45 on any runner. On CI's UTC runner a UTC stamp was also the local one, so
switching a call site back to now_iso() passed. The test now makes a revision through each
place that dates one: typing, a paragraph tool, formatting, AutoFormat's border line, a tracked
cut pasted as a move, and Compare.
* #6851: keep tracked change dates in UTC; convert w:date at the DOCX boundary
The document keeps the UTC instant, so revision grouping tells apart two
edits an hour apart in the repeated hour as daylight saving time ends.
Saving .docx/.docm/.dotx/.dotm or Word XML writes w:date as local
wall-clock time with a Z, as Word writes and reads it; opening them reads
it back to UTC. Tests set the clock and zone per thread.
* Dependencies: take craft-libs main at 8a5b916541
8a5b916541 is craft-libs#3220: craft-docx reads and writes w16du:dateUtc
on tracked changes and keeps it in the shared model's Revision, so two
changes with one local w:date stay two. #6876 (#6851) builds on it.
The egui and winit forks craft-libs builds with are unchanged
(b9770908e0, a517b3846e). Cargo.lock: the craft-libs sources move to the
new rev and craft-control-protocol, a craft-libs crate, is added.
* #6851: tracked changes keep their UTC time beside w:date
A revision now has date_utc, as comments do, read from and written to
w16du:dateUtc by craft-docx. Changes made here are stamped with both in
UTC, grouped by the UTC instant, and a Word save writes their w:date in
local wall-clock time, as Word does, with dateUtc beside it. A change read
from a file is written as read: open no longer guesses the zone a w:date
without dateUtc was written in. review.changes reports the UTC time when
it is known.
Two edits in the repeated hour reopen as two changes, and Reject on the
second leaves the first pending.
* Dependencies: section metadata test expects w16du in mc:Ignorable
craft-libs#3220 declares the w16du namespace in body parts and lists it
in mc:Ignorable, so readers that don't know it ignore it.
* #6851: rustfmt the test revisions
* #6851: docs describe dateUtc and dates written as read
* #6851: date a change in local time when it is made, not when it is saved
The save treated a revision whose w:date equals its dateUtc as made here
and moved its w:date to local time. A file written in UTC has the two
equal too, so saving it in another zone moved the time Word shows for an
edit nobody touched.
A change made here now gets its local w:date when it is made
(cmd::made_revision), with its UTC time in date_utc, and saves write
every revision as it is. Nothing is inferred from the dates.
* #6851: OpenDocument dates a tracked change by its UTC time
A change made here keeps Word's local wall-clock time in `date`, which
the ODF writer wrote verbatim as dc:date, an instant, so an edit at
08:33 UTC at UTC+8 was exported as 16:33 UTC. The ODT, OTT and Flat ODF
exports now date a change by its UTC time where it is known, and by
`date` otherwise.
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Martin Ball <98639962+benandez@users.noreply.github.com>
Dispatch paragraphs directly in collect_block and non-Group inline
objects directly in collect_object/remap_object, initializing iterative
stacks lazily with Vec::new() so heap allocation occurs only for tables
nested inside tables or non-empty groups nested inside groups. On the
common no-surviving-references fast path, retain_referenced_revisions
performs zero heap allocations for paragraphs, non-nested tables, and
non-nested inline objects while keeping every resolution output identical.
Stop descending into PropChange::old during revision collection when the
outer PropChange::rev is out of bounds, matching step_prop_change which
discards the outer PropChange and any buried indices together. This
ensures retain_referenced_revisions leaves only genuinely referenced
records in doc.revisions after a single Accept/Reject All pass.
Add regression tests covering an invalid outer formatting change burying
a valid inner index (both standalone and mixed with valid/nested chains)
and asserting full document equality on a second resolution pass.
Compact doc.revisions instead of unconditionally clearing it in
resolve_all, keeping entries still referenced by surviving stories or
metadata (such as Ruby or content-control run properties) and remapping
every surviving reference consistently. When no references survive,
clear doc.revisions directly as before.
* fix(colors): Colors dialog shows no colour, not black, for an unknown Current; Current reads more targets (#7984)
Needs craft-libs ColorPickerDialog::no_current and the Colors: heading
(craft-libs branch fix/7984-colors-compare-none); waits for the pin to move.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FypgCWNarDG3QfXK2YMzdx
* fix(colors): table shading Current skips cells a ragged table lacks (#7984)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FypgCWNarDG3QfXK2YMzdx
* fix(colors): Current reads the run shading the command changes (#7984)
para.shading shades the selected text, not its paragraph, when the selection is text within one
paragraph. Current now reads the selected runs' shading (new "shading" key in format.state, None
when mixed or unset) under the engine's own shades_text rule, now pub. shape.effects Current reads
shapes only, as the command applies glow to shapes only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FypgCWNarDG3QfXK2YMzdx
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The #4126 port called select_object from insert_break in text/unicode.rs
through a pub(super) re-export, but the function itself was only
pub(super) in objects/select.rs, so clippy failed on the private re-export.