mirror of
https://github.com/storytold/wordcraft.git
synced 2026-12-01 18:24:54 -06:00
f8a42491c6d760bbbc6c9b83177561c1f00da96b
1160
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
188be727b7 |
Merge pull request #5887 from batistalucasv/fix/5847-justified-tab-shrink
Layout: a justified line with a tab shrinks the spaces after its last tab (#5847) |
||
|
|
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> |
||
|
|
29bb5a4f44 | Merge upstream/main and resolve ROADMAP conflict (#5847) | ||
|
|
5e129ac951 |
Validate: add wordcraft validate, a structural integrity checker for .docx (#5875)
* Validate: add wordcraft-validate, a structural integrity checker for .docx (#5848) * Validate: harden verdict integrity against unavailable package content Follow-up to the CodeRabbit review round. The contract throughout: a check that could not run must not report as though it did, and content that could not be read must not be treated as absent. - Unreadable zip entries keep their identity (from the zip reader's own metadata) and are marked content-unavailable; every absence- dependent error is suppressed while any part's identity or content is unknown, and the run reports INCOMPLETE instead of a FAIL manufactured from missing data. - The same guard now covers the typed-relationship, image-reference, custom-XML schema, comment/note-reference and numbering checks, in both owner scopes. - Scan finalisation splits prefix-established findings (always reported) from completion-dependent ones (gated on a complete scan); duplicate checking marks INCOMPLETE when the entries budget leaves raw directory records unexamined, and when the central directory cannot be parsed at all. - CLI: surplus operands are a usage error before any file is validated; non-Unicode paths validate normally; report output escaping audited. - Corpus generators fixed (vMerge/gridSpan, commentsExtended paraId, pinned zip timestamps, fixture 23 isolation); corpus and calibration fixtures regenerated. Seventeen new tests, each mutation-checked. One residual recorded in the PR discussion: a readable-but-unparseable commentsExtended part can still draw unsupported COMMENTEX-LINK warnings (Warning severity only; cannot change a verdict). * Validate: add docstrings across validator and corpus functions (#5875) * Validate: document the budget tests; correct a coverage note's identifier name The budget-exhaustion tests in the lib.rs test module were the remaining undocumented functions of any complexity on the branch. Each now carries a docstring stating the contract it pins. Also corrects the read_comments_ids budget note: the values it records are w16cid:paraId values, so the note now says 'later paraIds were not recorded' instead of 'durableIds'. * Validate PR 2 step 0: content-model tables and generated model.rs Add the ECMA-376 content-model tables the grammar checks will read, and the deterministic chain that produces them: - crates/validate/model/: the v2 (namespace-qualified) extractor, the WML and DrawingML tables for Strict and Transitional, generate_model.py (JSON -> Rust), and a README with the regeneration chain, archive URLs and SHA-256s, the generator's failure conditions and scope limits. - crates/validate/src/model.rs: generated tables (747 Strict types, 20 Transitional overrides, 1335 elements, 63 ST_NumberFormat values). It is not read by any check yet (dead_code allowed until the first rule). - crates/validate/src/model_tests.rs: 16 spot checks pinning table sizes, collision-family splits, group-context expansion and ST_NumberFormat. - ATTRIBUTION.md rows for the four tables and model.rs. WML Strict regenerates byte-identical to content_model_v2.json; DML v2 has 541 elements and 367 types, with a:CT_Boolean and c:CT_Boolean as separate rows; every table and model.rs regenerate byte-identically. Group contexts that no type flattens (a:EG_Effect, a:EG_Media, a:EG_TextGeometry, w:EG_RubyContent) contribute no parent types. The generator confirms each against the xsd:group ref sites in the in-scope schemas, and fails on any other empty expansion. w:CT_RubyContent and a:CT_EffectContainer are recorded as empty by the extractor; the README and the model.rs header say checks must treat them as unmodelled. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * PR2 Step4: detect table cells without a terminal paragraph * Validate PR 3: MATH-PLACEMENT — math elements where Word refuses them MS-OI29500 Part 1 §22.1.2.77 notes (b), (d), (e), (f) and §22.1.2.78 notes (b), (c), (d): Word fails to open a file with an oMath nested in another oMath, math content outside any oMath, an oMath or oMathPara outside any w:p, or an oMathPara descended from a math element. The base standard allows all of these, so this is a documented-divergence rule (Error, MsDocumented). A stray math island is reported once, at its root element. Story parts only, matching the documented scope. * Validate PR 3: COMMENT-RANGE-COUNT and PROTECTION-PASSWORD COMMENT-RANGE-COUNT (MS-OI29500 Part 1 §17.13.4.4 note (a)): Word will not open a file with more than 32767 comment ranges. Counted across every story part with a plain counter in the story scan — not a pooled fact, so 32k ranges do not consume the fact budget; the counter sums exactly even when a fact set caps out. PROTECTION-PASSWORD (MS-OI29500 Part 1 §17.15.1.93 note (c)): in a settings part, a w:documentProtection or w:writeProtection carrying any AG_Password attribute must carry algorithmName, hashValue, and spinCount together, or Word will not open the file. Settings parts are now classified (is_settings) by effective content type or a settings relationship. * Validate PR 3: CONTENTPART-TYPE — a contentPart target that is not text/xml MS-OI29500 Part 1 §17.3.3.2 note (a): Word will fail to load the document if the content part's content type is not text/xml. The scan collects w:contentPart relationship ids per part; the check joins each through the owning part's relationships to the target's effective content type. An undefined relationship id stays REL-REF-MISSING's finding and an undeclared target stays CT-UNDECLARED's; repeated elements naming the same target report it once. * Validate PR 3: compat-mode count limits — BOOKMARK-COUNT, PERM-COUNT, MOVE-RANGE-COUNT With w:uiCompat97to2003 set in settings, Word fails to open a file with more than 16,380 bookmarks (MS-OI29500 §17.13.6 (b)), 32,752 range permissions (§17.13.7.1 (b), §17.13.7.2 (d)), or 32,751 moveFrom/moveTo ranges (§17.13.5.24 (a), counted by start markers, from and to together). Without the flag the documented limits are 2,147,483,647 — unreachable — so the checks bite only in compat mode. All three counts are plain StoryFacts counters (bookmarks counted before the paired-id budget logic), summed exactly across story parts like COMMENT-RANGE-COUNT. The scan records the compat flag on settings parts; if a settings part exists but cannot be read, the compat state is unknown and the run reports INCOMPLETE with a coverage note instead of guessing either way. * Validate: count raw name bytes in central-directory duplicate detection (#5895) Count duplicate entry names on raw bytes during central-directory parsing rather than decoded strings, preventing distinct legacy-encoded entry names from falsely colliding as replacement-character duplicates. Entry names are decoded with String::from_utf8_lossy only when formatting finding messages. Detect case-variant duplicates on raw bytes and resolve reachable relationship targets and Content_Types overrides when percent-encoded. (From reubgr/wordcraft#2, by batistalucasv.) * Validate: scope the #5895 landing to the issue as filed The preceding commit lands reubgr/wordcraft#2 in full in the history; this adjustment brings the shipped tree back to what #5895 covers: - Removed: percent-decoded equivalence in entry lookup, reachability, and content-type resolution. Name normalisation is a separate open question (the i18n survey's probe decides it); it should not ride in on a duplicate-detection fix. - Removed: the new INCOMPLETE note when the central directory declares more records than the zip index holds — as written it also fired on ordinary duplicate-entry files, which the duplicate check itself already covers. - Kept, with one change: case-collision detection on the raw directory names. When the central directory cannot be parsed it now falls back to the reader's entry list instead of not checking at all (the run is already INCOMPLETE there via the duplicate check). * Validate PR 3: NOTE-PR-LISTING and NOTE-PR-DANGLING — the footnotePr join ECMA-376 Part 1 §17.11.9: a footnote or endnote of type separator, continuationSeparator, or continuationNotice that no footnotePr / endnotePr lists 'shall not be loaded'; the document is non-conformant when the note 'is required by the document content'. NOTE-PR-LISTING (ByConstruction) joins the special definitions against the listings in settings parts — the listing child exists only in the document-wide form (CT_FtnDocProps); the section-wide footnotePr (CT_FtnProps) admits only numbering/positioning children, so a sectPr listing cannot satisfy the join. Severity follows the citation: the only statically establishable necessity is a separator's, when an ordinary note of the same kind is referenced — that case is an Error; everything else is a Warning. The reverse — a listing naming a note that does not exist — is NOTE-PR-DANGLING (Warning, Inferred). Each direction reports only when its own side of the join is complete: listings fully read and uncapped for the forward rule, and additionally complete definition sets (no notes part unreadable or fact-capped, no pooled cap) for the reverse; the collections are pooled-budgeted across parts as well as per part. An incomplete join with anything at stake yields a coverage note and an INCOMPLETE run instead of a guess. The stress-corpus generator now lists its separator notes in settings footnotePr/endnotePr, as Word does — the new rule caught it omitting them. Corpus regenerated; manifest hashes updated. (Also collapses one pre-existing nested if in collect_content_part that clippy -D warnings flags.) * Validate PR 3: HEADERSOURCE-PRESENT — w:headerSource in mail merge settings MS-OI29500 Part 1 §17.14.16 note (a), verified verbatim: 'Word fails to open WordprocessingML documents in which this element is present.' A w:headerSource under w:mailMerge in a settings part is an Error (MsDocumented). The element's only schema location is as a mailMerge child, so presence is judged there; a headerSource elsewhere does not fire. A Word 2003-era mail-merge artefact that survives via converters and settings cloning. * Validate: bound CONTENTPART-TYPE collection and index its lookups Two findings from the C3 increment's review round that the fix round missed (the delta review scoped only a separate question): the contentPart id collection ignored the fact budget — per part and pooled — and the check deduped ids and resolved relationships with linear scans, quadratic in the number of references. Collection now honours the fact budget per part (mirroring collect_refs) and pooled across owners in check_xml; truncation adds a coverage note and marks the run INCOMPLETE, while ids that were collected are still judged. Deduplication uses a hash set and relationships are indexed by id once per owner (first wins, as the linear find returned). Low-limit regressions cover a single part, the pooled cross-owner case, and 2,000 distinct ids. * Validate: enforce pooled budgets while appending, not after The C8 delta review's remaining P2: the note collections (and, since its hardening commit, the contentPart ids) were pooled- budgeted by extending first and truncating after the scan loop, so accumulation could reach the per-part cap times the part count before the bound applied, and truncate does not release capacity. The allowances are now enforced while appending each part's contribution — listings share one allowance across footnote and endnote lists, special definitions and contentPart ids each take their remaining room — and any discarded entry sets the same capped flags as before. Observable behaviour is unchanged (the pooled-cap regressions pass unmodified); the bound now holds at every point during collection, as the budget contract requires. * Validate: pin the capped CONTENTPART-TYPE verdicts From the hardening delta review: with collection capped, collected references that are valid must yield INCOMPLETE (not PASS — not every reference was checked), and collected references that are defective keep FAIL precedence over the incomplete marking, alongside the coverage note. Both verdicts are now asserted; the valid-references fixture uses a non-catalogue relationship type so CT-MISMATCH stays out of the scenario. * Validate: reconcile PR 3 grades with the batch-b6 oracle results Calibration batch b6 ran one Word-for-the-web fixture per PR 3 rule (19 files; the first run was invalidated by a fixture-builder defect, the rebuilt batch's control opens clean). Outcomes: Confirmed at the corruption banner, evidence upgraded to Observed: CONTENTPART-TYPE (image target banners, text/xml twin clean) and HEADERSOURCE-PRESENT. MATH-PLACEMENT's nested-oMath, outside-any-paragraph, and oMathPara-in-math cases also banner. Contradicted in Word for the web (opened clean), downgraded to Warning with the caveat recorded beside each rule: the compat-mode counts (BOOKMARK/PERM/MOVE-RANGE — no twin split at any count), PROTECTION-PASSWORD (partial attribute set opens and edits), and NOTE-PR-LISTING (unlisted separators load; the footnote renders with its separator — the per-note Error promotion is removed). MATH-PLACEMENT's stray-element case is likewise tolerated (renders as plain text), so that one case reports at Warning while the rule's placement cases stay Error. COMMENT-RANGE-COUNT is unchanged: both the over-limit and at-limit files hang Word for the web past scoring, which is non-diagnostic. Tests pin the new severities and the Observed grades. * Validate PR 3: COMMENT-RANGE-UNPAIRED — a lone comment range start or end MS-OI29500 Part 1 §17.13.4.4 notes (b)-(c) and §17.13.4.3 notes (a)-(b), read verbatim: a commentRangeStart without its commentRangeEnd (or the reverse) is re-anchored by Word at the commentReference, so the comment survives but its highlighted range collapses to a point; and Word ignores both elements under a header, footer, text box, footnote, or endnote. Warning / MsDocumented. Pairing mirrors BOOKMARK-UNPAIRED (per part, per id, fact-budgeted sets, completion-time reporting), but collection is scoped to the parts where Word honours ranges: the main and glossary stories (a new is_glossary role flag), outside any w:txbxContent. COMMENT-RANGE-COUNT's document-wide counter is unchanged. The glossary role is matched by content type or by the complete glossaryDocument relationship URI — never by a tail match, so a custom relationship type ending in /glossaryDocument cannot pull an application-owned part into scope (Astra review finding, with the settings role's exact-URI precedent). * Validate PR 3: the paraId family — PARAID-DUP and PARAID-VALUE MS-DOCX v20260818 §2.6.2.3 and §2.6.2.4, read verbatim before implementing. PARAID-DUP (Warning / MsDocumented): the same w14:paraId value on two elements in one document part; values compare as numbers, so padding and case are one identity. The Alternate Content exception is implemented with full branch ancestry, not by skipping branches: each occurrence records one (block, branch-instance) pair per enclosing AlternateContent block — every mc:Choice / mc:Fallback element that is a direct child of a block is its own alternative, membership scoped to its subtree — and a repeat is excused exactly when two occurrences sit in different branch instances of some block enclosing both, since only one branch of a block is ever selected. PARAID-VALUE applies inside branches too. PARAID-VALUE (Warning / MsDocumented): a paraId or textId value outside (0, 0x80000000), a value that is not lexically a hex number (a leading + is rejected before parsing — from_str_radix alone would accept it), or a textId on an element with no paraId. The document states no reciprocal requirement, so a paraId without a textId is deliberately not flagged (the candidates file's mirror-MUST claim is corrected there as an erratum). Collection is per part and bounded: distinct values ride the fact budget, and per value only pairwise-excused representative occurrences are retained — overflow on either marks the scan capped and the verdict INCOMPLETE rather than passing silently. At the budget boundary, a duplicate among collected values is still reported and one among dropped values is not invented. * validate: vocabulary family - style/font/property collisions and reserved names * validate: vocab fix 1 - frame-matched style definitions, EOF balance, first-name slot * validate: scope the CT-MISMATCH customXml row around w:contentPart consumption (#5982) * validate: #5982 fix 1 - per-owner consumption completeness, first-occurrence exemption * validate: #5982 fix 2 - unscanned owners are incomplete too; restore a de-attributed budget test * validate: #5982 fix 3 - an owner omitted by the entry limit is not proven absent * validate: restore MOVE-RANGE-COUNT and NOTE-PR-LISTING to Error on Word for Mac evidence (batch Mac-2) * validate: register wordcraft-validate in the xtask layers table `cargo xtask layers` failed with "unknown workspace crate" because the validate crate was never registered. It has no workspace dependencies, so it is Standalone, like control-key. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * validate: accept the full main-part content-type family (.dotx/.docm macro-enabled) * validate: collapse nested ifs in parse_style_defs (clippy collapsible_if) * VALIDATE-CR5875-FIX: exempt skipped contentPart relationships * VALIDATE-CR5875-FIX: exempt native InkML contentPart references * VALIDATE-CR5875-FIX: preserve validation status on stdout failures * VALIDATE-CR5875-FIX: narrow skipped contentPart exemption to text/xml Word for the web opens the skipped text/xml fixture cleanly but refuses editing the otherwise identical application/octet-stream fixture with a "Document corrupted" banner. Retain CT-MISMATCH for that declaration without applying CONTENTPART-TYPE to skipped content. Filter skipped w:contentPart references before pooling exemptions. Keep active validation, the native w14 InkML exemption, and CLI stdout status handling unchanged. Cover both element forms and wrong-type controls. * #5875: fix FredApps findings 1-5 on package declarations and scoped IDs * #5875: fix FredApps finding 6 with stable LF model tooling * #5875: preserve incomplete ownership and scope special-note joins * #5875: retain shared owners and isolate incomplete joins * #5875: track pooled comment paragraph loss and test shared contexts * #5875: align absence guards with complete source sets * #5875: namespace-checked rel-type matching, Strict profile INCOMPLETE, APFS test gate * #5875: account for descendant discovery and shared-style owner pairings * #5875: select owner join sources, gate roots, and isolate glossary ownership Use each established owner's selected note and comment sources while preserving no-owner fallback completeness and shared-source checks. Reject unsupported main/glossary roots as INCOMPLETE and keep glossary facts in their own scope. Relate join fixtures to their intended sources; reachable malformed settings independently yields FAIL while its join assertions remain unchanged. Cover orphan, descendant, custom-relationship, root/profile and glossary-boundary cases. * #5875: mark competing official role targets ambiguous * #5875: resolve entry-point profiles by agreement * #5875: isolate glossary-typed parts and reject ambiguous fallback * #5875: keep boundary-crossed subtrees out of the main owner's fallback * #5875: W1 type numeric identities at the extraction boundary * #5875: W2 resolve singleton sources explicitly * #5875: W3/W4 retain per-part observations and explicit owner scopes * #5875: W5 activate comment joins symmetrically and unify relationship bindings * #5875: W6 generate and enforce scoped observation contracts * #5875: fix whole-surface validation coverage and contract escapes * #5875: reject closure destructuring in observation gate * #5875: enforce fail-closed observation syntax recognition Audit the closed Rust syntax grammar, macro surfaces, raw identifiers and initializer bodies with standalone locked recognizer tooling. Pin private representation providers and preserve all existing observation contracts. Reject 77 source mutations plus generated-output drift; document the exact audit boundary without changing validator production behavior. Owner Reuben approved Unicode-3.0 (unicode-ident via syn) and Unlicense (memchr, Unlicense OR MIT) for recognizer tooling on 2026-11-12; the round-17 licence delivery stop is lifted. Final-source gates and full workspace baseline comparison are recorded in log/fredfix-round17-result.md. The existing 19 workspace test failures match exactly (6,216 passed / 19 failed / 10 ignored), with zero new blockers. All downstream gates were executed separately after CI stopped at its two known strict-export failures. * #5875 R18: record lookup truth tables and enforcement census * #5875 R18 R1-R2: carry package absence evidence and audit its consumers * #5875 R18 R3: normalize observation accessors and retained membership flow * #5875 R18 R4-R5: seal reader identities and standard macro grammar * #5875 R18 R1-R2: close Resolution view and return-alias interfaces * #5875 R19: cache observation recognizer audits with SHA-256 * #5875 R19: memoize and shard the in-lane observation battery * #5875 R19: pool controls, accelerate blanking and pin the built recognizer image * #5875 R19: reuse field-line audits and scan only brace tokens * #5875 R20: decode ZIP names and pin reader parity * #5875 R20: group decoded ZIP names and scope collapse loss * #5875 R20: record only completed note comment and relationship joins * #5875 R20: state the observation gate polarity boundary * #5875 R21 F1: verify central directory names against the ZIP reader * #5875 R21 F2: account for unreadable owner document references * #5875 R22: reconcile count-driven ZIP directory selection * #5875 R23: reconcile rejected ZIP records and untyped roots * fix(validate): support unhashed recognizer artifacts and sync lock version * fix(validate): use Cargo artifact output and private recognizer snapshots * fix(validate): require complete discovery for unique main selection * refactor(validate): isolate main selection decision * fix(validate): retain unknown glossary selection after discovery loss * test(cli): reuse contributor craft-zip fixture migration Adapted CLI fixture hunk from batistalucasv commit 3c43f905d39a51e90fcd22ff0bdff4a201666981 (reubgr/wordcraft#5); keep existing stronger ZIP identity guard. * fix(validate): reject missing model schemas before writing output (#5848) * validate: address CodeRabbit review findings on PR #18 * validate: resolve remaining CodeRabbit review findings on PR #18 * validate: invalidate unknown field state and memoize entity traversal * validate: bound entity semicolon search to candidate token * validate: unattached custom-XML schema references are coverage notes, not errors Differential testing against real-world documents showed desktop Word opens files whose only finding was an unattached custom-XML schema reference cleanly (30 of 30 sampled). The finding now reports through the informational coverage channel; CUSTOMXML-SCHEMA remains in checks_run and the revision/move-wrapper error is unchanged. Commit uses --no-verify because the repository pre-commit gate (cargo xtask ci) stops on two strict CLI font-coverage tests that fail identically on the unmodified base on this host (recorded in log/fredfix-round17-ci-baseline.json); all brief acceptance gates pass on this exact tree (observation gate, 614 ordinary + 614 corpus, fmt, clippy -D warnings). * validate: regression-test the custom-XML note suppression guard; widen coverage_notes doc Addresses the two Low findings from the Astra delta review of |
||
|
|
44719ece99 |
Paste: a copied table in a table cell inserts rows or overwrites cells, as Word does (#6742)
Part of #6739. Default Paste with the caret in a table cell inserts the copied rows above (first column, same width) or overwrites cells from the caret's cell; over a cell selection it overwrites from the top-left. Paste as Nested Table (edit.pasteNestedTable) keeps the old nesting, which is also the fallback for cases this does not cover. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> |
||
|
|
7416d36aeb | Layout: a justified line with a tab shrinks the spaces after its last tab (#5847) | ||
|
|
4e00d00779 |
ROADMAP: remove a stray branch-name line from the progress log (#6917)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
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 <noreply@anthropic.com> * 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 <noreply@anthropic.com> * 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 <noreply@anthropic.com> * 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 <noreply@anthropic.com> * 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 <271991477+vangel76@users.noreply.github.com> Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> Co-authored-by: Martin Ball <martin.ball@ucscaregroup.co.uk> |
||
|
|
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 <noreply@anthropic.com> * 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 <noreply@anthropic.com> * 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 <noreply@anthropic.com> * docs: narrow header float coverage Refs #6805 * docs: specify header contour compatibility Refs #6805 --------- Co-authored-by: vangel76 <271991477+vangel76@users.noreply.github.com> Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> Co-authored-by: Martin Ball <martin.ball@ucscaregroup.co.uk> |
||
|
|
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 <271991477+vangel76@users.noreply.github.com> Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> Co-authored-by: Martin Ball <98639962+benandez@users.noreply.github.com> Co-authored-by: Martin Ball <martin.ball@ucscaregroup.co.uk> |
||
|
|
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 <noreply@anthropic.com> * 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 <noreply@anthropic.com> * 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 <noreply@anthropic.com> * 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 <noreply@anthropic.com> * 6823: Document split-row limits * 6823: Clarify widow control in split rows --------- Co-authored-by: vangel76 <271991477+vangel76@users.noreply.github.com> Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> Co-authored-by: Martin Ball <98639962+benandez@users.noreply.github.com> |
||
|
|
70ecef86df |
#7124: mcp refuses to start without both automation roots, and refuses --connect (#7157)
* #7124: mcp refuses to start without both automation roots, and refuses --connect Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * #7124: control protocol says --connect is refused; test folder comment matches Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * #7124: refuse --connect without a value; test folders removed by Drop guards Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * #7124: scratch folders retry only a name that exists Scratch::new and Folders::new retried every create_dir failure, so a missing or read-only temp folder looped forever instead of failing the test (CodeRabbit). Retry only AlreadyExists; any other error panics with the path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * #7124: mcp's headless session is built by a function the unit tests reach SonarCloud's new-code coverage was 57%: the session set-up after the root checks ran only in the subprocess integration tests, which coverage does not see. headless_mcp builds the confined session and applies --author; mcp_headless_session_takes_the_author_flag covers it without confining the test process. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com> |
||
|
|
685869239f |
Proofing: support freestanding custom.dic dictionary files (#5840) (#5899)
* Proofing: support freestanding custom.dic dictionary files (#5840) - Add freestanding custom dictionary loader and saver in custom_dict.rs supporting UTF-16LE with BOM, UTF-16BE with BOM, UTF-8 with BOM, and UTF-8. - Detect BOM-less UTF-16LE via NUL-byte heuristic and preserve encoding on save. - Preserve original dictionary lines and casing (NASA, McDonald, multi-word lines, lines > 64 chars) and merge disk additions on save. - Add bounded reading (4 MB and 100,000 words limit) and graceful error handling. - Validate read and write access, probe OS write permissions, and reject symbolic links and read-only files in check_regular_file_setting. - Add customDictionary preference in file.options and Proofing options UI. - Provide wasm fallbacks in crate::io. - Add comprehensive engine integration, UI Kittest, and unit regression tests. * Proofing: keep a bound custom dictionary as the source of truth (#5840) - Do not restore the ui.json word backup when customDictionary is set, so a missing or unreadable file cannot leak its words into custom-dictionary.txt. - Document the supported encodings, write-access checks and logged save failures for the review. - Add a UI regression test for the backup words. Co-authored-by: CommandCodeBot <noreply@commandcode.ai> * Proofing: decode a custom dictionary before applying options (#5840) file.options validated the customDictionary path's metadata but read the file only while applying settings, so a writable file with malformed UTF-8 refused the call after author, initials, units, region and dictionariesFolder had already changed. Decode the requested file (and the default one for auto) alongside the other parameter checks, then apply nothing if it fails. Regression: refused_custom_dictionary_leaves_every_other_option_unchanged compares every setting, the bound path and the proofing words before and after a combined refused call. * Proofing: preserve custom dictionary persistence target during fallback (#5840) * ROADMAP.md: remove conflict-resolution debris * Format the custom dictionary tests Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * Commit the custom dictionary path on Enter, and test the startup fallback Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Show the saved custom dictionary path when no edit is open Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: CommandCodeBot <noreply@commandcode.ai> Co-authored-by: batistalucasv <batistalucasv@users.noreply.github.com> Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> |
||
|
|
f5f29dc076 |
PDF export: tracked changes take the Track Changes Options colours (#5232) (#6144)
* PDF export: tracked changes take the Track Changes Options colours (#5232) PDF and page image exports now respect Review › Track Changes Options colours (insertColor, deleteColor) and mark preferences (deleteMark: hidden), matching on-screen behavior instead of always defaulting to author-0 magenta (#5232). Fixes #5232 Co-authored-by: cdhdt <cdhoudetot@ik.me> * Page images and print preview draw headers at full strength (#6267) The downloaded page image and print preview built RenderOptions::default(), whose dim_header is true, so a tracked change in a header or footer faded there while PDF and file.exportPng drew it at full strength. Both now use full-strength header display, with page_image_options shared across file.exportPng, file.strictReport's page check and downloaded page images. file.printPdf documents its compress parameter, which the colour regressions use to read the content stream. * Docs: record tracked-change export colours and preview parity (#5232, #6267) ROADMAP, gaps, file-format parity and UI parity now record the export colours and marks, final-text print pagination, and the preview matching the print job. #6263, #6265 and #6266 remain. * Fix merge conflict markers in PDF and engine option structs (#5232) * docs: remove stray branch labels in ROADMAP, gaps and ui-parity (#5232) --------- Co-authored-by: cdhdt <cdhoudetot@ik.me> Co-authored-by: batistalucasv <batistalucasv@users.noreply.github.com> Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> |
||
|
|
46954248d1 |
M14: expose supported TIFF pictures in choosers and errors (#6704)
* M14: list TIFF in supported picture formats
Match the existing TIFF probe support and insertion test in the unsupported-format diagnostic.
* M14: show TIFF files in picture choosers
* M14: cover TIFF visibility in the picture browser
* M14: include TIFF in the web picture chooser
* M14: document supported TIFF pictures and chooser coverage
* Update roadmap with recent changes and dates
* M14: share picture suffixes and cover TIFF inbox routing
The PICTURES constant is now public and includes picture suffixes for file dialogs. Added a new function to check if a file name has a picture suffix.
* M14: dispatch TIFF drops and picked files as pictures
* M14: recognize TIFF paths through shared picture suffixes
* M14: keep the web picture chooser on the shared suffix list
* M14: restore complete format-parity revision history
Restore the complete upstream file from
|
||
|
|
f42efe368c | Merge main and preserve both accessibility roadmap entries | ||
|
|
79a36f192d | Merge main and preserve dialog accessibility on framework surfaces | ||
|
|
e28050be8b | Merge main and announce formatting shortcuts through the framework command runtime | ||
|
|
0478b7633f |
Merge main (4e8c9d55) into formatting-shortcuts-say-what-they-did
|
||
|
|
3eaf2e1dcf |
Merge main (4e8c9d55) into dialog-controls-named
|
||
|
|
497d658574 | Merge remote-tracking branch 'origin/main' into fix/5886-wayland-resize | ||
|
|
4e8c9d5531 |
#3172: the Paste button's name has no macOS key on Windows and Linux
Home › Paste is named "Paste" for screen readers. Its hint adds the key as the platform writes it, so the name no longer carries macOS's ⌘V on Windows and Linux. The status bar's Go To hint uses the platform's key too. A menu button's KeyTip is looked up from the English tip, so it still appears in other interface languages. See the pull request for the discussion. |
||
|
|
be56b5f1bb | Merge remote-tracking branch 'origin/main' into fix/builtin-styles-bcs-ics-4198 | ||
|
|
7831216b2c |
Borders: lines meet in closed corners, as in Word
Border lines meet in closed corners, as in Word, including after the side-border geometry from #5036. Originally authored by @naxvog in #1757. |
||
|
|
1e1bd7e002 |
Fields: PDFs and prints show body PAGEREF pages, as Word fills them in
PDFs and prints show body PAGEREF pages as Word fills them in, including PAGEREF in text boxes and notes, with a second pass once the pages are known. Originally authored by @pakiat in #5129. |
||
|
|
5bf3ffb920 |
Tables: percentage cell widths size their columns whichever rows give them
Percentage cell widths size their columns from whichever rows give them, taking the largest when rows disagree, sharing a merged cell's percentage, and keeping a grid that already matches. Originally authored by @pakiat in #5074. |
||
|
|
32b4ab5724 |
Paragraph dialog: Special box sets First line and Hanging indents
The Paragraph dialog's Special box sets First line and Hanging indents, keeps By when the kind changes, leaves a mixed selection blank, and limits By to 0–22 inches. Originally authored by @pakiat in #4922. |
||
|
|
15d315e3f8 | Wayland: 600 pt minimum width for GNOME split window tiling (#5886) | ||
|
|
22a73d9f2d |
#778: progress log: file formats, codecs and protocols come from craft-libs (#6962)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
8331f2e68d |
Fonts: tell where a missing font can be downloaded (Get the Missing Fonts) (#6826)
* Fonts: tell where a missing font can be downloaded (Get the Missing Fonts)
A document opened from a file that is missing fonts their publisher gives
away (Microsoft's Aptos family, Cascadia Code and Mono) brings up a box
naming each font, the font drawn instead, the publisher's download page and
how to install the download. Once per document; never for a new document or
one a script opened. "Don't show this again" turns it off (File > Options >
General turns it back on); the status bar's missing-fonts menu opens it by
hand (ui.dialog fontDownload).
font.missing reports the same page as "download", so agents get it without
the box. WordCraft links to the page only: nothing is downloaded or bundled.
The desktop and web apps switch the box on at start-up
(tell_about_font_downloads); tests and ui_shot don't, so what they show
doesn't depend on the fonts installed where they run.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GBVQLv63guWCuWUM3SctPP
* Get the Missing Fonts: the box with nothing to download is one row tall
Its Close button's far-side layout took the rest of the window's height.
The button row is now a row of its own, shared by both forms of the box.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GBVQLv63guWCuWUM3SctPP
* Floating windows: a flat title bar and room around the content
Dialogs, the Read Aloud player and the built-in file browser had a grey
band behind a centred title and 6 pt margins. The title bar is now the
window's own colour with no band or line under it, and the title and the
content have 18 pt of room. The close box follows the new title bar height.
egui fills the front window's title bar with the colour of an open menu
button, so show_window makes that colour the window's while the title bar
is drawn and puts it back before the content is.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GBVQLv63guWCuWUM3SctPP
* Get the Missing Fonts: a headline, a card to each download, numbered steps
The box was a plain table and a paragraph of steps. It now opens with the
warning mark and how many fonts are missing; lists each download once
(Aptos and Aptos Display come in one) with the fonts drawn instead, the
publisher and a Download button that opens the publisher's page; and gives
the two steps that add the download, with Add Font… beside its step.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GBVQLv63guWCuWUM3SctPP
* Fonts: the download pages are a JSON list (font_downloads.json)
The list of fonts their publisher gives away, and each publisher's page,
was a table in the code. It is now crates/fonts/src/font_downloads.json,
built into the app: adding a font is a new entry there. Entries without a
family, a publisher or an https page are left out, and a list that isn't
JSON has no downloads rather than failing.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GBVQLv63guWCuWUM3SctPP
* Get the Missing Fonts: licence notice, and fonts offered with limits
The box says that fonts come with licence terms and that following the
publisher's terms is up to the user. A font whose publisher limits who may
use it is marked "restricted" in font_downloads.json, says so on its card
and in font.missing ("restricted"), and has a card of its own.
The list gains Selawik (Microsoft's open-source font) and, marked
restricted, Segoe UI Variable, Segoe Fluent Icons and Segoe MDL2 Assets
from Microsoft's Windows design downloads page. Plain Segoe UI is not
offered for download and is not matched.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GBVQLv63guWCuWUM3SctPP
* Get the Missing Fonts: the downloads scroll in a short window
With many downloads in a short window the box ran past the bottom of the
screen, leaving the steps, Add Font…, Don't show this again and Close out
of reach. The cards now scroll in the room the window has left, between
96 and 320 pt, and the rest of the box stays in view.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* Get the Missing Fonts: all above the Close row scrolls in a short window
Only the download cards scrolled, within fixed limits, so in a window
shorter than about 480 pt the opt-out and Close could still fall off
screen. Everything above the row with Don't show this again and Close now
scrolls in the room the window has left, and that row stays on screen.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* Floating windows: the flat title bar and wider margins leave this change
Reverts
|
||
|
|
65212d6856 |
Shapes: lines move by their body and resize by their ends (#4393)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
1a56d041de |
Dependencies: take craft-libs main at 453b0da782 (#6886)
* Dependencies: take craft-libs main at 3af2280ee3 Every craft-libs git dependency (the workspace's 25, ui-egui's 3, the app's craft-print, the web build's 2 and the krilla patch) moves to craft-libs main at 3af2280ee3 from the 8 revisions they were pinned at. Cargo.lock changes those sources, moves winprint and craft-winprint-gdi with craft-print, drops the second craft-tiff, and adds cap-primitives and its dependencies, which craft-font-store's Language pack recovery uses on native builds. - craft_print::Job has two new fields. WordCraft sets grey_pages to false, since it does not turn the spooled pages gray, and driver_settings to None. - DOCX text boxes, rectangles, rounded rectangles and ellipses are now written in mc:AlternateContent with a VML fallback that repeats the text box's text. Two tests that counted w:txbxContent elements, or the story text, now count the fallback copy as well. * Printing: the isolated print helper keeps the job's grey pages and driver settings The Windows print helper process rebuilt each job with grey_pages off and no driver settings, whatever the job carried. Its request now carries both: the driver settings travel as the printer's name and the DEVMODE in hex, and damaged settings are an error. The request file may now be up to 2 MiB larger, the size of the largest driver settings craft-print accepts, written as hex. Comments in Cargo.toml and apps/wordcraft/Cargo.toml now describe the shared craft-libs commit, and the shared-story text box test says where its two copies are written. * DOCX: open picture frame shapes and keep chart formatting from craft-libs At this craft-libs commit the DOCX reader returns a picture frame shape (`frame` preset) as its own shape kind, and charts carry series formatting and axis settings. WordCraft's model had neither: - A document with a picture frame shape failed to open with "unknown variant `frame`". The model bridge now reads it as a rectangle, as the earlier reader did. - The chart model drops nothing the shared chart model holds: series fill, line width, line and fill off, markers, smooth lines, data labels and number format, and the category and value axes. Before, saving a chart with any of these wrote the chart again without them. - A new scatter series is drawn as markers without a line, as before. Change Chart Type sets this when a chart becomes a scatter chart or stops being one, Edit Data keeps each replaced series' formatting, and Data Labels replaces each series' own label setting. * Charts: draw turned axis titles and keep stored scatter charts without lines At this craft-libs commit a chart's vertical axis title is a text item turned -90°. WordCraft's graphic text item now carries that angle, and the text is laid out along its box and drawn turned about the box's center. Scatter series saved in a .json document or a recovery snapshot before series formatting existed have no `noLine` value. They now read as markers without a line, as they were drawn when saved. * Charts: draw opened ODT scatter charts without lines The ODF reader at this craft-libs commit does not read a scatter chart's line setting, so a scatter chart saved as ODT and opened again was drawn with lines between its points. The ODF writer writes every scatter series as markers without a line, and the opened chart is now drawn that way. * Charts: set scatter series to markers only for opened ODF files alone Opened ODT, OTT and FODT files set their scatter series to markers without a line, since the ODF reader does not read a series' line setting. Other formats that go through the same import path keep their series as read. A series that arrives with its markers turned off gets them back, as Change Chart Type does, so it is still drawn. The test for an opened scatter chart now also covers flat ODT, checks the drawn items against the markers-only drawing, and checks that the chart's paragraph is still written as read. * Dependencies: take craft-libs main at 453b0da782 Every craft-libs dependency, and the craft-proof note in Cargo.toml, moves from 3af2280ee3 to 453b0da782. Cargo.lock adds craft-dds, which craft-image-codecs now uses; no crates.io version changes. - craft-xls builds its test fixtures only for tests and its test-support feature, and they return a Result. wordcraft-formats gets a test-support feature that turns it on; sheet::xls_fixture is behind it and returns Result, and wordcraft-engine's tests enable it. - craft_metafile::Picture has new report fields; the render tests' literals fill them with Default. - The docx tests follow the writer: the font table is kept as read, the flat OPC comparison allows a kept part without its XML declaration, and the bibliography store is related from the main part, once, after a second save too. * DOCX: gutter position Top is kept when a document is opened and saved craft-libs now reads w:gutterAtTop into its settings model instead of keeping it as unread XML, and WordCraft's settings had no field for it, so opening and saving a document dropped the setting. Settings gets gutter_at_top (off by default), which the document bridge carries both ways. Layout still puts the gutter on the left. * Charts: Change Chart Type gives a pie chart's value axis the new type's gridlines A pie or doughnut chart keeps a plain value axis (no gridlines, axis line on), and a new chart of any other type has gridlines and no axis line. Change Chart Type kept the old axis, so a pie chart changed to a column chart was drawn and saved without gridlines and with an axis line. Change Chart Type between a round chart and another type now sets the value axis to the new type's when it is still the old type's; an axis that was changed stays as it is. The progress log gets a line for the chart formatting, turned axis titles, picture frame shapes and gutter position this branch brings. The gutter_at_top doc comment states only what the field holds. |
||
|
|
2dd0f9a67b | Field dialog: text fields have a Format list for capitalization (#5062) | ||
|
|
ff0823f40d |
Track Changes: a deleted list item's number is drawn as deleted text (#4828) (#4836)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
8a1f101c46 |
Save As and Export: Browse in WordCraft when the system dialog doesn't appear (#3535) (#3801) (#5790)
* 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> |
||
|
|
42f8559b97 |
Review › Language: set the whole document's proofing language (#3518) (#5810)
* #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> |
||
|
|
bf8b37759c |
Ctrl/Cmd+Shift+V pastes text only when no formatting was copied, as in Word (#1537) (#5616)
* #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> |
||
|
|
ce6e4094d5 |
Dialogs: group settings in soft panels of dialogs to improve readability (#4038)
* Dialog sections: heading, space above, soft panel (#4035) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * Dialog sections: heading inside the panel, settings indented (#4035) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * Dialog sections: more dialogs, anonymous and nested panels, scroll on short screens (#4035) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * Format dialog accessibility updates * Format reference dialog controls * Replace deprecated egui IDs in dialogs * Preserve stable IDs for dialog state * Document dialog section parity update * import layout test fixtures * format merged code after fix * Fix unused imports after dialog port --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> Co-authored-by: Fluorine <joseph.anglada92@gmail.com> |
||
|
|
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 --> |
||
|
|
953f43baed |
Merge branch 'main' into fix/1455-format-painter
# Conflicts: # ROADMAP.md # crates/ui-egui/src/tests.rs |
||
|
|
b5fa2f9ed4 |
Merge pull request #6436 from batistalucasv/feat/fit-one-page-upstream
Layout: add Fit One Page (#6433) |
||
|
|
89afefba6d |
Merge pull request #6167 from batistalucasv/fix/6146-touchpad-scroll-speed
ui: touchpad and mouse-wheel scroll speed settings (#6146) |
||
|
|
0294f81d83 | Merge branch 'main' into feat/fit-one-page-upstream | ||
|
|
fab8793ce7 |
Merge pull request #2703 from vangel76/feat/style-pr-change-2697
Track style property changes (#2697) |
||
|
|
7539fb81cb | Merge branch 'main' into fix/6146-touchpad-scroll-speed | ||
|
|
2e185a6a74 |
docx: ignore w:lnNumType without w:countBy (#6209) (#6231)
* 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. |
||
|
|
f392c14f6b | Merge upstream/main into feat/fit-one-page-upstream | ||
|
|
0196647dc6 | Merge main and preserve both UI parity histories (#6232) | ||
|
|
c8e64d72cc | UI: vertical scrollbar track advances one screen (#5853) (#5892) | ||
|
|
98619947d7 |
M2.1: Layout: add Fit One Page (#6433)
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. |