chore: sync upstream (83 Commits) #21
No reviewers
Labels
No labels
herkunft/alpha-feedback
status
blockiert
status
zu-testen
typ
bug
typ
docs
typ
enhancement
typ
feature
typ
idea
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
iris/wordcraft!21
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "chore/sync-upstream-20261108"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Upstream-Sync von
upstream/main(83 Commits). Fast-Forward.661a7905Render: skip drawing paths far past every canvas before flattening (#5453)04217419DOCX save: collect an embedded object's relationship ids in a set (#5414)4afff61ffix(geom): measure PNGs from their chunk headers, not the decoder's header read (#5459)e76293a5fix(doc): refuse export links holding characters the writers drop (#5426)e0d8312ffix(formats): count spreadsheet cell characters as they are added (#5421)523e3194fix(formats): parse at most MAX_COLS cells of a LaTeX tabular row (#5415)735c2a53layout: keep post-break anchors with text across a wrapped row (#5937)7592d144fix(docx): refuse to carry parts named like WordCraft's bookkeeping (#5411)fde39ab0Desktop: constrain newly opened window dimensions to available screen width (#5871) (#5876)d34e341dCharts: an automatic series colour follows the series' c:idx (#5963) (#5975)535b675eDOCX: paragraph indents and spacing beyond 16 bits wrap as in Word (#5655)c8618d3efix(docx): look relationships up by id through an index (#5410)a891d861Layout: contextual spacing drops the space after a cell's last Normal paragraph (#5450)85434d2clayout: line numbers take the "Line Number" style, not a fixed 10 pt grey (#5788)76345539Layout: superscript and subscript text at 0.65 of its size rounded to the half point (#5802)## What changed The DOCX writer's content-control planner (`crates/docx/src/write/sdt.rs`) decides whether a control that covers a whole paragraph is written block-level (`w:sdt` around `w:p`) or run-level (inside the paragraph). It only treated the control as covering the whole paragraph when nothing but control-end markers followed its end. Bookmark, comment and permission range markers after the end now count as "nothing" too, so the control stays block-level and the markers stay at the end of its paragraph. ## Why Word writes a body-level `_GoBack` bookmark (`<w:bookmarkStart w:name="_GoBack"/><w:bookmarkEnd/>` directly in `w:body`) in nearly every file it saves. When the last body-level content control was followed by it, the reader put the bookmark at the end of the control's paragraph, and the writer then turned the control (and any controls nested in it) into run-level `w:sdt`s inside that paragraph. For a repeating section (`w15:repeatingSection` / `w15:repeatingSectionItem`), which must wrap whole paragraphs or rows, Microsoft 365 Word then refuses to open the saved file ("the file appears to be corrupted"). Plain nested block controls changed what they cover the same way. Found by the real-file corpus: Word reported our saved copy of a form with a repeating section as corrupted. ## How it was tested - New tests in `crates/docx/tests/it/nested_block_controls.rs` (synthetic packages): a repeating section around one paragraph, plain nested block controls, nested block controls in a table cell, a run-level control that must stay in its paragraph, and repeating sections / block controls followed by a body-level bookmark (with and without data bindings) all round-trip with the controls at the same level and the text kept. - `cargo xtask ci` passes. Co-authored-by: tpawley2001 <268951182+tpawley2001@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>