Commit Graph
3352 Commits
Author SHA1 Message Date
Marco Arnulfo 65e1dadce2 DOCX: a hinted East Asian or complex-script font no longer replaces the Latin font (fixes #4031) (#4067) 2026-10-24 10:12:45 -04:00
NetterSilverandClaude Haiku 5.5 7c5f3846d9 Cap label and envelope text length in mailings commands (#4008)
Fixes #3633

Co-authored-by: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-24 10:11:12 -04:00
NetterSilverandClaude Haiku 5.5 74eb4b184f Ignore quoted text when detecting recipient CSV delimiter (#4125)
Found while testing crates/engine/src/cmd/mailings.rs:526-527 (parse_csv)

Co-authored-by: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-24 10:07:58 -04:00
NetterSilverandClaude Haiku 5.5 97a6a26ca9 Format negative zero as 0 in spreadsheet import (#4040)
Found while testing crates/formats/src/sheet.rs:726-727 (fn number)

Co-authored-by: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-24 10:02:47 -04:00
LQRD 3dda0274e5 #4085: toggle the last highlight colour with the shortcut
Remember the session highlighter choice and toggle it when no explicit colour is given. Keep explicit palette/automation setters and No Color semantics, and preserve undoable formatting.

Two command/key regressions and four headless UI screenshots passed. Full cargo xtask ci passed all 8 steps with 3962 passed, 0 failed, 4 existing ignored using RUST_TEST_THREADS=1. Initial parallel run hit an unchanged Russian suggestion timing assertion; isolated unchanged binary passed at13ms. Native Word comparison pending.
2026-10-24 18:26:12 +05:00
dotCooCoo 478c1d228f AutoFormat: border lines and +---+ tables track the characters they delete
With Track Changes on, the border-line AutoFormat (`---` and the others)
and the `+---+` table AutoFormat removed the typed characters outright, so
Reject All could not bring them back. At the top of a story the border
was not recorded as a formatting change either.

Both AutoFormats now delete the characters through the tracked deletion
that Backspace uses: characters the same author inserted are removed, and
other characters are marked deleted. A border at the top of a story is
recorded as a tracked formatting change, and the caret goes after any
characters marked deleted. The table is inserted untracked, as Insert >
Table inserts one. A line that holds a tracked deletion no longer
triggers either AutoFormat, so Enter after the deleted characters is a
plain Enter.
2026-10-24 05:36:24 -07:00
vangel76andClaude Sonnet 5.5 d7c7889c82 Merge upstream/main into feat/recent-remove-2716
Interface catalogs now live in craft-i18n; the PR's tsv rows are dropped.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 14:18:34 +02:00
vangel76andClaude Sonnet 5.5 0b1704677d Merge upstream/main into zoom-stretch
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 14:01:46 +02:00
vangel76andClaude Sonnet 5.5 ec1cb78a20 Merge upstream/main into mcp-insert-table-2242
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 13:58:11 +02:00
Mat Strange 9e0312b097 Merge remote-tracking branch 'origin/main' into fix/no-op-undo-step
# Conflicts:
#	ROADMAP.md
2026-10-24 12:57:50 +01:00
vangel76andClaude Sonnet 5.5 8b06dd8666 Merge upstream/main into ui-text-hinting
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 13:56:07 +02:00
vangel76andClaude Sonnet 5.5 76a7929821 Merge upstream/main into feat/style-pr-change-2697
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 13:53:21 +02:00
vangel76andClaude Sonnet 5.5 28b5cba00c Merge upstream/main into feat/322-view-windows
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 13:53:17 +02:00
vangel76andClaude Sonnet 5.5 14526d0d81 Merge upstream/main into feat/1053-rtf-notes-comments
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 13:51:55 +02:00
dotCooCoo 2f0f2952d6 AutoFormat: Enter twice after a short line makes it a heading
AutoFormat As You Type gains "Built-in Heading styles", off by default,
as `headingStyles` on `tools.autocorrect` and a checkbox under "Apply as
you type" in the AutoCorrect dialog.

With it on, Enter in an empty paragraph right after a line of one to five
words that ends in a letter or digit makes that line Heading 1. One or two
tabs before the line make it Heading 2 or 3, and the tabs are removed. The
line must be a Normal paragraph of the main text outside a list. The caret
stays in the empty paragraph after the heading, and Undo right after
brings back the tabs and the Normal style while the Enter stays. With Track
Changes on, the tabs are marked deleted (or removed, when the same author
inserted them) and the style change is a tracked formatting change; a line
holding a tracked deletion stays as it is. A heading style locked by
formatting restrictions is not applied.
2026-10-24 04:32:21 -07:00
MichaelandClaude Sonnet 5.5 c4ea6770b2 Typed line breaks do not split a one-line content control
type_text with paragraphs is one text.insert now, and insert_text turns a
carriage return into a paragraph break whatever it is inside, so a
one-line plain-text control, where Enter does nothing, was split in two
(text.insert of "a\rb" had always done that; the per-line way never sent
the break because text.newParagraph refused it). Typed text now leaves
the breaks out there, as the Enter key does; pasted text keeps its own.

The #1356 test (a refused paragraph break is reported and nothing is typed
after it) is now about a refused insert: the lines are one command, so a
protected document refuses all of them at once.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 18:20:26 +08:00
dotCooCoo 18ec8b90e8 AutoFormat: Tab and Backspace at the start of a line set the paragraph's indents
AutoFormat As You Type gains "Set left- and first-indent with tabs and
backspaces", off by default, as `tabIndent` on `tools.autocorrect` and a
checkbox under "Automatically as you type" in the AutoCorrect dialog.

With it on, Tab before the first line of a paragraph with text indents the
first line by one default tab stop, and Tab before a later line (after a
line break or where the text wraps) indents the whole paragraph. A second
Tab before an indented or hanging first line also indents the whole
paragraph. Backspace at the start of the paragraph takes the first-line
indent back, then the paragraph's own left indent one tab stop at a time.
An empty paragraph and Tab inside a line still take a tab character.
While formatting is limited to the document's styles, Tab and Backspace
work as with the option off.
2026-10-24 03:18:43 -07:00
MichaelandClaude Sonnet 5.5 c8f103c148 MCP: type_text with paragraphs is one command (#3973)
It was a text.newParagraph and a text.insert per line. Each Session::run
that edits snapshots the whole document for Undo and for rollback, so a
command costs about the document's size: 10,000 lines took 2.8 s through
MCP (release build; doubling the lines cost 2.4-3.2x), and left an Undo
step per line. text.insert already takes a carriage return as a paragraph
break, so the lines go in as one command: ~10 ms for 10,000 (linear), one
Undo step.

Measured per call on a 10,000-paragraph document (release, microseconds):
text.newParagraph 188 in run (61 + 66 for the two snapshots, 53 in the
handler), text.insert of one character 85 (47 snapshot, 31 handler), and
caret.docEnd 261, all in its handler (it finds the last paragraph by
listing them all). The snapshots are the bulk, which is why a command per
line cannot be linear; this does not change them.

Behaviour: a CRLF is one break, not two (the per-line way inserted the
carriage return as a break and then added its own). The breaks no longer
run Enter's AutoCorrect: the per-line way capitalised every line but the
last (no Enter followed it) and fixed typos there, so what came out
depended on the line's place; the text now goes in as written, as the
tool's raw insert already did within each line.

Test: the paragraphs made equal those of the per-line way (in a list and
not, blank lines, leading and trailing breaks, indents, tabs) for text
AutoCorrect has nothing to change; lowercase lines and a typo stay as
written; CRLF; one Undo removes every line. Fails on the old code.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 18:14:33 +08:00
dotCooCoo 00405dba63 Proofing: web addresses after a no-break space are not marked as misspelled
The spelling check found the start of the white-space-delimited token around
a word one byte after the last white-space character. After a no-break space
(two bytes in UTF-8) or an ideographic space (three bytes) that offset is
inside the character, so the token could not be read and was never classified
as a web or e-mail address. With Ignore web and file addresses on, the words
of such an address were still marked as misspelled.

The token now starts after the whole white-space character. A proofing test
covers a web address, a www. address and an e-mail address after the two
spaces, with the option on and off.
2026-10-24 01:54:29 -07:00
Dylan M. TaylorandClaude Sonnet 5.5 cf2fe4733e Sonar S7682: explicit return in env.sh helpers (#4105)
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 04:51:32 -04:00
dotCooCoo ff19c7d68b AutoFormat: *bold* and _italic_ marks around punctuation alone stay as typed
A span converts only when the text between the marks holds a letter
or digit, so `*?!*` and `_-_` keep their marks.
2026-10-24 01:38:14 -07:00
Dylan M. TaylorandClaude Sonnet 5.5 ba7e7293e4 Sonar S1612: pass PoisonError::into_inner instead of a closure (#4102)
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 04:33:12 -04:00
Dylan M. TaylorandClaude Sonnet 5.5 01d0c63451 Sonar S1612: use fn paths for simple method closures (#4103)
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 04:33:08 -04:00
OPUZZLES e39c00b3c1 #3977: use exact line height for table contact 2026-10-24 10:32:07 +02:00
dotCooCoo b95ed87699 AutoCorrect: status lines and revision history for the wide-space fix
ROADMAP.md and docs/typing-parity.md now carry 2026-10-24 in their status
lines and a revision history row for the AutoCorrect fix. docs/gaps.md has
no entry for it.
2026-10-24 01:11:27 -07:00
dotCooCoo 755e2cfb90 AutoFormat: AutoCorrect goes on after *bold* and _italic_ marks
After a `*word*` or `_word_` span is converted on a space, punctuation
or Enter, the word without its marks is AutoCorrected as before:
replacements, capitals, ordinals and links (`*teh* ` becomes bold
`The `). Undo right after still restores the marks in one step, and
after Enter the Enter stays. A marked web address becomes a link
without carrying its bold or italic into the text typed after it.
2026-10-24 00:54:46 -07:00
47edcd2ff2 chore: resolve SonarCloud maintainability issues (#4083)
* chore: resolve SonarCloud maintainability issues

* fix: restore compiling refactors, revert behaviour changes, run cargo fmt

- fontdb::norm: keep the closure for filter (char::is_alphanumeric takes
  self, not &self, so it does not fit Iterator::filter).
- story.rs: write_mark_rpr needs &mut self (rev_attrs, rpr_change).
- Revert the viewport meta change and the return 0 added to
  workspace_version/sha256, which changed behaviour or masked failures.
- cargo fmt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Import Document in odt page_parts after dropping glob re-export

* fix: apply_kind_properties binds ContentControl; cell_ref keeps char closures

* fix(engine): pass case helpers by value (clippy needless borrows)

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Dylan Taylor <dylan@craftmaker.dev>
2026-10-24 03:54:19 -04:00
dotCooCoo 37016564f3 AutoCorrect: words after a no-break space are corrected
AutoCorrect found the start of the word before the caret one byte after the
last white-space character. After a no-break space (two bytes in UTF-8) or an
ideographic space (three bytes) that offset is inside the character, so the
word could not be read and AutoCorrect left it as typed: no replacement, no
sentence capital, no ordinal superscript and no link.

The word now starts after the whole white-space character. A typing test
covers a replacement, a sentence capital and a web address after each of the
two spaces, and an ordinal after each.
2026-10-24 00:32:45 -07:00
Emmanuel 17957b6fd5 autoscroll: make the cursor follow the scroll direction 2026-10-24 13:00:10 +05:30
aiongg 3db25e4aa9 Tests from main: mailing results open beside the source document 2026-10-24 06:51:04 +00:00
skylartaylor fd071202e7 E37: migrate WordCraft to egui 0.37 with guarded IME and capture lifecycle 2026-10-24 08:30:31 +02:00
OPUZZLES 6ac17ff1f8 fix(layout): include exact table contact at line bottom (#3977) 2026-10-24 08:25:07 +02:00
dotCooCoo 16454c5f30 AutoFormat: *bold* and _italic_ become real formatting as you type
AutoFormat As You Type has a new option, "*Bold* and _italic_ as real
formatting". When it is on and a word is finished by a space,
punctuation or Enter, text enclosed in asterisks becomes bold and text
enclosed in underscores becomes italic, for plain and complex-script
text, and the marks are removed. The opening mark has to start a word
and the enclosed text may not start or end with a space, so 2*3* and
file_name_ stay as typed, and so do marks around a picture, field or
content control.

Undo right after brings the marks back; after Enter, the Enter stays.
The paragraph Enter makes is formatted as after a plain Enter. With
Track Changes on, only marks the current author typed as tracked
insertions are converted, and nothing is converted while formatting is
limited to the document's styles.

The option is off by default. Scripts set it with "boldItalic" on
tools.autocorrect, and the AutoCorrect dialog shows it on the AutoFormat
As You Type tab.
2026-10-23 23:21:54 -07:00
aiongg 753c624a7d W1: the log says why an opened file didn't replace the active document 2026-10-24 06:14:27 +00:00
Moriarty Puth 9740e73bd2 Layout: a document of many pages paid a body-length scan per page
The wrap areas of footers and the table areas of headers are looked up
per page, and on a cache miss the code asked Document::sections() for
the section properties — a walk of the whole body. A document whose
every paragraph starts a page (200 k one-line paragraphs, 2 MB) took
68 s to lay out, 84 % of it in those walks: the cost grew with pages x
paragraphs. Carry the section list on the Ctx instead — one walk per
pass — and let both sites read it there; the document does not change
during a pass, so the list is the same.
2026-10-24 11:41:58 +07:00
aiongg 6f7da7345f W1: every way of opening a file goes through WordApp::open_file 2026-10-24 04:12:56 +00:00
Federico Olivares b1e1ebf319 Merge origin/main 2026-10-24 00:56:17 -03:00
aiongg 00856d7178 Merge remote-tracking branch 'upstream/main' into w6
# Conflicts:
#	ROADMAP.md
#	crates/engine/src/session.rs
#	crates/ui-egui/Cargo.toml
#	crates/ui-egui/src/control.rs
#	crates/ui-egui/src/i18n/bg.tsv
#	crates/ui-egui/src/i18n/cs.tsv
#	crates/ui-egui/src/i18n/da.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/nl.tsv
#	crates/ui-egui/src/i18n/pl.tsv
#	crates/ui-egui/src/i18n/pt-br.tsv
#	crates/ui-egui/src/i18n/ro.tsv
#	crates/ui-egui/src/i18n/ru.tsv
#	crates/ui-egui/src/i18n/sl.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
#	crates/ui-egui/src/lib.rs
#	docs/gaps.md
#	docs/parity-checklist.md
#	docs/ui-parity.md
2026-10-24 03:53:36 +00:00
c524027f34 PDF: pin craft-libs 9f75d3dc for the PNG and PDF input bounds (#4084)
* #1365: PDF: pin craft-libs main, whose Krilla leaves out simple-text (no rustybuzz, ttf-parser)

craft-libs 8f5a2831 turns Krilla's default features off in the shared
workspace and keeps raster-images, so simple-text (the only path to the
unmaintained rustybuzz and ttf-parser) is no longer built. WordCraft
shapes text itself and hands Krilla positioned glyphs. The vendored Krilla
and craft-pdf's writer are unchanged between the two revisions.

Cargo.lock loses rustybuzz, ttf-parser, core_maths,
unicode-bidi-mirroring, unicode-ccc and unicode-properties.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* #1365: docs/shared-pdf.md: rewrap the backend features paragraph

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* PDF: pin craft-libs main, which bounds decoded PNG images in Krilla

* PDF: pin craft-libs 9f75d3dc, with the PDF input bounds of craft-libs#254

---------

Co-authored-by: rabis <340973947+rabis7575@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 22:59:53 -04:00
Federico Olivares 5482de06ac Merge origin/main 2026-10-23 21:10:47 -03:00
14001aee65 Proofing options reach the Czech, Croatian, Indonesian, Italian, Polish and Portuguese checks (#3966)
Each of these languages accepted every word in capitals of up to six letters and every word
with a digit on its own, so turning off Ignore words in UPPERCASE or Ignore words that contain
numbers had no effect on them for short words. The check now takes the options, as the Spanish
one does; the direct is_correct/is_correct_with keep the defaults.

Co-authored-by: Federico Olivares <FedeOlivares@users.noreply.github.com>
Co-authored-by: aiongg <67543387+aiongg@users.noreply.github.com>
2026-10-23 20:07:34 -04:00
nexotiqandGPT-6 cfa59f2c73 cu20we: preserve non-paragraph float origins and document cap contracts
Use the pre-spacing origin only for paragraph-relative box floats. Expand
regression coverage for line anchors and frameless page/margin fallbacks,
and document the cap conversion helpers and synthetic regression contracts.

Merge upstream main through 478fd445 and reconcile the roadmap progress log.
Native CI stages passed; the WASM gate passed on a targeted rerun after a
local sandbox linker adjustment. Optional catalog/font inputs were absent.

Co-Authored-By: GPT-6 <codex@openai.com>
2026-10-23 18:57:51 -05:00
Federico Olivares a7ec12d513 Merge origin/main; fix false missing-opening-mark flags on correctly opened questions; stabilise dictionary test 2026-10-23 20:57:36 -03:00
skylar taylor-barrick 478fd44530 Merge pull request #4072 from benandez/craft-i18n-pilot
i18n: interface translations from craft-i18n (pilot)
2026-10-23 17:00:38 -06:00
seifandClaude Opus 5.5 244e769520 Comments: times in the user's own time zone, in the pane and the balloons (#2322, #2337)
The Comments pane showed the file's UTC time and the balloons showed no time. Both now
show each comment's and reply's time under its author in local time, as Word does. The
file's UTC time (Word's w16cex:dateUtc) wins over w:date, a time naming its zone is
converted and one without a zone shows as written. The desktop app reads the zone with
chrono, the web app asks the browser.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 17:00:19 -06:00
Federico Olivares beb665f771 #3360: Spanish address lookup is a binary search, not a scan per character
Maintainer review on #3562: opening_marks reverse-scans the characters before a
question or exclamation mark, and ends_clause asked in_address for each one,
which scanned every address range, so a paragraph of thousands of addresses
followed by a question took quadratic time (about 99 KB: hundreds of ms).

address_at() finds the range a byte is in with a binary search over the
sorted, disjoint ranges, and also gives ends_clause the range's end without
another scan. Behaviour is unchanged (the URL and punctuation regressions
still pass).

- address_lookup_finds_the_range_a_byte_is_in: boundaries of the lookup
- many_addresses_before_a_question_stay_linear: 99 KB of addresses before a
  question or exclamation (the review's reproducer and two variants), checked
  for the right issue range and for taking under 75 ms (about 1 to 5 ms now,
  about 300 ms with a scan per character)
2026-10-23 19:27:07 -03:00
nexotiqandGPT-6 e56d516c45 cu20we: preserve shape line caps in DOCX and rendering
Carry flat, square and round outline caps through ShapeExtra, DrawingML and VML
import, DOCX export, display items, raster strokes and PDF strokes. Keep older
JSON documents default-flat and preserve WordCraft ink's tool-defined caps.

Add JSON, DOCX/VML round-trip, raster-pixel and PDF-operator regressions. Record
the verified coverage and remaining theme/native Word checks in the parity docs.

Co-Authored-By: GPT-6 <codex@openai.com>
2026-10-23 17:11:15 -05:00
nexotiqandGPT-6 f5ce292fae cu20we: anchor box floats above paragraph spacing
Use the paragraph origin before effective space-before when placing floats in
headers, footers, table cells and text boxes. Keep text and wrap exclusions
relative to the text top, matching the existing body layout convention.

Cover all four box contexts with synthetic layout regressions and update the
gap, parity and progress records. Native Word comparison remains pending.

Co-Authored-By: GPT-6 <codex@openai.com>
2026-10-23 17:10:59 -05:00
Federico Olivares 707f02efae Merge origin/main into spanish-proofing
Upstream merged #3177 (dictionary hints for every Hunspell language) and #3480.
Resolve the conflicts in crates/proof/src/lib.rs by taking #3177's
dictionary_loaded/dictionary_needed structure and adding the four Spanish
varieties to it, and in docs/spelling-dictionaries.md keeping both sides.
2026-10-23 19:06:06 -03:00
Martin BallandClaude Opus 5.5 85877b185e Merge main into craft-i18n-pilot
Catalog rows from #3480 and #3177 move to craft-i18n (storytold/craft-i18n sync/wordcraft-topup); the pin moves to 04600cb.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-23 23:03:23 +01:00