chore: sync upstream (129 Commits) #10
No reviewers
Labels
No labels
herkunft/alpha-feedback
status
blockiert
status
zu-testen
typ
bug
typ
docs
typ
enhancement
typ
feature
typ
idea
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
iris/designcraft!10
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "chore/sync-upstream-20261024"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Upstream-Sync von
upstream/main(129 Commits). Fast-Forward.c313c534refactor: split complex functions in ruby, warichu, pdf text, render text, epub, pdfx (Sonar S3776) (#1728)4c5ea73drefactor(tools): fewer parameters and simpler pointer handling (Sonar S107, S3776) (#1725)75d5b015refactor(idml): extract helpers to cut cognitive complexity (Sonar S3776) (#1723)cb763c25refactor: split complex functions in psd, table, parabox, index, trace, pdf export, render (Sonar S3776) (#1724)8271f1a2refactor(engine): split execute_unguarded, load_styles and resize_border (Sonar S3776) (#1726)c142678brefactor(ui-egui): extract character style General section (Sonar S3776) (#1720)e0c244d2refactor(ui-egui): extract style option field helpers (Sonar S3776) (#1719)e651c637refactor(ui): extract helpers from conditions, book, credits and page control panels (Sonar S3776) (#1721)8299d264chore: replace trivial closures with method paths (Sonar S1612) (#1714)bfd95b25chore: drop redundant 'static lifetimes in statics and consts (Sonar S8863) (#1713)f90d2867chore: resolve SonarCloud maintainability issues (#1698)5449bc47M6: preserve PDF catalogs and safely apply layer choices (#1670)00d5fa5cM6: reject unreadable PDF trailer history links (#1670)7427a158M6: harden placed PDF layer variants (#1670)d8d78851Anchored objects: Relative to Spine mirrors custom positions on right-hand pages (#1702)`Fallback::begin` returns before the fallback runs when `WGPU_BACKEND` is set, logging that wgpu picks the backend. So the line below it is reached only when the variable is *not* set -- and it said "(WGPU_BACKEND overrides)", which reads in a log as though the user's environment had chosen the backend when nothing had. before: graphics: DirectX 12 (WGPU_BACKEND overrides) after: graphics: DirectX 12 (first choice; set WGPU_BACKEND to choose another) The report quotes that line as evidence of which backend a start used, which is exactly the wrong conclusion to be led to. Part of #1343.A cell's text rotation (Cell Options › Text › Rotation) was already read from IDML and written back, but only 0 is composed, so an imported form's narrow header columns of vertical labels came in horizontal and wrapped mid-word ("Eingela / ngt am") — and nothing anywhere said why. The reporter's file has 30 such cells. Composing rotated cell text is a larger change than this. What this does is stop it being silent, and let the value be set from the API: - the IDML import reports it once per file: "2 table cell(s) have rotated text (Cell Options › Text › Rotation): the angle is kept and written back, but the text is composed horizontally"; - `table.setCell` takes `rotation` (0, 90, 180 or 270, any other angle refused, negatives and multiples normalised), which nothing could set before; - `table.get` reports each cell's rotation, so a round trip can be checked. Tests: the angle through an export and back with the warning counted once for the file (and no warning when no cell is rotated), and the command's accepted and refused angles. Each fails without its own part.The same selection written two ways gave different files: file.exportPdf {"pages": "2,2"} → 1 page file.exportPdf {"pages": [2, 2]} → 2 pages, the second a copy file.exportPdf {"pages": [2,2,2]} → 3 pages `parse_page_range` keeps the first of a repeat (`"2-2,2"` is one page too); the array form appended whatever it was given. A list says which pages to export, not how many times, so the array now drops a repeat as the string does. Both `file.exportPdf` and `file.exportPptx` read the same parameter. The test pins the agreement between the two forms over nine lists, in PDF and PPTX, and the two facts I measured while checking it: the pages come out in the document's order whichever order the list names them in, and `[2, 2]` is now byte for byte the file `"2"` gives. A page that does not exist is still refused, and an empty list still exports nothing. Not from a ticket: I found it probing the page-range parameter.Found probing `layout.pages.insert` on a two-page document: {"count": 0} → one page inserted (0 clamped up to 1) {"count": -1} → one page (`as_u64` fails, the default applies) {"count": 1.5} → one page (the same way) {"count": 10000} → 9999 pages, quietly capped A count that is given is a number of pages, so each of those is a usage error now: "count 0: 1 to 9999 pages". A count that is absent still means one page. `after` is left alone. My first attempt also refused a position past the last page, and `insert_after_u64_max_appends_at_the_end` caught it: appending is what an out-of-range `after` is meant to do, and the test now says so in the same place. The test covers the five counts, that none of them inserted anything, that a position past the end still appends, and that `{"count": 2, "after": 0}` still inserts two pages after the first. Without the check, `{"count": 0}` inserts a page again. Not from a ticket: I found it probing the command's parameters.`anchor.create` took any name, including one another anchor already had, so a document could hold two anchors called "Photo 1". Every reference to the name then means whichever the search finds first: `xref.insert {"anchor": "Photo 1"}` and `hyperlink.create {"anchor": "Photo 1"}` take the first, and an export writes both destinations under the one name. A name nobody can resolve is not a name. A name already in the document is a usage error now, naming it and where to look: "a text anchor named `Photo 1` is already in this document (anchor.list names them)". A name that is empty or only spaces is refused too — a cross-reference built from `<txtAnchrName />` would show nothing. Case still distinguishes names, as it does elsewhere in the document, and nothing about existing anchors changes: the check is on creation. The test covers the same name in the same story and in another one, the empty names, that only one anchor exists afterwards, and that another name and a name differing in case are both fine. Without the check the duplicate is created again. Not from a ticket: found probing `anchor.create`.Nothing checked type size. `type.char {"size": 0}` set type with no size at all, a negative size went in the same way, and 1e9 pt asked the composer for a line a million times the height of the page — all of it silent, and all of it saved to the document. The range is the one this engine already applies to a ruby annotation's size, 0.1 to 1296 pt, which is InDesign's: "size 0: 0.1 to 1296 pt". It sits in `validate_char_fill`'s place in the chain, so every command that takes character attributes gets it: `type.char`, `find.change`, the four `style.character` / `style.paragraph` create and edit commands, and the two table paths that already validated a fill. The test covers five refused sizes, the three in range including both ends, and two of the style commands. Without the check, `{"size": 0}` applies again. Not from a ticket: found probing `type.char`.