Commit Graph
1977 Commits
Author SHA1 Message Date
Dylan M. Taylor b547f10884 model: re-export numfmt from craft-drawingml (refs storytold/craft-libs#778) (#2265)
* model: re-export numfmt from craft-drawingml (refs storytold/craft-libs#778, #792)

* chore: update Cargo.lock for craft-drawingml
2026-11-19 19:00:02 -05:00
Dylan M. Taylor f28d733815 rtf: delegate outline lexing and sniffing to craft-rtf (refs storytold/craft-libs#778) (#2264)
* rtf: delegate outline lexing and sniffing to craft-rtf (refs storytold/craft-libs#778)

* rtf: delegate sniff_rtf to craft_rtf::is_rtf and keep local outline scanner for hex/huge-indent parity
2026-11-19 18:32:32 -05:00
Dylan M. Taylor 55f903dc4c mcp: delegate stdio framing and protocol constants to craft-mcp-server (refs storytold/craft-libs#778) (#2261) 2026-11-19 16:41:43 -05:00
Harrison Booth 824860631c Outline RTF: write PowerPoint heading styles, keep empty and '- ' titles on open (#1446)
* Outline RTF: write PowerPoint's \s1-\s9 heading styles; keep empty titles and '- ' titles on open

* Outline RTF: only a stylesheet 'heading N' style is a heading; an inherited title style keeps an explicitly ended empty title

* Outline RTF: engine tests for empty and '- ' titles through file.open and file.openBytes

* test(format): cover deep and Unicode RTF outlines

* test: cover RTF outline edge cases
2026-11-19 16:27:42 -05:00
Dylan M. Taylorandautocraft-bot[bot] e4f86d11fe media: cut over mp4guard box-tree bounds validation to craft-media (#2239)
* media: cut over mp4guard box-tree bounds validation to craft-media

* Apply review fixes

- crates/media/src/mp4guard.rs

* media: use contains() instead of iter().any() in mp4guard

---------

Co-authored-by: autocraft-bot[bot] <354215646+autocraft-bot[bot]@users.noreply.github.com>
2026-11-18 19:51:57 -05:00
FredApps d83ac52f0f Merge main into this branch
Signed-off-by: FredApps <153173854+FredApps@users.noreply.github.com>
2026-11-18 17:16:31 +07:00
FredApps aa406ac091 Merge main into this branch
Signed-off-by: FredApps <153173854+FredApps@users.noreply.github.com>
2026-11-18 16:39:37 +07:00
FredApps 19fa1dd94b Merge pull request #2071 from Hamza0101/fix/line-chart-value-labels
Charts: line series draw their value labels (#2066)
2026-11-18 16:31:22 +07:00
FredApps d1b327e98e Merge pull request #2020 from jgriggs-sluh/feat/export-all-slides-pictures
Export: every slide as PNG or JPEG from File › Export › Change File Type and Save As
2026-11-18 16:31:07 +07:00
FredApps d159b890d7 Merge pull request #1989 from yonatan-langer83/prefs-slider-label
Preferences: the Interface size slider is labelled again
2026-11-18 16:30:53 +07:00
FredApps dfe012713a Merge pull request #1970 from Naseq/fix-1922-canvas-clip-notes
Canvas: clip the canvas Ui to its own rect so nothing it paints or hit-tests reaches the notes pane (#1922)
2026-11-18 16:30:39 +07:00
FredApps e2ca2c41b9 Merge pull request #1942 from neilcawse/fix/pptx-media-timing-nodes
pptx: round-trip p:video and p:audio media timing nodes and autoplay conditions
2026-11-18 16:30:01 +07:00
VladimirCericandaiongg e419262c4c Review › Language: Serbian in Cyrillic and Latin, each with its own dictionary (#1619)
The Language list offers Serbian (Cyrillic) sr-Cyrl-RS and Serbian (Latin) sr-Latn-RS. A dictionary is used only for text in its own script (LibreOffice's sr and sr-Latn, Hunspell's sr_RS and sr_Latn_RS, Fedora's sr_RS@latin), Serbian dictionaries are tried before the Serbo-Croatian sh alias, and only Latin and Cyrillic subtags or modifiers are read as a dictionary's script.

Co-authored-by: aiongg <67543387+aiongg@users.noreply.github.com>
2026-11-18 16:29:25 +07:00
FredApps 9a8e8227ff Merge pull request #791 from Hamza0101/fix/font-script-typefaces
format.font: set the East Asian and complex-script typefaces too
2026-11-18 16:28:54 +07:00
autocraft-bot[bot] 4aec38a2bc Merge pull request #942 from Hamza0101/fix/hf-date-format-on-read
Header & Footer: an automatic date's format comes back on import
2026-11-18 03:37:26 +00:00
autocraft-bot[bot] 49447f46a7 Merge pull request #2083 from ljkx/render-text-effects-from-defrpr
render: text effects from a paragraph's defRPr or the default text style need filters
2026-11-18 03:28:09 +00:00
Neil Cawse c8dd6695a7 Merge remote-tracking branch 'upstream/main' into fix/pptx-media-timing-nodes 2026-11-18 03:22:30 +00:00
autocraft-bot[bot] 2ba369f5d8 Apply review fixes
- crates/ui-egui/src/dialogs/tests.rs
2026-11-18 03:20:42 +00:00
Dylan M. Taylor 2c135484c1 Drop unused test-oracle GUID reexports 2026-11-17 11:50:07 -05:00
Dylan M. Taylor 82fddc8ffd Use shared DrawingML table style XML writer
Preserve the former writer as a test-only byte oracle, including the original Brandon Thomas and Nikita Rakitin implementation history. Keep app XML admission and all existing table tests unchanged.
2026-11-17 08:37:55 -05:00
Dylan M. Taylor 1629e4d953 Tables: cap the grid and merge area before edits allocate or walk them (#1742) 2026-11-17 08:13:56 -05:00
Neil Cawse 40ce901c2c Merge remote-tracking branch 'upstream/main' into fix/pptx-media-timing-nodes 2026-11-17 12:49:14 +00:00
Luis 497582406d Gradient stops: double-clicking a stop opens its colour menu (#2175) (#2196)
Double-clicking a stop marker in the Format pane's gradient editor did nothing. It now selects the stop and opens the colour menu of the selected stop, as in PowerPoint. The menu button is also named for screen readers.
2026-11-17 08:36:53 +00:00
Luis e1ca71495c Slide show: a slide's animations wait for its transition (#2089) (#2197)
A first step that starts With or After Previous began with the slide, so its effects played under the transition. Its clock now starts when the transition has finished, as in PowerPoint. Slides without a transition, and Show without animation, start the step at once as before.
2026-11-17 08:35:55 +00:00
Dylan M. Taylor ac73229ef4 pptx: reuse shared custom-geometry path tokenization (#2192) 2026-11-16 21:57:53 -05:00
Neil Cawse 71fa4b6ccd Merge remote-tracking branch 'upstream/main' into fix/pptx-media-timing-nodes 2026-11-17 02:30:00 +00:00
Neil Cawse fc6a3c4dbd pptx: validate enclosing mainSeq id on onBegin timing exemption 2026-11-17 02:30:00 +00:00
Dylan M. Taylor 1ec01a091a refactor(pptx): reuse shared table style identifiers (#792) (#2189) 2026-11-16 19:31:55 +00:00
Hamza Naveed f9bc097b4e Shapes: the 3- and 4-bend elbow and curved connectors follow presetShapeDefinitions (#1851)
* Shapes: the 3- and 4-bend elbow and curved connectors follow presetShapeDefinitions

PowerPoint routes connectors around shapes with bentConnector4 and 5 and
their curved counterparts. They were drawn as bentConnector3 and
curvedConnector3, using adj1 alone, and curvedConnector2 as a two-cubic
S where the spec has one cubic. Each now draws the spec's path, and the
elbows get a handle per adjust value where the spec puts it.

None of these is in the gallery, so their adjust values had no defaults:
a file giving none, or only adj2, drew them at 0. adjust_defaults() adds
the spec's 50000s for presets outside the gallery, and the reader, writer,
Adjust command and handle drag use it.

* Shapes: elbow handles take the spec's whole adjust range

The handles clamped a dragged value to ±1000000, so dragging one on an
imported route with a value beyond that moved the route. They now take
presetShapeDefinitions' ±2147483647 (noted in review).
2026-11-16 14:39:49 +00:00
jgriggs-sluh ff812840c0 Merge remote-tracking branch 'origin/main' into feat/export-all-slides-pictures
# Conflicts:
#	ROADMAP.md
2026-11-16 08:30:50 -06:00
FredApps 7e1d6925ec geom: placement, preset and warp geometry come from craft-drawingml (craft-libs#778, #792)
deckcraft-geom re-exports craft_drawingml's Xfrm, EMU units,
group_child_affine, preset and warp, and deletes its copies (preset/,
warp.rs). The shared versions add Xfrm::from_affine, preset text rectangles,
separate bentConnector4/5 and curvedConnector4/5 outlines with their own
default adjustments, and smoother follow-path warps. App-only geometry (Unit,
morph, squircle, hit testing, snapping) stays.
2026-11-16 12:45:15 +01:00
FredApps dea0af6ceb color: DrawingML colours come from craft-drawingml (craft-libs#778, #792)
deckcraft-color re-exports craft_drawingml::color (Rgba, SchemeSlot,
ColorScheme, ColorTransform, presets and transforms) and its own copy is
deleted. The existing colour tests run unchanged against the shared module.
ColorScheme literals use ColorScheme::new, since the shared scheme also keeps
extra colours and tint rows.
2026-11-16 12:33:00 +01:00
FredApps 5f58c3c208 #792: read password-protected decks with craft-cfb and drop the local PNG encoder
DeckCraft's pptx crate carried a copy of GridCraft's CFB directory walk to tell an
encrypted package from other compound files. It now asks the shared craft-cfb
(has_entry_named, same UTF-16 fallback for damaged directories, directory entries
capped at 4096 as before). The placeholder for missing picture media keeps its
exact bytes, written as a constant instead of through a hand-rolled CRC/Adler/PNG
encoder.

Part of storytold/craft-libs#778 and storytold/craft-libs#792.
2026-11-16 10:52:29 +01:00
Naseq 6a99c025e9 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	ROADMAP.md
2026-11-16 14:00:30 +04:30
Zinadin Zidan 596ec54b59 Slide show: play a slide's animations again when the show advances to it (#2090) (#2126)
ShowState remembers what was played on each visited slide, so a slide
reached again by a link or by Back looks as it was left. Going forward
used the same path: next() entered a visited slide at the step it was
left at, so after Back and forward again its entrance effects did not
play and the shapes were already in place.

next() now forgets the slide's run before entering it, when it moves
to the next slide and when a looping show comes round to the first
one. The slide starts over: its automatic first step plays, an On
Click build starts at its first step, and its triggered animations
start over. Back, links, Go to slide and Return to Zoom are unchanged.
2026-11-16 10:22:24 +01:00
scks1 9e975b0049 engine: arrange.align and arrange.distribute refuse values they do not name (#1974)
* engine: arrange.align and arrange.distribute refuse values they do not name

arrange.align took an `edge` it did not know as a no-op that still
reported its shapes as edited, aligned left when `edge` was left out
(the spec does not mark it optional), and read any `to` other than
exactly "slide" as the selection. arrange.distribute distributed
vertically for any `dir` starting with "v" and horizontally for any
other, and also read any `to` other than "slide" as the selection.

`edge` must now be left, center, right, top, middle or bottom, `to`
slide or selection, and `dir` horizontal or vertical. Anything else, or
a missing `edge`, is refused with the accepted values and nothing moves.
A missing `to` or `dir` keeps its default.

Test: align_and_distribute_refuse_values_they_do_not_name.

* engine: arrange.align and arrange.distribute refuse a dir or to that is not a string

`align_to` and `distribute` read `to` and `dir` through `str_param`, which
returns None for a value that is present but not a string, the same as for a
missing one. So `{"dir": 123}` distributed horizontally, and
`{"edge": "left", "to": false}` aligned to each command's default reference,
moving the selected shapes instead of failing.

Both now match on `p.get(..).map(Value::as_str)`: a missing field keeps its
default (horizontal for `dir`, each command's own rule for `to`), the named
strings work as before, and anything else, null included, is refused with the
accepted values.

The new test `align_and_distribute_refuse_dir_and_to_that_are_not_strings`
sends null, 123, false, {} and [] as `dir` to arrange.distribute and as `to`
to both commands, in a fresh three-shape session each time, and checks the
error, the revision and every shape's box.
2026-11-16 07:46:28 +00:00
FredApps 5cf7f5f20a Merge main into extract/shared-opc-names 2026-11-16 07:29:45 +01:00
FredApps fb7755717b Merge pull request #1803 from storytold/fix/sec-pptx-theme-budget
PPTX import: budget preserved theme XML, SmartArt drawing shapes and diagram definitions across the presentation
2026-11-16 07:28:46 +01:00
FredApps ea1b4c5539 Merge main into fix/sec-pptx-theme-budget
Keep both sets of import state: the rollback's kept-chart key log and main's
chart decode budget (rejected_kept, chart_decode_bytes). A capture refused by
the retained-byte check records no key; chart decode work stays charged across
a rollback.
2026-11-16 07:14:36 +01:00
FredApps 48de308315 Merge main into extract/shared-opc-names
# Conflicts:
#	Cargo.lock
#	Cargo.toml
#	crates/pptx/Cargo.toml
2026-11-16 07:03:32 +01:00
FredApps 1d30834cca Merge cutover/shared-base64 into cutover/shared-base64-decoder
Pin craft-mime to 254e9a40, the craft-libs main revision craft-deckcraft-format
already uses; craft-mime and craft-codepage are unchanged since 0325b2d7.
2026-11-16 06:55:02 +01:00
FredApps 97423d80fd test(engine): pin the standard Base64 alphabet in the encoder test
The lenient decoder accepts both alphabets, so the round trip alone would
not catch a switch to the URL-safe encoder.
2026-11-16 06:46:59 +01:00
FredApps 9e7fa3b571 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	Cargo.toml
2026-11-16 06:46:59 +01:00
FredApps bb2c2254ee Native format: take the .deckcraft package layer from craft-deckcraft-format (#2170)
* Native format: golden package bytes and load results before the move to craft-libs

A deck that reaches every kind of member (stored and deflated media, linked media
without bytes, stored and deflated chart parts, a NaN) is saved with a fixed
generator. Its bytes, the presentation and media loaded from them, and the damage
report for a copy missing two members are golden files written by the current
code. `save_as` names the generator so the bytes don't change with the version.

* Native format: the .deckcraft package layer comes from craft-deckcraft-format

The mimetype and legacy type, sniffing, the presentation.json envelope, the
NaN-safe writer (finite.rs, deleted), the null-number manifest reader, member
names, the stored-or-deflated choice, bounded and budget-charged member reads
and the format limits now come from craft-deckcraft-format
(storytold/craft-libs#1748), pinned at its PR tip. The presentation mapping
stays here: which media and chart parts become members, the load loop over
them, repair and sanitising, and outline/RTF.

The golden tests from the previous commit pass unchanged: the saved bytes, the
loaded presentation and the damage report are the same. The crate no longer
depends on serde, serde_json or thiserror; zip is a test dependency.

Part of storytold/craft-libs#778.

* ATTRIBUTION: the native format golden deck

* Native format: pin craft-deckcraft-format to the craft-libs merge commit 254e9a40 (storytold/craft-libs#1748)
2026-11-16 00:27:58 +01:00
Dylan M. Taylor 0d5c0b854b Merge pull request #2163 from storytold/extract/shared-pptx-xml
Reuse shared XML escaping in PPTX writer
2026-11-15 15:21:30 -05:00
Dylan M. Taylor 349d3d1c24 Integrate refreshed encoder and RTF cutovers 2026-11-15 15:02:44 -05:00
autocraft-bot[bot] f33d22001c Merge main into cutover/shared-base64 2026-11-15 19:59:20 +00:00
Dylan M. Taylor d842a0cc2a Delegate Base64 decoding while preserving command input guards 2026-11-15 14:54:50 -05:00
Dylan M. Taylor 455a3fdc35 Reuse shared OPC part-name primitives 2026-11-15 14:14:46 -05:00
Dylan M. Taylor 988d721d7d Reuse shared XML escaping in PPTX writer 2026-11-15 13:57:20 -05:00