* Header pictures: while editing the header, a click selects its Behind Text picture wherever no header text covers it
Header and footer Behind Text pictures skip the deferred drag-over-text path
where the plain hit test picked them with no text under them, and a right-click
selects them (and sets the page they were hit on) so Reset Picture and Wrap
Text act on them. Tests cover a header and a footer, a drag, and a repeated
picture right-clicked on another page.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* #5601: header Behind Text picture: a left-click selects the copy clicked on a repeated page
The press branch of pointer() selected the picture but left page_hint on the page being edited, so on a header picture repeated on page 2 the frame and handles were resolved and drawn on page 1. Set page_hint to the picked object's page, as select_at does for a right-click. Adds a left-click counterpart to the right-click test.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* #5601: header text hit test checks each line's own extent
CodeRabbit: hf_text_at took the whole paragraph's right edge from its last line, so
a click on a long first line past a short last line's end counted as clear of text
and selected the Behind Text picture under it. Each line now has its own band and
extent.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* #5601: pin that centred and right-aligned header lines cover their whole band
Line::left/right are the edges available to a line, not where its ink sits,
so a centred or right-aligned header line already covers the Behind Text
picture across its band (indent and floats narrow it) plus 40pt. Test pins
that, and the parity row now says what counts as covering the picture.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* #5601: pin Line.left/right as band edges in the header band test
Assert the band's left edge is the 150pt indent, the centred/right ink
starts well inside it, and a click between the indent and the ink is
text. Fails if Line.left were the ink extent.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* File › Print: opened again, the page doesn't repeat the last job's message
"Print job submitted…" (or a failure) stayed on the Print page the next
time it was opened. The job's outcome is said once in the status bar, so a
fresh open drops it; a failure arriving while the page is open stays, and
printer status (finding printers, none found) still shows.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FypgCYPZSei56X4AGFPSu5
* Print page: the last job's marker is kept per window, since egui counts passes per viewport
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FypgCYPZSei56X4AGFPSu5
* #5597: decide the Print page's hidden job message per window
The shared printing.message is no longer cleared on reopening Print (ui.printSettings
and other windows still report it). Each window remembers what it said (status bar or
Print page) and hides only that; a result that arrived under File's other pages is
not counted as said. Tests: failure-on-open-page now depends on reopen detection,
never-said and two-window state.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* #5597: follow the job message by generation, not by text
A retry that fails again with the same words is a new result and shows. A generation
(WordApp::print_gen) is bumped when a job starts and when the message changes; each
window's Print memo stores generations, so cross-window comparison is by identity too.
Also: update the print_memo doc comment, drop an empty branch, align the docs row date.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FypgCXtSjB6e5jmy9Uq7u8
---------
Co-authored-by: Martin Ball <martin.ball@ucsmedical.co.uk>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Save As and Export: Browse in WordCraft when the system dialog doesn't appear (#3535) (#3801)
Ported from #3801 by VoiceLessQ onto current main.
Re-resolved against main:
- file_browser.rs tests: rebuilt whole, keeping main's #3859 tests (browser
above the dialog, Escape, dialog closing into the browser, modeless
keyboard, no keytips) and the PR's #3535 export tests.
- print_page.rs: EXPORT_FORMATS now carries main's OpenDocument Text
Template (*.ott) and Flat OpenDocument Text (*.fodt) in main's order;
main's tests module kept.
- docs/control-protocol.md: ui.fileBrowser purpose "export" added to main's
current row (keeps ui.displayServer).
- docs/ui-parity.md: File dialogs row merged with main's Linux display
server row, #3955 history row kept, status line and revision history
bumped.
Added a test that the ott and fodt export types get their extension and
write the file.
Co-Authored-By: VoiceLessQ <44067308+VoiceLessQ@users.noreply.github.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FypgCVCCEo7u5wetHaJRU4
* #3535: Word XML export from the system dialog adds .xml to a typed name
CodeRabbit: the system Save dialog accepts any name, and the engine takes the
explicit Flat OPC format only for an .xml path, so `letter` failed to export. The
extension is added as the built-in browser does; an existing file at the new name
is refused, since the dialog never confirmed replacing it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* #3535: an existing file at the .xml name is refused on the status bar
CodeRabbit: export_dialog drops ask_file's result, so the refusal was silent with a
blocking Save dialog. finish_pick now puts it on the status bar as well.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* #3535: Export refusals show on the Export page; a typed document extension gives way to the chosen type's
A refused or failed export is said on the Export page (Backstage hides the status bar), as Save As does. A known document extension on the typed name is replaced by the chosen Export type's, and any other is kept with the extension added.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* #3535: Print page shows export errors; cancel clears them; export_name edge cases
The export error is drawn inside export_formats, so the Print page shows it as well as the Export page. Cancelling an export drops an earlier error. export_name treats a name that is only a known extension (.txt) as that extension and drops a trailing dot before adding the type's.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FypgCXtSjB6e5jmy9Uq7u8
* #3535: Export error is per window; a dotfile export name gets a real extension
The export error moves from a shared Context-data id into per-window state (swapped with the window like missing_fonts), so one window's frame outside Backstage no longer erases another's message. export_name treats a dotfile name such as .docx as a stem, so the engine's explicit-format guard (Path::extension) accepts the result; Word 2003 XML exports are named the same way.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FypgCXtSjB6e5jmy9Uq7u8
---------
Co-authored-by: Martin Ball <martin.ball@ucsmedical.co.uk>
Co-authored-by: VoiceLessQ <44067308+VoiceLessQ@users.noreply.github.com>
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
* #3518: Review › Language can set the whole document's proofing language
review.language takes scope "selection" (default, unchanged) or "document":
every run and paragraph mark of every story (body, headers, footers, notes,
comments, text boxes, table cells, glossary) takes lang/noProof in one undo
step, selection unchanged, pending typing format follows. The Language dialog
gets an "Apply to the whole document" check box.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FypgCVCCEo7u5wetHaJRU4
* #3518: whole-document OK sends only what was changed in the Language dialog
With "Apply to the whole document" ticked, OK sends noProof only if the user
changed it from the dialog's opening value, and lang if changed or if neither
changed (never the engine's en-US default). Heading reads "Mark the whole
document as:" while ticked. Glossary walker uses doc's PARA_WALK_DEPTH (now pub).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FypgCVCCEo7u5wetHaJRU4
* #3518: whole-document OK with Do not check ticked marks the whole document
CodeRabbit: with the caret's text already not checked, the box was unchanged, so a
whole-document OK never sent noProof and the rest of the document stayed checked.
A ticked box is now always sent; an unticked, unchanged one is still omitted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* #3518: refuse whole-document language changes under protection
Protection leaves only its exceptions editable, so document scope is refused before anything changes. The post-check now compares the glossary, which no story-level check reached.
* #3518: whole-document language keeps per-run proofing, returns selection, skips glossary while tracking
- Language dialog: whole-document OK sends noProof only when the box was changed, so a language-only change no longer marks everything no-proof.
- review.language scope "document" returns the caret/selection result (plus scope).
- Whole-document change skips glossary blocks while Track Changes and Track Formatting are on (tracked formatting does not cover them).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* #3518: whole-document Do not check is sent when the box is clicked; report skipped glossary
- Language dialog: a whole-document OK sends noProof iff the Do-not-check box was clicked (proof_touched), so ticking it with the caret in a no-proof run still marks the whole document, while a language-only change leaves other runs alone.
- review.language document scope reports "glossarySkipped": true when the glossary was skipped under Track Changes + Track Formatting; doc comment reworded to state only the limitation.
- Docs status line and revision row bumped to 2026-11-16.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Martin Ball <martin.ball@ucsmedical.co.uk>
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-authored-by: Dylan M. Taylor <dylan@dylanmtaylor.com>
* #1537: Ctrl/Cmd+Shift+V pastes text only when no formatting was copied, as in Word for Windows
With formatting picked up by Ctrl/Cmd+Shift+C it still pastes the formatting.
Closes#1537, #4943; takes over #1562.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* #1537: review — a browser's Mod+Shift+V paste event pastes text only, once (CodeRabbit)
On the web the key no longer pastes as well: the paste event that follows carries the text.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* #1537: review — copied formatting stays for every Mod+Shift+V; a browser's paste after it is ignored (wanikhawar)
Copy Formatting keeps its formatting apart from the one-shot Format Painter brush, so a second
Mod+Shift+V pastes formatting again instead of text, and Mod+Shift+C no longer arms the brush.
After Mod+Shift+V pastes formatting, the browser's paste event for the same keystroke is ignored;
paste events read the modifiers held in event order. Only Mod+Shift+V itself falls back to Keep
Text Only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FypgCYPZSei56X4AGFPSu5
* #1537: review — one format buffer, formatting-only copy, browser paste suppression only where it exists
- ignore_next_paste armed only for Mod+Shift+V on platforms that send a paste event after it (web); never for a rebound key
- the ignored paste is dropped before equation and picture-file handling
- Event::Paste takes paste_mods so they don't leak into later pastes
- Copy Formatting and Format Painter replace each other; a used-up brush no longer hands over to older copied formatting
- copied formatting carries no hyperlink or revision marks
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* #1537: review — shared format buffer, no tracked paragraph changes, pointer press ends the paste wait
- picked_format strips ParaProps fmt_change/num_change
- Format Painter pick is stored in copied_format too; a used-up or cancelled brush leaves it
- a pointer press clears ignore_next_paste
- docs: repeat-until-replaced wording
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* #1537: review — a caret Paste Formatting keeps the target's own link and tracked marks
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* #1537: review — an unrelated key's modifiers can't steer a later paste event
A separate paste_event_mods is set by Mod changes and Mod+V's press, and cleared by any other key, a pointer press or focus change; the release path keeps paste_mods.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* #1537: review — the text-only paste test checks the destination's own formatting stays (CodeRabbit)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* #1537: review — the docs say a Format Painter pick counts as picked-up formatting too (CodeRabbit)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* #1537: review — a dropped paste uses up its modifiers; range Paste Formatting keeps the link (alehel)
- The browser paste event dropped after a formatting paste now clears paste_event_mods too, so a
later menu-bar paste isn't read as Keep Text Only. Note the no-text clipboard case.
- Test that Paste Formatting over a selection keeps the target's hyperlink.
- session.rs: copied_format holds a Format Painter pick too.
- ROADMAP: entry moved up with the other 2026-11-04 entries; stray blank line dropped.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* #1537: review — the wait for Mod+Shift+V's browser paste ends after a second, so a later menu-bar paste isn't dropped (FredApps)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FypgCX8G9hbs6XYZFsgjbL
* #1537: review — an expired paste wait drops the chord's noted Mod+Shift too (CodeRabbit)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FypgCX8G9hbs6XYZFsgjbL
* #1537: review — dropping the paired paste uses up its modifiers; range Paste Formatting keeps the target's link
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* #1537: review — restore ui-parity status line; add Paste Formatting row to typing-parity
docs/ui-parity.md: the rebase had replaced main's status line with an older one;
restore it and prepend this PR's entry. docs/typing-parity.md: add the
Ctrl/Cmd+Shift+V row to the Paste section, bump status line and history.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* #1537: Ctrl/Cmd+Shift+V's V release never pastes a second time
On desktop the chord's key-down path pastes (text, or the copied formatting) but didn't mark the
paste as done, so releasing Shift before V left a plain Mod+V release that ran Paste again through
the clipboard-picture hook, inserting the text twice. The canvas's chord now marks the paste done;
the global-shortcut path (canvas unfocused, no release seen) doesn't, and a focus change clears
the mark so a lost release can't swallow a later Mod+V picture.
Docs: web text paste needs the browser to send its paired Paste event; with formatting copied that
event is dropped only within about a second of the key.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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 -->
Register Latin Bosnian as an interface language, with catalog-backed locale, plural and font regressions. Preserve the existing system-locale detector; POSIX script-modifier handling is outside this change.
Original contribution by @nine-codes.
crates/metafile is deleted. formats, layout, render and pdf take their
WMF, EMF and EMF+ reader from craft-metafile (craft-libs 9dcbd90c, the
rev craft-docx is already pinned at), so EMF+ records are read: an EMF+
only file's DrawImage of a 32bppPARGB bitmap draws its pixels.
render and pdf draw what the shared model adds: pattern and hatch fills,
clip regions and clip paths, pen caps, joins, miter limits and dashes,
turned, skewed or mirrored bitmaps, and the opaque background behind
text. The text layout and the default font for a file that names none
(Arial, a 16-unit cell) move to layout, next to metafile_text_run.
layout/src/metafile.rs holds the rules both outputs follow: a negative
crop side draws as no crop, as before; a cosmetic pen's shortest dash
or gap is one output pixel; a dash pattern whose period is under a
pixel, or that would split a path into more than 100,000 pieces, draws
solid; and an invalid miter limit is 10. On screen, a pattern tile whose
sides are both under 1.5 device pixels fills with its average color,
computed once a tile, and the vector cache counts each item's clip
region, clip list and dash pattern.
Fixes#6636
* docx: ignore w:lnNumType without w:countBy (#6209)
* DOCX: record the w:lnNumType rule in the parity docs (#6209)
A row for `w:lnNumType` (§17.6.8), its status line and a revision entry in
`docs/file-format-parity.md`, the progress-log bullet in `ROADMAP.md`, a comment in
the reader saying why a missing `w:countBy` leaves numbering off, and a save check in
the zero-interval test.
Add layout.fitOnePage, a speculative typography search that removes one
page from the document while preserving relative font hierarchy.
Every size receives the same half-point-rounded reduction; line spacing
never falls below 0.94 of its original and body text never below 8.5 pt.
The command refuses on explicit page breaks, excessive final-page content,
formatting protection, tracked formatting and the cumulative 1 pt budget,
and leaves the document unchanged when it refuses.
Add the Layout ribbon button, KeyTip and a code-drawn icon, cover the
command with 41 tests, and regenerate the parity checklist.
#4501 split functions for `clippy::cognitive_complexity` and was meant to change no behaviour. A post-merge review of the whole diff found four places where it did. This PR restores the old behaviour in each.
- **Layout (`crates/layout/src/pass.rs`).** From section 2 on, headers, footers and footnote separators were measured under the previous section's document grid, with its SECTION/SECTIONPAGES values. Before #4501 the grid was reset first. With a docGrid line pitch in section 1 (common in CJK documents), section 2's body top moved and pages could break differently. The order is now:
1. `begin_section_state`: reset the grid, set the fields and separators.
2. `section_tops`: measure the header and footer room.
3. `apply_section_grid`: switch to the section's own grid.
New regression test `a_sections_header_is_measured_without_the_previous_sections_grid`. Without the fix, section 2's body top is 265.6 pt; with it, 226.9 pt, the same as with no grid.
- **ODT (`crates/formats/src/odt/styles.rs`).** A later paragraph default-style with no font, or a mono font, wiped the default font. It is now kept, as before #4501. Covered by a test.
- **Canvas (`crates/ui-egui/src/canvas/input.rs`).** A press that was handled showed the hover-link tooltip for one frame, which the old early `return` had skipped. This covers Ctrl+click on a link, switching to the header or footer, entering an equation, and a miss. `handle_primary_press` now returns `bool`. No test.
- **Czech suggestions (`crates/proof/src/cs/suggest.rs`).** The one-letter edits are bounded by the word's letter count as typed again. That count is clamped to the lowercased length so indexing can't go out of range. #4501 had bounded them by the lowercased length, which differs for e.g. `İ`.
`cargo xtask ci` passes locally (all 8 steps, 4606 tests).
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **Bug Fixes**
* Default document fonts remain available when a later paragraph style does not specify a usable font, and a later monospaced default does not replace an earlier proportional font.
* Headers, footers, and note separators use the layout settings and section values of their own section, helping prevent content from overlapping.
* Link hover tooltips are suppressed during canvas-handled clicks and return when the pointer hovers over the link after the press is released.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->