Commit Graph
1136 Commits
Author SHA1 Message Date
FredApps 9af6bdea33 Merge branch 'main' into fix/mailings-csv-limits 2026-12-02 08:15:02 +01:00
FredApps 64ec14c3df Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	ROADMAP.md
2026-12-02 13:24:47 +07:00
FredApps eff3740ec5 Merge branch 'main' into codex/fix-1913-line-spacing 2026-12-02 07:21:52 +01:00
FredApps bbf6ac60cb Merge branch 'main' into codex/fix-1913-line-spacing 2026-12-02 05:50:00 +01:00
FredApps 878f3ef2ca Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	ROADMAP.md
2026-12-02 11:47:33 +07:00
FredApps 7cd6dcdbc2 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	docs/typing-parity.md
2026-12-02 11:47:14 +07:00
FredApps b472bdef73 Merge pull request #8179 from reubgr/fix/review-resolution-preserved-refs-8129
Review: Accept/Reject All keeps revision records still referenced by untouched stories (#8129)
2026-12-02 05:25:34 +01:00
FredApps 3311690632 Merge branch 'main' into codex/fix-1913-line-spacing
Resolved docs/target-app-parity.md: kept main's table and re-applied this PR's #1913 note and its two revision-history rows.
2026-12-02 11:03:08 +07:00
FredApps b2a4699384 Merge branch 'main' into fix/review-resolution-preserved-refs-8129 2026-12-02 04:53:07 +01:00
FredApps 80f01dabb8 Merge branch 'main' into fix/3639-header-commands-own-section 2026-12-02 04:52:41 +01:00
autocraft-bot[bot] 32d96170e1 Merge pull request #3228 2026-12-02 00:36:36 +00:00
autocraft-bot[bot] aa3e7b9d5f Merge pull request #3513 2026-12-02 00:36:36 +00:00
RickiNanoandFredApps 199162f96a #7818: Review › Delete: Delete All Comments in Document and Delete All Resolved Comments (#7836)
* #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>
2026-12-01 12:24:20 +01:00
reubgr 5d93167fe0 Doc: collect text boxes inside nested shape groups (#8068) (#8158)
* 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)
2026-12-01 11:42:20 +01:00
RickiNano 6659ce4adc #7443: Insert Citation cites the source it just edited, not the last one (#7965)
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.
2026-12-01 11:39:54 +01:00
RickiNanoandSilvertree2010 43632f571c #3670: Insert Index doesn't add a second index when the existing one is in a table or text box (#8036)
* #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>
2026-12-01 11:36:36 +01:00
RickiNano e7588ff931 #7874: Home › Borders with whole table cells selected borders the cells (#7946)
* #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.
2026-12-01 11:17:38 +01:00
36e7ee7ade #6851: tracked changes are dated in local time, as Word reads w:date (#6876)
* #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>
2026-12-01 10:54:25 +01:00
Reuben Grinberg 17c6d87f0d review: assert full document equality on second-pass idempotence test (#8129) 2026-11-30 22:44:04 +00:00
Lucas Batista Vargas 0f241aef67 Mini toolbar: restore live preview and current-choice mark for Automatic and No Color (#7956) (#7957) 2026-11-30 08:19:15 +00:00
Reuben Grinberg a8f1edb45c review: avoid per-block/object heap allocation in revision retention walk (#8129)
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.
2026-11-30 03:24:23 +00:00
Reuben Grinberg d0f25cd896 review: reach fixed point in one pass on malformed PropChange chains (#8129)
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.
2026-11-30 03:09:25 +00:00
Reuben Grinberg 2f33435bb8 review: test surviving refs across stories and table-clear fast path (#8129) 2026-11-30 01:42:05 +00:00
Reuben Grinberg 8b4335903a review: retain referenced revisions on Accept/Reject All (#8129)
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.
2026-11-30 01:37:03 +00:00
Lucas Batista Vargas fff580d8f0 perf(engine,ui-egui): skip char scans in word count, memoize format::state, and cache ribbon pickers (#7903) (#7913) 2026-11-29 20:41:43 +00:00
Martin BallandClaude Opus 5.5 54f6709a97 UI port: Colors dialog shows no colour, not black, for an unknown Current (#7984) (#8048)
* 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>
2026-11-29 04:41:41 +00:00
Martin BallandClaude Opus 5.5 5f06b28447 Land 14 approved PRs with stale CI (#8069)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 23:19:22 +00:00
RickiNano 1b75d8dfd4 Find and Replace: a quote typed in Replace with goes in curly when smart quotes are on (#7949)
Co-Authored-By: RickiNano <81099017+RickiNano@users.noreply.github.com>
2026-11-28 21:59:13 +00:00
f28896acc1 Paragraph dialog: indents in points win over indents in characters (#6186)
Lands #6186 by @pakiat.

Co-Authored-By: pakiat <49967840+pakiat@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 21:54:39 +00:00
11b1b69457 #6326: text typed into an inserted table row keeps the row's font (#6370)
Lands #6370 by @Nghiathan13.

Co-Authored-By: Nghiathan13 <201675788+Nghiathan13@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 21:54:39 +00:00
2b3b9c8460 #6013: a new table's cells are in the language of the text it is inserted in (#6381)
Lands #6381 by @Nghiathan13.

Co-Authored-By: Nghiathan13 <201675788+Nghiathan13@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 21:54:38 +00:00
f0dfe49348 #5947: a paragraph style resets direct formatting as Word does (#6511)
Lands #6511 by @Nghiathan13.

Co-Authored-By: Nghiathan13 <201675788+Nghiathan13@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 21:54:37 +00:00
df3279f87e M7: explain the one-based sheet selector requirement (#6699)
Lands #6699 by @MMexicann.

Co-Authored-By: MMexicann <44814932+MMexicann@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 21:54:37 +00:00
1857c7e41b M14: list null among supported spreadsheet cell values (#6802)
Lands #6802 by @MMexicann.

Co-Authored-By: MMexicann <44814932+MMexicann@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 21:54:36 +00:00
106622972b M14: explain rejected custom table separators (#6812)
Lands #6812 by @MMexicann.

Co-Authored-By: MMexicann <44814932+MMexicann@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 21:54:36 +00:00
b6a402597f M14: trim author whitespace exposed by removed controls (#6814)
Lands #6814 by @MMexicann.

Co-Authored-By: MMexicann <44814932+MMexicann@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 21:54:35 +00:00
18368bae46 M14: prevent selection occurrence wrap on 32-bit targets (#6825)
Lands #6825 by @MMexicann.

Co-Authored-By: MMexicann <44814932+MMexicann@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 21:54:35 +00:00
FredApps e7587b4b1b Merge origin/main into codex/fix-1913-line-spacing
# Conflicts:
#	ROADMAP.md
#	crates/engine/src/cmd/design.rs
#	crates/ui-egui/src/backstage.rs
#	crates/ui-egui/src/file_dialogs.rs
#	crates/ui-egui/src/i18n/bg.tsv
#	crates/ui-egui/src/i18n/cs.tsv
#	crates/ui-egui/src/i18n/de.tsv
#	crates/ui-egui/src/i18n/es.tsv
#	crates/ui-egui/src/i18n/et.tsv
#	crates/ui-egui/src/i18n/fr.tsv
#	crates/ui-egui/src/i18n/hr.tsv
#	crates/ui-egui/src/i18n/hu.tsv
#	crates/ui-egui/src/i18n/it.tsv
#	crates/ui-egui/src/i18n/ja.tsv
#	crates/ui-egui/src/i18n/ko.tsv
#	crates/ui-egui/src/i18n/pl.tsv
#	crates/ui-egui/src/i18n/pt-br.tsv
#	crates/ui-egui/src/i18n/ru.tsv
#	crates/ui-egui/src/i18n/sr-latn.tsv
#	crates/ui-egui/src/i18n/sr.tsv
#	crates/ui-egui/src/i18n/sv.tsv
#	crates/ui-egui/src/i18n/tr.tsv
#	crates/ui-egui/src/i18n/uk.tsv
#	crates/ui-egui/src/i18n/vi.tsv
#	crates/ui-egui/src/i18n/zh-hans.tsv
#	crates/ui-egui/src/i18n/zh-hant.tsv
#	docs/target-app-parity.md
#	docs/ui-parity.md
2026-11-28 07:28:58 +07:00
FredApps bb26821f2e Merge origin/main into fix/3639-header-commands-own-section 2026-11-28 06:58:33 +07:00
FredApps b0a5ff0469 Merge origin/main into fix/mailings-csv-limits 2026-11-28 06:40:31 +07:00
FredApps e74e627a38 parity: headless column from the engine registry (RFC-0052) (#7969) 2026-11-28 00:01:17 +01:00
FredApps ebc9505a02 Make select_object crate-visible for Enter on a picture.
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.
2026-11-28 05:44:39 +07:00
FredApps 05dc3214ea Merge pull request #5870 from batistalucasv/fix/5842-compare-footnotes-endnotes
Compare: diff footnote and endnote content (#5842)
2026-11-27 23:25:36 +01:00
FredApps 148987d098 Merge origin/main into fix/4126-enter-on-picture 2026-11-28 05:22:47 +07:00
FredApps 5290f3bb62 Merge origin/main into fix/date-picture-quoted-literals-and-bare-a 2026-11-28 04:55:58 +07:00
f83d554322 Pictures: an inserted or pasted picture fits the table cell, column or section it goes in (#5428) (#6903)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: D13GOOOO <106814760+D13GOOOO@users.noreply.github.com>
2026-11-27 10:07:07 +00:00
batistalucasv aae46e1274 Merge upstream/main and resolve conflicts (#5842) 2026-11-26 23:07:51 -03:00
Martin BallandClaude Opus 5.5 ca8feb71aa test(engine): Copy with a bare caret beside an object is disabled, like Cut (#7892)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 00:47:48 +00:00
Lucas Batista Vargas 5687172000 Format Shape: add Line and Layout settings for shapes and text boxes (#5896) (#5919) 2026-11-26 21:29:47 +00:00
Lucas Batista Vargas c3e38cef0b HTML paste: container background does not leak into character shading (#6157) (#6160) 2026-11-26 21:00:49 +00:00