100 Commits
Author SHA1 Message Date
8b73226375 Newspaper columns keep a paragraph's last lines together, as Word does (#6828)
* Layout: balanced columns keep a continued paragraph's last lines together from Word 2013's layout

When the columns of a section's last page are balanced before a continuous
break, Word (compatibility mode 15) does not leave one line of a paragraph
alone in a column: the last two or three lines of a paragraph that began on the
page before, and a two- or three-line paragraph that begins the page, stay in
the first column that can hold them. settled_end only guarded a paragraph's
start, and skipped even that at the top of a column, so the balancing tries
split such lines one per column and the section came out a line short.

In mode 15, while balancing, widow/orphan control also applies at the top of a
column, a one-line fragment of a continued paragraph with more after it moves
on whole, and lines it moved go to the next column instead of overflowing.
Mode 14 and unbalanced flow are unchanged. Part of #6821 fix, measured in Word
with synthetic documents (see layout::tests::balanced_tail).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* Layout: balanced columns also keep kept paragraphs whole, and the lines are pinned beside notes and floats (#6821)

Measured in Word for Windows (synthetic documents, exact 14 pt lines, two and
three columns, compatibility mode 15): a paragraph with keep lines together, or
keep with next and the paragraph after it, stays whole in the first balanced
column; the tails and short paragraphs behave as before beside a footnote and a
square-wrapped picture; a section that starts and ends on one page, and plain
page flow with a footnote, widow control on and off, already matched.

keep_together now also applies at the top of a column while balancing in mode 15.
The move-on after widow/orphan control is taken only when that control, not a row
beside a floating object, moved the lines back (review of the first commit).
Tests added for notes, floats, a mid-page section, keep lines/next, unbalanced
columns and mode 14.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* Layout: balanced columns fall back to the old layout when the strict rules cannot fit, and keep paragraphs ask again at a column top (#6821)

Second review: pass(full) can now fail (a page whose columns are a couple of
lines high), so balance_columns lays the page out once more without the strict
rules of Word 2013's layout (PageBuilder::relaxed, kept across the snapshot
restore) instead of leaving a spilled pass. A paragraph moved to a column top
by the lines before it asks keep lines / keep with next again there, and keeps
going on to a column that holds it. Tests: the columns' left edges come from the
first page, a page too short for the rules keeps every line, docs reworded.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* Layout tests: classify columns by the declared column edges

The balanced-tail test helper took column edges from observed caret positions, so an empty middle column could be mistaken for the last one. The edges now come from the section geometry and keep every declared column.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* Layout: release floats when balancing moves their anchors (#6821)

Use the same overflow decision for line emission and for retaining late floats. Cover the strict widow control case and qualify the balancing evidence.

---------

Co-authored-by: vangel76 <[email protected]>
Co-authored-by: Claude Sonnet 5.5 <[email protected]>
Co-authored-by: Martin Ball <[email protected]>
2026-11-21 17:00:25 +00:00
e15a3f9861 A header with a logo and title in an older-layout document no longer pushes the page body down, as in Word (#6809)
* Layout: a header at compatibility mode 14 or lower keeps its text beside its own floats

In Word, a header in a document of Word 2010's layout or older does not move its
text below or beside the header's own floating objects. A top and bottom object
only makes the header taller when it starts above the end of the text. From mode
15 the text goes below the object, which WordCraft already did in every mode.

Part of #6805. Not built or run yet.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* Layout: header floats at mode 14: measured wraps only, tests read the header, distances

Only top and bottom and square objects stop wrapping the header's text at
compatibility mode 14 and lower (Tight and Through were not measured). The
distance below a top and bottom object counts, as in Word. The tests read the
header's own items, add the distance, space-after and multi-paragraph cases, and
the measured numbers are in the test file's header. The layout_box change moves
into three small helpers.

Part of #6805.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* Layout: header floats at mode 11 measured in Word, test and notes say so

The legacy header path applies below compatibility mode 15, so mode 11 (.doc files)
takes it too. Measured in Word on synthetic .doc files: mode 11 keeps the header text
beside its own top and bottom object like modes 12 and 14. Add a test for it and drop
"mode 11 not measured" from the test header, ROADMAP and layout-parity notes.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* docs: narrow header float coverage

Refs #6805

* docs: specify header contour compatibility

Refs #6805

---------

Co-authored-by: vangel76 <[email protected]>
Co-authored-by: Claude Sonnet 5.5 <[email protected]>
Co-authored-by: Martin Ball <[email protected]>
2026-11-21 16:37:17 +00:00
05fe5c0598 Layout: a row of hyphens wraps at any hyphen, as in Word (#6856)
Word breaks a line between two hyphens in a row, so a ruled line made of
hyphens after a gap first fills the line and continues on the next. UAX #14
(LB21) keeps the hyphens together, so the whole row moved to the next line
and the paragraph got one line more than in Word. Add the break after U+002D
when another U+002D follows, next to the existing breaks before a digit and
before a slash and a letter. Non-breaking hyphens and minus signs stay
unbreakable.

Co-authored-by: vangel76 <[email protected]>
Co-authored-by: Claude Sonnet 5.5 <[email protected]>
Co-authored-by: Martin Ball <[email protected]>
Co-authored-by: Martin Ball <[email protected]>
2026-11-21 16:14:39 +00:00
4db39e40eb Layout: a paragraph of only a page break moves when it doesn't fit (#3198)
* Layout: a paragraph of only a page break moves when it doesn't fit

* Apply cargo fmt

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* docs: name the deferred double-spacing case in the break-only paragraph entry

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

---------

Co-authored-by: Dominik Strebel <[email protected]>
Co-authored-by: Claude Sonnet 5.5 <[email protected]>
Co-authored-by: Martin Ball <[email protected]>
Co-authored-by: vangel76 <[email protected]>
Co-authored-by: Martin Ball <[email protected]>
2026-11-21 15:52:13 +00:00
f44b2e4165 A table row split across pages no longer runs off the bottom of the page (#6827)
* Tables: split the paragraph that starts a cell's part of a page where its lines fall

A row split across pages whose cell continued with a paragraph of two or three
lines, of which only the first (or two) fit, kept nothing on the page: the
orphan/widow rule moved the paragraph on whole, but it already started the page.
The row was then placed whole and ran off the bottom. Word splits such a paragraph
where the lines fall (a lone first line stays; three lines with room for two split
two and one; a continuation's lone line stays). A paragraph below other content of
its cell, and a row starting below other content of a page, keep the rule.

Part of #6823 (phase 1: not built or run yet).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* Tables: a can't split row taller than a page splits at the page's end; more Word-measured cases

A can't split row (not an exact one) taller than a page now moves to a new page when it starts
below text and splits where the page ends, as Word does, instead of running off the page. The
tests now cover nested tables, a repeated header row, text lines, rows with several paragraphs and
the exact configurations measured in Word. The earlier note that Word keeps two and one below
other content was a misreading of a run without compatibility mode 15 and is removed.

Part of #6823 (phase 1: not built or run yet).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* Tables: review fixes for the split-row work

The new test module defines its own lay helper; only text in the flow decides which paragraph
starts a cell's part of a page, so a floating picture above it no longer keeps the old orphan
rule; a can't split row only splits when it is taller than the room; a stale test comment is
updated; tests for a floating picture and a row that fits a page.

Part of #6823.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* Tables: a test for a floating picture above the first paragraph; rustfmt

Floats are placed with the first piece of their paragraph, so the test puts the picture on the
table's first page. Without the in-flow-only rule it fails.

Part of #6823.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* 6823: Document split-row limits

* 6823: Clarify widow control in split rows

---------

Co-authored-by: vangel76 <[email protected]>
Co-authored-by: Claude Sonnet 5.5 <[email protected]>
Co-authored-by: Martin Ball <[email protected]>
2026-11-21 15:32:16 +00:00
45f49e9990 No empty page before the next section when a section's last paragraph has Keep with next (#6835)
* Layout: Keep with next on a section's last paragraph no longer adds an empty page

A paragraph that closes a section whose next section starts on a new page (next page, odd or
even) has nothing on its page to keep with. Keep with next still added the next section's first
line to the room it needed, so a closing paragraph that fitted at the bottom of a full page was
moved to the next page, leaving a page holding only it. Word ignores Keep with next there. The
chain lookahead stops at the closing paragraph too. Before a continuous section the old
behaviour stays (not measured in Word).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* Layout: exact-geometry tests for keep with next at a section end (#6834)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* Layout: format, and say odd/even breaks are by analogy (#6834)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

---------

Co-authored-by: vangel76 <[email protected]>
Co-authored-by: Claude Sonnet 5.5 <[email protected]>
Co-authored-by: Martin Ball <[email protected]>
2026-11-21 15:30:13 +00:00
Valentin KleinandClaude Sonnet 5.5 caa4c4b114 Enter in a paragraph with a drop cap no longer copies the drop cap (#6793)
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-17 08:10:58 +01:00
Valentin KleinandClaude Opus 5.5 4e2a5c2b8f Table borders no longer look blue and uneven (#6048)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-17 07:42:09 +01:00
Valentin KleinandClaude Sonnet 5.5 c817cc95c6 Render: keep a metafile with huge bitmaps in the cache instead of parsing it on every repaint (#5494)
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-17 03:32:02 +01:00
Valentin Klein bc0e51ee4d Interface size: Auto is capped to what fits the screen, Ctrl+Shift+0 returns to Auto (#4030) (#5203)
Fixes #4030

On a small screen (an 11-inch 1366x768 panel) the system can report a very large display scale. The Auto interface size followed it blindly, so the window and ribbon came out far bigger than the screen and File > Options, where the size is set, could not be reached.

What this changes:
- Auto interface size is now capped so a window of at least 900x460 points still fits the screen (about 152% on 1366x768). Scales that already fit (for example 1920x1080 at 100-150%, or 1366x768 at up to 150%) are unchanged. If the screen size is unknown there is no cap.
- A size chosen in File > Options is still taken as is. If a large size pushes the options out of reach, Ctrl+Shift+0 (Cmd+Shift+0 on Mac) returns to Auto from anywhere. Ctrl+Alt+0 is not used because it is AltGr+0 on some layouts and would type a character.
- `ui.interfaceSize` and the "Auto (n%)" label in Options report the capped value. The cap is never saved to `ui.json`.
- Tests: the cap for several screen sizes, the shortcut, AltGr+0 still typing, and the reported percent. Docs: ui-parity, control-protocol, ROADMAP progress log.

Not covered:
- The root cause of the oversized scale (X11 DPI detection) is handled by #721 and #3240. This change is separate and works with or without them.
- A manually chosen large size can still push controls off screen, but there is now a way back.
- Not tested on a real 1366x768 screen.

`cargo xtask ci` passed locally on the pushed code; GitHub CI has not run yet.

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

* **New Features**
  * Auto interface sizing now scales down on smaller displays to keep a window of at least 900×460 points within the screen. Sizes selected in Options remain uncapped, and the minimum Auto scale is 100%.
  * Press Ctrl+Shift+0 (⌘⇧0 on Mac) to restore Auto sizing. When Auto sizing is capped, the displayed zoom percentage reflects the screen-fit limit; the cap does not change the saved size.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-11-15 12:12:27 +01:00
vangel76andClaude Opus 5.5 7095a4eaf1 Text boxes in a group: the topmost member takes the click
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-09 23:30:34 +01:00
vangel76andClaude Opus 5.5 37e891544d Text boxes in a group: a click edits their text
A text box inside a group (Word's cards made of a coloured bar and a text
box) could not be edited: every click selected the whole group, and typing
then replaced the group with the typed text. Layout now keeps each group's
text box areas on the group's object, and hit testing treats them like a
text box on its own: inside is the box's text, the border and the group's
other members still grab the group (#6027).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-08 23:04:59 +01:00
vangel76andClaude Opus 5.5 bce47689ad Line numbers: number every column, and use a localised Line Number style
In a multi-column section every line number was drawn left of the page
margin, so the second column's numbers sat on top of the first column's.
Each column now has its numbers left of its own edge, as in Word.

Word in other languages saves the built-in "line number" style under a
localised id (German: Zeilennummer); the numbers now find it by its
built-in name when there is no LineNumber id, so its formatting applies.

Fixes #6018.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-08 22:40:14 +01:00
vangel76andClaude Opus 5.5 5ad865831f .doc: drop the guard paragraph mark at the end of header and footer stories
[MS-DOC] 2.3.3 ends every non-empty header/footer story with a guard paragraph
mark that is not part of the story. It was read as an empty paragraph, which
added a line under every header and footer and pushed the first body line down
when the header reached past the top margin (#5922).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-08 22:18:08 +01:00
vangel76andClaude Opus 5.5 52d1668507 Resolve only the navigated style change
Every style-definition change sits at the same collapsed anchor at the
start of the document, so Accept or Reject there resolved all of them,
across authors, and so did any caret put at the document start. Next and
Previous Change now remember which style change they selected (style id
and revision, for that document and selection), step between style
changes that share the anchor, and Accept/Reject resolve that revision
alone. A caret placed there any other way resolves no style change;
Accept/Reject All and a whole-body selection still resolve them all.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-08 18:49:57 +01:00
vangel76 d590dc7848 Merge upstream/main into feat/style-pr-change-2697 2026-11-08 18:22:02 +01:00
vangel76andClaude Opus 5.5 3e62a60400 Merge upstream/main into PR #2703
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-08 17:37:24 +01:00
vangel76andClaude Opus 5.5 72a7afd9b5 Merge upstream/main into PR #3195
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-08 17:37:24 +01:00
vangel76andClaude Opus 5.5 e7e9bc2759 Merge upstream/main into PR #3195
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-08 17:24:03 +01:00
vangel76andClaude Opus 5.5 dbbc43a89a Merge upstream/main into PR #2703
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-08 17:18:43 +01:00
vangel76andClaude Opus 5.5 5125de6f1f Merge upstream/main into PR #1056
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-08 16:18:07 +01:00
vangel76andClaude Opus 5.5 59030b1bb5 Merge upstream/main into PR #331
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-08 16:18:07 +01:00
vangel76andClaude Opus 5.5 4050f1bf8b Merge upstream/main into PR #5115
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-08 16:18:07 +01:00
02e74a5d9c Add Delete Previous Sentence with Ctrl+Shift+Backspace (#5094)
Co-Authored-By: Claude Haiku 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Codex <[email protected]>
2026-11-08 16:13:33 +01:00
Valentin KleinandClaude Opus 5.5 69d2a2e131 docs/gaps: gap 16 RTL in HTML/ODT/RTF landed (#2696)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-08 15:57:36 +01:00
vangel76andClaude Opus 5.5 833c0154aa Merge upstream/main into control-mcp-delivery-1326-1331
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-08 06:18:12 +01:00
vangel76andClaude Opus 5.5 0a3fb5828e Merge upstream/main into feat/1053-rtf-notes-comments
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-08 06:18:12 +01:00
vangel76andClaude Opus 5.5 e344bb4243 Merge upstream/main into PR #3197
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-08 05:19:14 +01:00
vangel76andClaude Opus 5.5 4a507de3d6 Merge upstream/main into PR #3195
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-08 05:19:14 +01:00
vangel76andClaude Opus 5.5 5d139d0f0e Merge upstream/main into PR #2703
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-08 05:19:14 +01:00
vangel76andClaude Opus 5.5 d07f50dd8b Merge upstream/main into PR #5116
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-08 05:19:14 +01:00
vangel76andClaude Opus 5.5 87e08051bf Merge upstream/main into PR #2596
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-08 05:19:14 +01:00
vangel76andClaude Opus 5.5 6367400215 Merge upstream/main into control-mcp-delivery-1326-1331
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-08 04:21:51 +01:00
vangel76andClaude Opus 5.5 9655b2da50 Merge upstream/main into test/fixed-layout-fonts-2729
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-08 04:21:38 +01:00
vangel76andClaude Opus 5.5 66e169c343 Merge upstream/main into ui-text-hinting
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-08 04:21:35 +01:00
vangel76andClaude Opus 5.5 1c6c7c732e Merge upstream/main into feat/paper-colors-3398
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-08 04:20:39 +01:00
Valentin KleinandClaude Sonnet 5.5 677e610886 Tests: the file name field updates on Save As and Rename (#3796) (#5308)
Pin that FILENAME and FILENAME \p in a header show the new name and path after Save As, that a Word-style FILENAME \* MERGEFORMAT field drops its cached name, and that Rename is picked up by Update Field. No production code changes.

Refs #3796

Co-authored-by: Claude Sonnet 5.5 <[email protected]>
2026-11-08 03:55:02 +01:00
vangel76andClaude Opus 5.5 dba2b3b5e9 Merge upstream/main into zoom-stretch
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-08 03:26:05 +01:00
vangel76andClaude Opus 5.5 beab4e8e9c Merge upstream/main into zoom-stretch
Upstream's new layout tests start with crate::test_fonts(), like the others.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-08 03:25:18 +01:00
vangel76andClaude Opus 5.5 c9090ba95a Merge upstream/main into feat/1053-rtf-notes-comments
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-08 03:17:59 +01:00
vangel76andClaude Opus 5.5 c606533853 Merge upstream/main into zoom-stretch
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-08 03:17:59 +01:00
vangel76andClaude Opus 5.5 4774749a05 Merge upstream/main into feat/1053-rtf-notes-comments
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-08 02:27:44 +01:00
vangel76andClaude Opus 5.5 20a10a5f33 Merge upstream/main into zoom-stretch
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-08 02:26:30 +01:00
Valentin KleinandClaude Sonnet 5.5 0131d5c3aa .doc import: resolve character formatting per run, not per character (#5478) (#5495)
* docbin: a field's cached result keeps its formatting per run, not per character (#5477)

The result was a Vec<(char, CharProps)>: 365 bytes per character, 1.44 GB
at peak for a 4 MB file with one field. It is now a String plus a run
list that gains an entry only when the formatting changes (25 MB peak
for the same file). Output is unchanged.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* docbin: show the objects when the field-result test fails

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* docbin: resolve character formatting per run, not per character (#5478)

The text loop looked up the piece four or five times and the CHPX once
(a backward scan over up to 101 FKP entries) for every character, and
cloned the memoised 368-byte CharProps each time. Now the walk keeps the
piece span and the CHPX run of the previous character and reuses them
while the next character is inside, and hands the memoised properties
to the paragraph builder by reference: they are cloned when a run
starts and not compared while the resolved formatting is unchanged.
Output is identical, also on corrupt pages (a run's FC range is
bounded by the smallest later start).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* docbin: tests for run ranges across bins, empty pieces and a whole read

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

---------

Co-authored-by: Claude Sonnet 5.5 <[email protected]>
2026-11-08 01:51:17 +01:00
vangel76andClaude Sonnet 5.5 e4310ec5c7 Merge upstream/main into feat/1053-rtf-notes-comments
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-08 01:17:09 +01:00
vangel76 ecbabc327c Merge remote-tracking branch 'upstream/main' into m1056
# Conflicts:
#	docs/file-format-parity.md
2026-11-08 00:30:11 +01:00
vangel76 34b4caf317 Merge remote-tracking branch 'upstream/main' into m2596
# Conflicts:
#	ROADMAP.md
2026-11-08 00:29:41 +01:00
vangel76 8ab285e61d Merge remote-tracking branch 'upstream/main' into m3195
# Conflicts:
#	ROADMAP.md
2026-11-08 00:27:34 +01:00
vangel76 490437fa87 Merge remote-tracking branch 'upstream/main' into m3197
# Conflicts:
#	ROADMAP.md
2026-11-08 00:27:30 +01:00
vangel76 4925e06391 Merge remote-tracking branch 'upstream/main' into m1056
# Conflicts:
#	docs/file-format-parity.md
2026-11-08 00:19:35 +01:00
vangel76 5c2e5ce0d0 Merge remote-tracking branch 'upstream/main' into m2596
# Conflicts:
#	ROADMAP.md
2026-11-08 00:19:30 +01:00
vangel76 274d40fc4d Merge remote-tracking branch 'upstream/main' into m3195
# Conflicts:
#	ROADMAP.md
2026-11-08 00:19:26 +01:00
vangel76 570c39e287 Merge remote-tracking branch 'upstream/main' into m3197
# Conflicts:
#	ROADMAP.md
2026-11-08 00:19:22 +01:00
vangel76andClaude Sonnet 5.5 f1b5f0b4de Layout test: install the pinned fonts before the #4720 chart fallback lookup
The test asked the global font database for a fallback face before any
layout call, so the pinned fonts could no longer be installed.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-07 18:24:08 +01:00
vangel76andClaude Sonnet 5.5 ddb1d37de3 Merge upstream/main into test/fixed-layout-fonts-2729
Keep upstream's split of layout_para and install the pinned fonts at its
start. Refit the main tests added since (#4250 widow and footnote length,
#4720 chart fallback font) to the pinned test fonts. Merge the two
wordcraft-layout dev-dependency tables.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-07 18:22:44 +01:00
vangel76andClaude Sonnet 5.5 d98a335ae8 Hinting test: render a bundled face at a fixed size; refit a #4250 footnote test to the pinned fonts
The hinting test took whatever default font the machine resolved, so its grey-pixel threshold
depended on the system. It now sets Source Sans 3 at 12 pt (4.7 percent fewer grey pixels).
The footnote test's note length was chosen against system fonts and is now the one that fits
the pinned test fonts, which every layout call now installs.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-07 16:35:41 +01:00
vangel76andClaude Sonnet 5.5 bbc6d94dbe Layout tests: install the pinned fonts in the layout entry points and font helpers
layout, layout_para, layout_equation and mark_text_width call test_fonts() first in test
builds, so the shared lay helper and everything that goes through them is covered. Tests and
helpers that look up fonts directly (the Times New Roman substitute test, the Symbol bullet
test, the Arabic/Myanmar/Thai face probes and the nbsp fixture) call it themselves. Audited by
running every layout test in its own process with a temporary guard that panicked on any
global font access before the pinned fonts were installed.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-07 16:32:22 +01:00
vangel76andClaude Sonnet 5.5 d0498254a2 insert_table: an explicit null values is a parameter error, not the CSV sample table
The CSV fallback is now only for an absent values field. A null values argument is rejected
before anything is inserted. Null cells inside a valid row still work. Engine and MCP
regressions check that the document and the undo history stay unchanged.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-07 16:31:38 +01:00
vangel76andClaude Sonnet 5.5 9fd9ce54b7 Side by Side keeps the scrolling choice for an unchanged partner; drop queued partner scroll on pairing changes
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-07 16:27:10 +01:00
vangel76andClaude Sonnet 5.5 d94bbc8fe0 Layout tests: install the pinned fonts in the layout entry points and font helpers
layout, layout_para, layout_equation and mark_text_width call test_fonts() first in test
builds, so the shared lay helper and everything that goes through them is covered. Tests and
helpers that look up fonts directly (the Times New Roman substitute test, the Symbol bullet
test, the Arabic/Myanmar/Thai face probes and the nbsp fixture) call it themselves. Audited by
running every layout test in its own process with a temporary guard that panicked on any
global font access before the pinned fonts were installed.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-07 16:16:20 +01:00
vangel76andClaude Sonnet 5.5 18a26b41ce layout tests: give a #4250 widow test a paragraph-length range that fits the pinned test fonts
With the fixed test fonts the paragraph with a widow needs fewer repeats
than the search range started at.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-07 12:22:51 +01:00
vangel76andClaude Sonnet 5.5 9f9190f0d7 layout tests: give two #4250 tests geometry that fits the pinned test fonts
The footnote text length and the paragraph-length search range in these two
tests were chosen against system fonts; with the fixed test fonts the page
breaks fall elsewhere.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-07 12:16:50 +01:00
vangel76andClaude Sonnet 5.5 1c7c4e66e0 Merge upstream/main into control-mcp-delivery-1326-1331
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-07 11:38:09 +01:00
vangel76andClaude Sonnet 5.5 2d6da7a326 Merge upstream/main into ui-text-hinting
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-07 11:38:09 +01:00
vangel76andClaude Sonnet 5.5 30a439899b Merge upstream/main into feat/1053-rtf-notes-comments
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-07 11:37:52 +01:00
vangel76andClaude Sonnet 5.5 875a62043a Merge upstream/main into feat/322-view-windows
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-07 11:37:52 +01:00
vangel76andClaude Sonnet 5.5 7ca1dd1802 Merge upstream/main into zoom-stretch
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-07 11:37:52 +01:00
vangel76andClaude Sonnet 5.5 a5b1518a10 Merge upstream/main into zoom-stretch
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-06 01:10:51 +01:00
vangel76andClaude Sonnet 5.5 4e334166e5 Merge upstream/main into control-mcp-delivery-1326-1331
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-06 01:10:42 +01:00
vangel76andClaude Sonnet 5.5 8df01e481f Merge upstream/main into feat/1053-rtf-notes-comments
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-06 01:10:42 +01:00
vangel76andClaude Sonnet 5.5 4ac7292d62 Merge upstream/main into feat/recent-remove-2716
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-06 01:09:58 +01:00
vangel76andClaude Sonnet 5.5 67c9b8ac31 Merge upstream/main into ui-text-hinting
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-06 01:06:04 +01:00
Valentin KleinandClaude Sonnet 5.5 c0ab7e29f9 .doc import: a field's cached result keeps its formatting per run, not per character (#5477) (#5489)
* docbin: a field's cached result keeps its formatting per run, not per character (#5477)

The result was a Vec<(char, CharProps)>: 365 bytes per character, 1.44 GB
at peak for a 4 MB file with one field. It is now a String plus a run
list that gains an entry only when the formatting changes (25 MB peak
for the same file). Output is unchanged.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* docbin: show the objects when the field-result test fails

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

---------

Co-authored-by: Claude Sonnet 5.5 <[email protected]>
2026-11-05 09:14:56 +01:00
Valentin KleinandClaude Sonnet 5.5 122c85bd09 .doc import: cap paragraph and cell marks, keep the table context only for table marks (#5476) (#5486)
* docbin: cap paragraph and cell marks, keep the table context only for table marks (#5476)

The walk budget counts characters, not paragraphs, so a file made of
paragraph marks grew memory about 2,000 times faster than its size
(4 MB of marks: 9.4 s, 8.4 GB peak). Marks now draw on one document-wide
cap (2,000,000, all stories together); past it the read returns
DocbinError::Limit. A ParaOut no longer embeds the 296-byte RowInfo of a
table mark: it is an optional box, present only for table marks.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* docbin: say what the paragraph cap bounds; name the budget test for what it checks

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* docbin: refuse an exhausted paragraph budget before assembling a story (review point)

CodeRabbit pointed out that the header, footnote, endnote and text box walks
assembled their partial paragraph lists before the budget check, a transient
memory peak. They now share story_blocks, which checks first.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* docbin: test that the paragraph cap is shared by the body and a footnote (review nitpick)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* docbin test: review fixes (assert empty pairs, comment wording)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

---------

Co-authored-by: Claude Sonnet 5.5 <[email protected]>
2026-11-05 09:14:25 +01:00
Valentin KleinandClaude Sonnet 5.5 475ca5420b Drop-down list button: pressing it no longer moves the caret out of the control (#5389) (#5485)
* Content controls: a press on the drop-down list button no longer moves the caret (#5389)

The list button hangs over whatever follows the control. The canvas put the
caret under the pointer first, which left the control, and the list closed in
the frame it opened. A press on the button now skips the caret move.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* Content controls: only a press that began on the list button skips the caret move (#5389)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* Content controls: a press and release in one frame, and a table tool, no longer hit the button guard (review points)

CodeRabbit pointed out that egui clears press_origin when a press and its
release arrive in the same frame, so the caret still moved off the control and
closed the list; the press is now also read from the frame's events. It also
pointed out that the guard ran before the table pen, so a stroke could not
start over the button; the guard is skipped while a table tool is on.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* Content controls: feed the same-frame press and release as one frame in the test

Harness::event runs one frame per event, so the earlier version of the test did
not exercise the single-frame case.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

---------

Co-authored-by: Claude Sonnet 5.5 <[email protected]>
2026-11-05 09:14:16 +01:00
vangel76andClaude Sonnet 5.5 401e7c9169 Merge upstream/main into feat/322-view-windows
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-05 04:13:02 +01:00
vangel76andClaude Sonnet 5.5 3daa6b1e78 Merge upstream/main into feat/1053-rtf-notes-comments
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-05 04:09:53 +01:00
vangel76andClaude Sonnet 5.5 e4ba85346d Merge upstream/main into mcp-insert-table-2242
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-05 04:06:29 +01:00
vangel76andClaude Sonnet 5.5 ebdca4feb8 Merge upstream/main into zoom-stretch
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-05 03:51:36 +01:00
vangel76andClaude Sonnet 5.5 44eb54eef9 layout: one dev-dependencies table after the merge
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-05 03:36:34 +01:00
vangel76andClaude Sonnet 5.5 75a905802c Merge upstream/main into ui-text-hinting
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-05 03:36:06 +01:00
vangel76andClaude Sonnet 5.5 097cddbd03 Resolve and test style changes through Arc::make_mut after the shared-stylesheet change on main
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-05 03:32:58 +01:00
vangel76andClaude Sonnet 5.5 2c17b04f9a Merge upstream/main into feat/paragraph-tools-5043
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-05 03:29:32 +01:00
vangel76andClaude Sonnet 5.5 7814450d0a Merge upstream/main into feat/style-pr-change-2697
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-05 03:27:01 +01:00
vangel76andClaude Sonnet 5.5 951b255b80 Merge upstream/main into control-mcp-delivery-1326-1331
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-05 03:26:18 +01:00
vangel76andClaude Sonnet 5.5 37a627c61e Merge upstream/main into feat/paper-colors-3398
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-05 03:23:54 +01:00
vangel76andClaude Sonnet 5.5 0ff06b9d86 backstage: fix Align2 path after merge
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-05 03:23:46 +01:00
Valentin KleinandClaude Sonnet 5.5 5e4c92bf20 contributors: set names for vangel76 (#5520)
Co-authored-by: Claude Sonnet 5.5 <[email protected]>
2026-11-05 02:01:19 +01:00
Valentin KleinandClaude Sonnet 5.5 c9ecb1a14b Metafiles: read the picture size from the header instead of parsing the whole file (#5481) (#5493)
metafile_size() parsed the whole metafile, decoding every bitmap and building every path, to
read two numbers at picture insert and replace. A new wordcraft_metafile::size reads the frame
from the EMF header or the placeable WMF header, and falls back to the full parse for every
other file (plain WMF, an EMF without a usable frame, a file with no records), so it returns
what parse would. For an EMF with one 8000x5000 1 bpp bitmap the size now costs well under a
microsecond instead of about 280 ms.

Co-authored-by: Claude Sonnet 5.5 <[email protected]>
2026-11-05 01:32:30 +01:00
Valentin KleinandClaude Sonnet 5.5 c38cd8c407 Metafiles: decode DIB bitmaps with the bit depth chosen once per bitmap (#5479) (#5492)
decode_clip matched the bit depth, bounds-checked and (for 16 and 32 bpp) divided per channel
for every pixel. The depth, palette and masks are now turned into a row decoder once per
bitmap: a 256-entry colour table for 1/4/8 bpp, plain channel swaps for 24 bpp and default
32 bpp, and precomputed shifts and scale tables for masked 16/32 bpp. Output is byte for byte
the same; the old per-pixel code stays in the tests as the reference.

Co-authored-by: Claude Sonnet 5.5 <[email protected]>
2026-11-05 01:32:25 +01:00
Valentin KleinandClaude Sonnet 5.5 991a21dee6 Metafiles: refuse a bitmap whose side no renderer draws before decoding it (#5480) (#5490)
decode_clip only capped width x height at 40 MP. A 32 x 1,250,000 pixel 1 bpp bitmap (about
5 MB in the file) was decoded to 160 MB of RGBA and kept, then dropped by Item::take_pixels
because its side is over MAX_BITMAP_SIDE, while counting against the parse's 256 MB budget.
decode_clip now returns None when the clipped width or height is over the cap, so crops of a
large bitmap that fit still decode.

Co-authored-by: Claude Sonnet 5.5 <[email protected]>
2026-11-05 01:32:20 +01:00
vangel76andClaude Sonnet 5.5 d5495ea4f8 Merge upstream/main into feat/recent-remove-2716
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-05 00:12:16 +01:00
Valentin KleinandClaude Sonnet 5.5 1350f62bf0 #2726: AccessKit focus guard — every tree update carries its focused node (#2742)
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-04 13:59:15 +01:00
vangel76andClaude Sonnet 5.5 afc01f8328 Paragraph tools: walk runs once for live characters; stronger tracked-change tests
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-04 02:14:50 +01:00
vangel76andClaude Sonnet 5.5 9e391e97f4 Paragraph tools: skip tracked-deleted characters; snapshot revisions once per command (review)
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-04 02:04:56 +01:00
vangel76 2113f52db4 Merge upstream/main into feat/paragraph-tools-5043 2026-11-04 02:00:59 +01:00
vangel76 098cf86dc8 Merge upstream/main into feat/paragraph-tools-5043 2026-11-04 01:01:08 +01:00
vangel76andCodex e99e28aebd M8: finish paragraph tools (#5043)
Co-Authored-By: Codex <[email protected]>
2026-11-04 00:53:50 +01:00
vangel76andCodex 4abae255e0 M8: refresh screen paper colors (#3398)
Co-Authored-By: Codex <[email protected]>
2026-11-03 19:57:50 +01:00
vangel76andClaude Sonnet 5.5 0b6e052d73 Merge upstream/main
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-03 00:01:00 +01:00