Commit Graph
2195 Commits
Author SHA1 Message Date
Dylan M. Taylor ac73229ef4 pptx: reuse shared custom-geometry path tokenization (#2192) 2026-11-16 21:57:53 -05: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
FredApps 6c52db0172 Merge pull request #2180 from storytold/onee/792-geom-reexport
geom: placement, preset and warp geometry come from craft-drawingml (craft-libs#778, #792)
2026-11-16 12:58:46 +01:00
FredApps c3bce89b2d Merge remote-tracking branch 'origin/main' into onee/792-geom-reexport 2026-11-16 12:46:16 +01:00
FredApps 62af9fa114 Merge pull request #2179 from storytold/onee/792-color-reexport
color: DrawingML colours come from craft-drawingml (craft-libs#778, #792)
2026-11-16 12:45:45 +01: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 3b6f9e7cb8 Merge pull request #2176 from storytold/onee/792-pptx-shared-cfb
#792: read password-protected decks with craft-cfb and drop the local PNG encoder
2026-11-16 11:03:41 +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
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 4c844f9332 Merge pull request #2165 from storytold/extract/shared-opc-names
Reuse shared OPC part-name primitives
2026-11-16 07:57:56 +01: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 d04db56f3b Merge pull request #2167 from storytold/cutover/shared-base64-decoder
Reuse shared Base64 decoder with command transport guards
2026-11-16 07:15:16 +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 e6574eb39e Merge pull request #2160 from storytold/cutover/shared-base64
Use shared Base64 encoding for command payloads
2026-11-16 07:04:13 +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 e51ff1a6a8 Merge pull request #2159 from storytold/cutover/shared-rtf-text
Reuse shared RTF text escaping and code-page decoding
2026-11-15 14:39:46 -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
Dylan M. Taylor 6bbb593d82 Use shared Base64 encoding for command payloads 2026-11-15 13:22:23 -05:00
Dylan M. TaylorandNikita Rakitin 187afbd4e5 Reuse shared RTF text escaping and Windows-1252 decoding
Keep outline parser and formatting policy local. Preserve exact escaping with explicit compatibility policy and exhaustive scalar/byte oracles. Original text writer and preserved oracle by Nikita Rakitin (beb883d0).

Co-authored-by: Nikita Rakitin <nnnrrr93@gmail.com>
2026-11-15 13:01:05 -05:00
Mex 1af57126a0 fix: reject incomplete Base64 character tails (#2152)
* fix: reject incomplete Base64 character tails

Reject a final six-bit fragment that cannot form a byte while preserving existing accepted encoding forms.

* fix: reject Base64 data after padding

Track padding before accumulator updates and cover the reviewed Zg==A case while retaining whitespace and repeated padding.
2026-11-15 15:55:35 +00:00
Mex b0c532d2d1 fix: lowercase Greek sigma across formatting runs (#2151)
Use whole-text lowercase context while preserving the output pieces for each formatting run, including Unicode expansion.
2026-11-15 15:08:12 +00:00
Mex 3bad02d1f1 fix: skip escaped symbols in RTF Unicode fallback (#2150)
Count an escaped RTF control symbol as one Unicode fallback character and keep parser positions at UTF-8 boundaries. Extend the parser regressions for escaped fallback sequences.
2026-11-15 14:51:32 +00:00
Mex 1ff3b87f5a fix: honor Arabic Letter Mark in paragraph direction detection (#2149)
Recognize U+061C alongside RLM before the alphabetic-character check. Extend directional-mark coverage to preserve first-strong precedence.
2026-11-15 14:12:23 +00:00
Mex 9f7d1c426f fix: round engineering notation after forming the mantissa (#2148)
Keep chart labels such as 999.94 in ##0.0E+00 at 999.9E+00 until the full mantissa actually rounds past its available digits. Add regression coverage for widths, signs, small values, carries and decimal localization.
2026-11-15 13:44:43 +00:00
autocraft-bot[bot] a4674dbd1c Merge pull request #2133 from MMexicann/patch-3
fix(xtask): reject numeric prereleases with leading zeroes
2026-11-15 03:53:24 +00:00
autocraft-bot[bot] 04907481c1 Apply review fixes
- xtask/src/version.rs
2026-11-15 03:43:10 +00:00
autocraft-bot[bot] 3c60448691 Apply review fixes
- xtask/src/version.rs
2026-11-15 03:20:15 +00:00
Mex 772219838e docs: correct the control protocol method reference (#2132)
* DOC2: correct the control method reference

Updated descriptions for various UI commands and actions, including clarifications on parameters and behaviors.

* DOC2: clarify text replacement and slide-show key limits

* DOC2: describe the grid shortcut restriction
2026-11-15 03:01:23 +00:00
FredAppsandFredApps e86c25af9c Release: DeckCraft v0.19.0 on main (#2134)
Co-authored-by: FredApps <FredApps@users.noreply.github.com>
2026-11-14 21:45:54 +01:00
Mex 10fef35fe6 M1: reject leading-zero numeric prerelease versions 2026-11-14 21:35:21 +01:00
autocraft-bot[bot] b0c77ebd6a Merge pull request #1961 from Naseq/fix-1954-wasm-dead-code
ui-egui: cfg `opening_generation` off wasm32 and lint the wasm set with -D warnings (#1954)
2026-11-14 09:33:39 +00:00
Naseq 68a4190f95 Leave the xtask wasm gate unchanged
The CI gate change (wasm step from check to clippy -D warnings) belongs in
its own CI task; this PR keeps only the opening_generation cfg fix (#1954).
2026-11-14 13:52:49 +04:30
FredAppsandFredApps 69379cf689 Naming: use Diagram and Decorative Text for own features (#1981)
* Naming: use Diagram and Decorative Text for own features

* test(naming): guard neutral display labels

* test(ui): handle escaped literals in feature-name guard

---------

Co-authored-by: FredApps <FredApps@users.noreply.github.com>
2026-11-14 01:29:01 +01:00
Vincent Cloutierandcloutier 7a24b20c8e Document the PPTX slide-list import limit (#2103)
* M1951: document the PPTX slide-list import limit

* M1951: expose the slide-list limit in public API docs

---------

Co-authored-by: cloutier <1014864+cloutier@users.noreply.github.com>
2026-11-13 16:28:51 +00:00
FredApps ef9ac9ac7a Merge pull request #2062 from cloutier/fix/2060-large-adjustment-guides
PPTX: preserve large connector adjustment guides
2026-11-13 10:41:19 +01:00
FredApps eebede8ee4 Merge pull request #2058 from cloutier/fix/empty-master-text-styles
PPTX: preserve empty imported master text styles
2026-11-13 10:41:00 +01:00
FredApps a024a0e86c Merge pull request #1978 from aiongg/autocraft/fix-1977-pptx-bar-chart-series-level-c
Fix pPTX bar chart: series-level `<c:dLbls><c:delete val="1"/></c:dLbls>`
2026-11-13 10:40:24 +01:00