Repository navigation
Conversation
…d#650) * M6: bulk-edit shared form field properties (storytold#95) Add opt-in shared properties, partial appearance patches and atomic CLI/MCP batches. Complete current-page, rectangle and Fields-panel selection, with 20 synthetic regressions for preservation, rollback and dialog lifecycle. Co-Authored-By: Codex <noreply@openai.com> * Bulk field properties: translated messages, a catalog check, and in-place /DA patches - The bulk dialog's flag label, errors and notices are in all 13 full catalogs; the missing-field error is a template (fmt + tl!) instead of format!. New test bulk_field_properties_labels_are_in_every_full_catalog. - patch_da rewrites the last Tf and fill colour in place (appending only when there is none), so /DA doesn't grow per edit; sizes clamp to 300 like parse_da. - A size- or font-only edit leaves widgets untouched; an indirect /MK or /BS is updated where it lives instead of inlined into each widget. - Draft::new says why: a widgetless field gets its own message, not 'could not be found'. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Tests: pin the session clock in the bulk-fields harness (save_bytes stamps /ModDate) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Tevinhead <173904641+Tevinhead@users.noreply.github.com> Co-authored-by: Codex <noreply@openai.com> Co-authored-by: Brandon Thomas <echelon@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…EKU, critical extensions) (storytold#749) * Parity: merge the duplicate form.field-list evidence and notes storytold#649 and storytold#650 each added `evidence` and `notes` to the same entry, so the TOML has duplicate keys and `cargo xtask parity` fails on main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * M9: the signer's certificate must allow document signing (key usage, EKU, critical extensions) A trusted signer whose certificate may not sign documents was reported Valid. Validation now checks the signer certificate (RFC 5280 §4.2.1.3, §4.2.1.12, §4.2): a keyUsage needs digitalSignature or nonRepudiation, an extended key usage needs a document-signing purpose (any, emailProtection, codeSigning, RFC 9336 documentSigning, Adobe Authentic Documents, Microsoft document signing), and no critical extension may be one PdfCraft doesn't process. Otherwise the verdict is Unknown and the details say why. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * M9: a critical qcStatements extension doesn't make a qualified certificate unusable Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com>
storytold#754) * Parity: merge the duplicate form.field-list evidence and notes storytold#649 and storytold#650 each added `evidence` and `notes` to the same entry, so the TOML has duplicate keys and `cargo xtask parity` fails on main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * M4: bookmarks from tagged headings (organize.bookmarks-from-structure) Bookmark options > New bookmarks from structure (command bookmark.from_structure, tool bookmark_from_structure) turns a tagged document's headings into bookmarks, as Acrobat's New Bookmarks From Structure does for headings: H1-H6 through the role map, a plain H by its Sect/Part/Art nesting, nested by level under a new first "Untitled" bookmark, each linked to its structure element (/SE, ISO 32000-2 §12.3.3). Titles come from /ActualText, the marked text drawn on the page (decoded through the font's ToUnicode or encoding), /Alt or /T. The structure walk is bounded (depth, visits, heading and title caps, seen-set) and survives self-referencing elements; an untagged document gets an actionable error; the edit is one undo step under the assemble permission. Not yet: choosing other element types, and destinations at the heading's position rather than its page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Tests: size the shared raster allowance from thumbnail demand The canvas test planted a 132×171 thumbnail whose tag did not match the request finish_render_frame computes. On FreeBSD that real render finished in the same frame, so the retained raster exceeded 132×171×4. Plant a thumbnail that already satisfies demand and compare against that size. * M4: a heading's text stops gathering once it is far past the title length A heading whose marked-content list repeats one mark up to the visit cap could otherwise collect about a gigabyte before the title is cut to 256 characters. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com>
…ide formulas; connector adjust defaults; table-driven test over all presets
53f7e88 to
d129ad6
Compare
|
I checked this table against real PowerPoint today (PowerPoint for Windows, 16.0 build 20527), driven through its automation interface. How: for each preset I made a new 200 × 100 pt shape with all four margins at 0, word wrap on, autosize off and one "x" at 8 pt. The left and top edges come from left-aligned, top-anchored text (
All 9 rows in this PR's table agree with PowerPoint: left and top within 0.01 pt, right and bottom within 0.09 pt (the right and bottom values depend on my 1.63 pt estimate for the end-of-paragraph mark, which is why they are a little looser). Limits: this is PowerPoint for Windows only (no Mac build here), and I only tested these 9 presets, so I can't say anything about the rest of the table. @echelon, in case it helps: could this be merged? The numbers support it. Thank you @NikitkaRa for the thorough work. |
FredApps
left a comment
There was a problem hiding this comment.
ReviewerA — source-read COMMENT (not an approval)
I read the head of the diff: every preset shape's text rectangle comes from presetShapeDefinitions, with a table-driven test over all presets. A new module preset_text holds the rectangles and defaults(name) returns each preset's default adjust values from the catalogue or, for connectors the gallery does not list, from the standard. presetShapeDefinitions.xml is part of ECMA-376, whose formulas are part of the specification; the question is whether the table was transcribed by the contributor from the standard's text (acceptable, it is the file format's definition) or copied from another implementation's source (LibreOffice's or Apache POI's table), which carries its own licence. The PR should say which. A test over all presets proves completeness. I have not run it, and no exact-head CI result exists for this head. Nothing was run.
I ran nothing and have no exact-head CI result for this PR, so this is not an approval. Where a diff was long I read its code hunks rather than every generated or documentation line.
Status: waiting_author.
aiongg
left a comment
There was a problem hiding this comment.
AI-generated review (Opus). Not a maintainer decision.
Small fixes needed (not certain):
Text rectangles for all preset shapes are now evaluated from the standard's guide formulas. The outlines stay as they were, and connectors 4 and 5 get the standard's default adjust values.
- crates/geom/src/preset_text.rs:34-76: each formula operator (
*/,+-,+/,?:,pin,at2,cat2,sat2,mod, the trig ops) matches the standard's definition. Division by zero and non-finite results fall back to 0, so file data cannot make it panic. - crates/geom/src/preset.rs:726-733:
buildkeeps the outline frombuild_outlineand only replacestext_rectwhen the preset has a row in the table. Unknown names and non-finite sizes behave as before. - crates/geom/src/preset.rs:340-349:
defaults()gives bentConnector4/5 and curvedConnector4/5 the standard's 50000 values. Before, a connector without anavLstdrew its middle segment at x = 0. - crates/pptx/src/read/shapes.rs:180 still pads guides missing from a file with
preset::info(..).defaults, so a connector 4/5 with onlyadj2gets 0 foradj1. Usingpreset::defaults(&name)here too would make reading consistent with building and writing. - crates/geom/src/preset.rs: the per-preset text rectangles still computed in
build_outline(for examplestar_text_rectat line 560) are now overridden for every preset in the table. Removing them later would leave a single source of truth. - crates/geom/src/preset_text.txt: the ellipseRibbon/ellipseRibbon2 rows keep a first
q1definition that refers to the pruned guidex3. It has no effect becauseq1is redefined right after, but the generator's dependency pruning does not follow duplicate guide names.
Claims checked:
- verified: Every preset's text rectangle is computed from the standard's guide formulas through generated data and a small evaluator; outlines are unchanged. (crates/geom/src/preset.rs:726-733: build() calls build_outline() and then replaces only text_rect with preset_text::text_rect(). crates/geom/src/preset…
- unverified: An audit of 187 presets at three sizes found 162 text-rectangle mismatches across about 55 presets, all now fixed; a new table-driven test reports zero mismatches. (The table-driven test (crates/geom/tests/preset_table.rs) and its expected table (crates/geom/tests/fixtures/preset_table.txt) are gen…
- verified: Bent/curved connectors 4 and 5 now get the standard's adjust defaults through preset::defaults(), which the PPTX writer also uses. (crates/geom/src/preset.rs:340-349 returns [50000, 50000] or [50000, 50000, 50000] for these connectors. preset.rs:741 uses it in build_outline, and crates/pptx/src/wri…
- verified: The star4/star5 text rectangle fixes from the earlier change now come from the general mechanism. (crates/geom/src/preset_text.txt has star4 and star5 rows with the standard's sx/sy guides. crates/geom/src/preset.rs:729-731 overrides the star_text_rect result computed at preset.rs:1670.)
Recommendation: merge after the fixes above; they may be pushed to this branch.
Reviewed at d129ad6.
|
Automated message. Not a maintainer decision. This branch conflicts with main. Could you merge or rebase main into it? The conflict needs a person to resolve. |
…eDefinitions Ported from storytold/deckcraft#650 by @NikitkaRa. Its preset::defaults is #1851's adjust_defaults, which this repository already has.
…ur fixes from open DeckCraft PRs (#1023) * craft-drawingml preset: the extra outlines dispatch on a Name enum Ported from storytold/deckcraft#739 by @Bryson14. * craft-drawingml preset: the 3- and 4-bend elbow and the curved connectors follow presetShapeDefinitions Ported from storytold/deckcraft#1851 by @Hamza0101. * craft-drawingml warp: text on a guide sets each glyph down whole Ported from storytold/deckcraft#1799 by @leobasilio. * craft-drawingml preset: the Name dispatch test's digests as this repository builds the outlines The digests in storytold/deckcraft#739 were taken on DeckCraft's fc35ad67. Here two curved arrows digest differently both before and after the refactor (the preset sources are identical), so the test now holds the values from craft-libs 2b35d24, before the refactor. * craft-drawingml preset: every preset's text rectangle from presetShapeDefinitions Ported from storytold/deckcraft#650 by @NikitkaRa. Its preset::defaults is #1851's adjust_defaults, which this repository already has. * craft-drawingml custgeom: connection sites (a:cxnLst) read in the shape space and written back Ported from the format part of storytold/deckcraft#1748 by @jagjordi. * craft-drawingml color: behaviour-preserving cleanups Ported from storytold/deckcraft#1610 by Cédric Legrand. * craft-drawingml: resolve current-main API and test conflicts * craft-pptx: use DrawingML writer defaults for custom paths * craft-drawingml: strengthen geometry regression checks --------- Co-authored-by: Bryson Meiling <bryson.meiling@gmail.com> Co-authored-by: Hamza <mail.hamzanaveed@gmail.com> Co-authored-by: Leonardo <leobasilio@gmail.com> Co-authored-by: Nikita Rakitin <nnnrrr93@gmail.com> Co-authored-by: Jordi <jordiag@kth.se> Co-authored-by: Cédric Legrand <cedric@legrand-tech.fr>
Stacked on #643. Includes #642 (star4/star5 text rectangles), whose fixes now come from the general mechanism.
Summary
presetShapeDefinitions.xmlby a committed script, and a small evaluator runs it at the shape's size and adjust values. Outlines are unchanged.preset::defaults(), also used by the PPTX writer.Test plan
cargo xtask ci(all 6 steps)