Compare commits

...
120 Commits
Author SHA1 Message Date
Dylan M. Taylor 341a565048 Merge main into release 2026-11-04 21:13:22 -05:00
Dylan M. Taylor 0b7e1e3272 Merge main into release 2026-11-04 21:08:10 -05:00
FredApps 6431460e80 Merge pull request #1872 from FredApps/fix/1866-web-presenter-all-slides
Show: All slides opens in the web Presenter View, as on desktop
2026-11-05 03:04:06 +01:00
FredApps efd26de81d Show: clear the web presenter grid in hidden logic, let Enter and Space pick a focused thumbnail (#1866) 2026-11-05 02:48:01 +01:00
FredApps 884e3d3353 Show: keep web All slides messages small, clear the grid when the popup closes, show it on the end screen (#1866) 2026-11-05 02:37:37 +01:00
FredApps f49ff09b8a Show: All slides opens in the web Presenter View, as on desktop (#1866) 2026-11-05 02:25:54 +01:00
aiongg 52f87aca13 Merge pull request #1474 from zberry/pptx-show-media-controls
PPTX: Show media controls survives a save and reopen
2026-11-04 19:17:57 -05:00
aiongg dfee4c1e88 Merge pull request #1870 from Silvertree2010/fix/1864-next-and-previous-not-working-in
Make Previous/Next work in the web presenter popup
2026-11-04 19:03:38 -05:00
NetterSilverandClaude Opus 5.5 f321416b34 Make Previous/Next work in the web presenter popup
Fixes #1864

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 00:52:05 +01:00
aiongg 41f07a3c4e Merge main into pptx-show-media-controls 2026-11-04 23:51:52 +00:00
.CooCoo 85de6ca5d7 Shape Fill: the gradient help says which kinds rotateWithShape keeps upright (#1843)
With rotateWithShape false, the renderer lays linear and radial gradients
out upright on the slide, while rectangular and path gradients still turn
with the shape. The shape.fill params doc now says so.
2026-11-04 18:11:29 -05:00
Harrison Booth fc18a78e65 comment: reject malformed navigation indices (#1547) 2026-11-04 18:09:50 -05:00
Dylan M. Taylor 31abd2d819 Pass the Linux signing key to the release workflow (#1868) 2026-11-04 17:45:40 -05:00
aiongg 144fd28f69 Merge pull request #1192 from MarekSpodBiedry/issue-1153
Use evaluated field values in the placed text so the PDF text layer shows the slide number (#1153)
2026-11-04 16:15:06 -05:00
aiongg 65ddd8ad51 Apply review fixes
- crates/render/src/placed.rs
2026-11-04 20:55:43 +00:00
Mex 9d36b5931c Ogg: include recovered tail packets in Opus duration (#1862)
* Ogg: include recovered tail packets in Opus duration

Keep the existing missing-granule recovery cursor in step with the packet ends it assigns. Add a regression for a partially and entirely unanchored stream; existing valid end-trimming coverage remains unchanged.

Validation: rustc --edition=2024 --test crates/ogg/src/lib.rs: all 12 tests pass. Scoped rustfmt check passes. Full cargo --offline xtask ci is blocked before build by the uncached pinned egui checkout.

* Ogg: record recovery duration correction
2026-11-04 15:15:59 -05:00
aiongg c252a681a0 Merge pull request #1454 from Silvertree2010/fix/h3020-rtf-outline-import-drops-the-res
Keep whole character after a backslash in RTF outline import
2026-11-04 14:43:02 -05:00
Dylan M. Taylor 80f784d210 Fonts: ignore variation tags the font has no axis for (#1795) 2026-11-04 14:36:13 -05:00
Dylan M. Taylor 07dc2210a1 Repair: bound the notes page size like a slide (#1832) 2026-11-04 14:09:46 -05:00
Dylan M. Taylor 51d19baa0c Ogg, xtask: check packet ranges against the source first; stats skips directory links (#1796) 2026-11-04 13:56:48 -05:00
MarekSpodBiedry 50187449c2 Render tests: import place_slide_with so the date test compiles (#1153) 2026-11-04 07:52:46 +01:00
MarekSpodBiedry b8de82e2cc Merge remote-tracking branch 'origin/main' into review-1192 2026-11-04 07:51:04 +01:00
Dylan M. Taylor 23ac4f7efd Fonts: bound font-controlled work in enumeration, outlines and carets (#1701)
* Fonts: bound font-controlled work in enumeration, outlines and carets

An embedded font could make each lookup do far more than real fonts need:
- enumerating a collection read up to 256 faces times 1024 named instances,
  each then built with its own shaper; now 4096 per file across all faces,
  with a set for the duplicate-style check instead of a scan;
- composite and VARC glyphs could expand one dense outline without limit,
  and the outline cache only counted entries; outlines now stop at 32768
  path elements (drawing nothing past it) and the cache is also bounded by
  the elements it holds;
- the 64-caret limit applied after filtering, so a ligature lookup could
  read every caret record; it now applies to the records read.

* address review: bound thread-local glyph cache by path elements
2026-11-03 20:39:57 -05:00
Dylan M. Taylor 69c91bb265 Render: index table style, skip list, chart point fills and waterfall bars; count each dash (#1774)
* render: look up a table's style once, keep the skip list as a set, count each dash

* render: index chart point fills, scatter x presence and waterfall bars once per chart
2026-11-03 20:39:36 -05:00
Dylan M. Taylor a790fdbc20 Render: find a glyph's line by bisection for gradient and WordArt text (#1783) 2026-11-03 20:39:14 -05:00
Dylan M. Taylor 9d59fa96d3 Text, morph: share a run's gradient between glyph runs, match morph tokens by text (#1784) 2026-11-03 20:38:53 -05:00
Dylan M. Taylor 2dfb07f2c4 Thumbnails: index section starts once (#1800) 2026-11-03 20:38:31 -05:00
Dylan M. Taylor f5fbadde63 Render: evict the least recently used animation instead of clearing the GIF cache (#1802) 2026-11-03 20:38:10 -05:00
Dylan M. Taylor 996bb42ff5 pptx: index relationships by id on read and by target on write (#1739) 2026-11-03 20:12:47 -05:00
Dylan M. Taylor 3c3d504eb1 PPTX: read a notes or comments part for the first slide that names it (#1741)
* pptx: read a notes or comments part for the first slide that names it

* address review: keep modern-comments precedence for already-owned parts
2026-11-03 20:12:24 -05:00
Dylan M. Taylor f5511d93b6 Compare: index slide, shape and media lookups and compare each picture pair once (#1752)
* engine: index review.compare lookups and compare each picture pair once

* engine: keep the compare test's inserted slides empty
2026-11-03 20:12:03 -05:00
Dylan M. Taylor c6b7de43bc engine: use sets for slide-range expansion, added slide selection and repeated-word offsets (#1756) 2026-11-03 20:05:53 -05:00
Dylan M. Taylor 65d5c28512 Text: sort a paragraph's tab stops once and find the next by binary search (#1757)
* text: sort a paragraph's tab stops once and find the next by binary search

* address review: skip the tab-stop lookup for a NaN position
2026-11-03 20:05:32 -05:00
Dylan M. Taylor d2a8be197d geom: measure each follow band once when mapping warped lines (#1758) 2026-11-03 20:05:11 -05:00
Dylan M. Taylor 872cdbf331 pptx: take nested math text once and check an object's part for relationships once (#1762) 2026-11-03 20:04:49 -05:00
Dylan M. Taylor 0233d29064 Spelling: bound a word's language and index results by offset (#1767)
* engine: bound a word's language and index spelling results by offset

* engine: pass the test run's text by value
2026-11-03 19:59:51 -05:00
Dylan M. Taylor a72a5167d0 Morph: pick the next curve to split from a heap, not a full scan (#1782) 2026-11-03 19:59:29 -05:00
Dylan M. Taylor b7d57bacab Text edit: splice inserted paragraphs once and paste runs without rescanning (#1787) 2026-11-03 19:54:06 -05:00
Dylan M. Taylor 42108d0ee7 PPTX export: index animation targets, cache build roles, serialize run properties once per text run (#1788)
* PPTX export: index animation targets, cache a paragraph's build roles, serialize run properties once per text run

* address review: warn once when a by-paragraph build is truncated
2026-11-03 19:53:44 -05:00
Dylan M. Taylor 0107186cee Engine: check the temporary file's path against the write root (#1792) 2026-11-03 19:46:09 -05:00
Dylan M. Taylor 54e24ab868 Review: replace each whole word in one pass (#1793) 2026-11-03 19:36:05 -05:00
Dylan M. Taylor 19dceffd0b pptx: index media, layouts, sections and table styles on export (#1761) 2026-11-03 14:38:07 -05:00
Dylan M. Taylor 1eec8b266c model: group box charts and stack sums in one pass, share hierarchy labels, cap number formats (#1760) 2026-11-03 14:14:24 -05:00
Dylan M. Taylor 32f069eb84 AV1, HEVC: count repeated-frame outputs incrementally and drop inherited entry-point storage (#1763)
* av1: count repeated-frame outputs as they are added

* hevc: give each slice segment its own entry-point list instead of keeping the copied one's allocation
2026-11-03 13:44:00 -05:00
Brandon ThomasandClaude Opus 5.5 aa13eeb45e Integration: community PR wave 10 (one bodyPr attribute chain, reuse imports, doc headers folded)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 08:54:48 -05:00
Brandon Thomas 50e02490b3 Merge pull request #1720
# Conflicts:
#	crates/engine/src/cmd/reuse.rs
2026-11-03 08:53:01 -05:00
Brandon Thomas 907ebd2de0 Merge pull request #1710
# Conflicts:
#	crates/model/src/resolve.rs
#	crates/model/src/table.rs
#	crates/model/src/text.rs
#	crates/pptx/src/read/dml.rs
#	crates/pptx/src/read/shapes.rs
#	crates/pptx/src/write/dml.rs
#	crates/pptx/src/write/shapes.rs
#	crates/pptx/tests/it/roundtrip.rs
2026-11-03 08:53:00 -05:00
Brandon Thomas ed77cc9eaa Merge pull request #1711
# Conflicts:
#	crates/pptx/tests/it/roundtrip.rs
2026-11-03 08:53:00 -05:00
Brandon Thomas 928aa9cc16 Merge pull request #1713
# Conflicts:
#	crates/pptx/tests/it/roundtrip.rs
2026-11-03 08:53:00 -05:00
Brandon Thomas 5cb154ce9d Merge pull request #1712
# Conflicts:
#	crates/pptx/tests/it/roundtrip.rs
2026-11-03 08:53:00 -05:00
Brandon Thomas ef55104799 Merge pull request #1719 2026-11-03 08:52:49 -05:00
Brandon Thomas 3f29dccc0a Merge pull request #1717 2026-11-03 08:52:49 -05:00
Brandon Thomas 160c923caf Merge pull request #1716 2026-11-03 08:52:49 -05:00
Brandon Thomas 9f01f2ebdb Merge pull request #1707 2026-11-03 08:52:49 -05:00
Brandon Thomas d365e0b9de Merge pull request #1751 2026-11-03 08:52:49 -05:00
Brandon Thomas 1d181017f6 Merge pull request #1723 2026-11-03 08:52:49 -05:00
Brandon Thomas 996ca4dd65 Merge pull request #1722 2026-11-03 08:52:49 -05:00
Brandon Thomas 6c1170af62 Merge pull request #1721 2026-11-03 08:52:49 -05:00
Brandon Thomas ed62aafbe6 Merge pull request #1709 2026-11-03 08:52:49 -05:00
Brandon Thomas 9f68e8e2cc Reuse: a non-finite size ratio leaves content unscaled; cell text scaling tested; doc history kept 2026-11-03 08:52:48 -05:00
Brandon Thomas a6e2b64875 Reuse: a remapped table style's own XML carries its new id; checklist row name kept 2026-11-03 08:51:44 -05:00
Brandon Thomas c7b91ff2ec PPTX: reflection angles, skews and start position are written inside the schema's ranges 2026-11-03 08:50:28 -05:00
Brandon Thomas 6546136a42 PPTX timing: a sorted click group keeps its click on the effect that now plays first 2026-11-03 08:49:18 -05:00
Brandon Thomas 67c1d78948 PPTX: horzOverflow never reads or writes ellipsis (vertical only in ST_TextHorzOverflowType) 2026-11-03 08:47:09 -05:00
Brandon Thomas 4df4ea6c9f Text: Thai distributed paragraphs still stretch like justified ones 2026-11-03 08:41:57 -05:00
Naseq 751ac26d28 fix(pptx): place effects by their parent time node delays (fixes #1744) 2026-11-03 17:57:57 +04:30
Dylan M. Taylor 82ec8137dc Format: bound native load work for the manifest, failed media reads and layout checks (#1704)
- presentation.json gets its own 256 MiB inflation limit instead of the 2 GiB
  per-entry allowance, and is parsed in place: only a file that needs its
  null-number repair is copied.
- A media member that fails decoding or its CRC is charged for the bytes it
  inflated, so later members cannot reuse the shared media budget.
- repair() and Presentation::validate() check slide layouts against a set
  built once instead of scanning every layout per slide.
2026-11-03 07:39:27 -05:00
Harrison Booth b61c5f11bd D716: preserve reflection transforms on save 2026-11-02 22:45:51 -06:00
Harrison Booth a0956fee13 Preserve alternate run language 2026-11-02 22:42:25 -06:00
Harrison Booth bf60dbb773 Fit reused slide content to destination size 2026-11-02 22:41:55 -06:00
Harrison Booth 328b4ed274 Preserve RTL table direction 2026-11-02 22:41:44 -06:00
Harrison Booth 1e5b78de37 D702: prune deleted slides from custom shows 2026-11-02 22:32:41 -06:00
Harrison Booth 73bd231589 D709: remove dangling animations from merged shapes 2026-11-02 22:32:19 -06:00
Harrison Booth 63531e2a6a Merge remote-tracking branch 'origin/main' into dc-build-d705
# Conflicts:
#	ROADMAP.md
#	docs/parity-checklist.md
2026-11-02 22:21:16 -06:00
Harrison Booth 6cdbee50a3 Reuse custom table styles with slides 2026-11-02 22:20:52 -06:00
Brandon Thomas 0c00f22403 Merge pull request #1694
Comments: the pane keeps its width and resizes again (fixes #1431)
2026-11-02 23:07:49 -05:00
Brandon Thomas 3c8dc6bc98 Merge pull request #1693
Render: tiled picture fills keep their size in scaled groups and upright tiles
2026-11-02 23:07:49 -05:00
Brandon Thomas 6ab485a096 Merge pull request #1679
Transitions: play transition preview from previous slide when Preview is clicked (#1654)
2026-11-02 23:07:48 -05:00
Brandon Thomas 597b9488f5 Merge pull request #1579
ui: label animation effect options
2026-11-02 23:07:48 -05:00
Brandon Thomas 4eb9098a7c Merge pull request #1588
Preserve bullet sizes authored in points
2026-11-02 23:07:47 -05:00
Brandon Thomas df4bb8b84a Merge pull request #1698
Reject png/jpeg targets in file.save instead of writing zip bytes

# Conflicts:
#	crates/engine/src/tests.rs
2026-11-02 23:07:47 -05:00
Brandon Thomas f66bed88ac Merge pull request #1686
Use a short temp file name in write_file for long file names
2026-11-02 23:07:46 -05:00
Brandon Thomas ee64e93c4a Merge pull request #1682
Reject invalid master and layout indices in view.slideMaster
2026-11-02 23:07:45 -05:00
Brandon Thomas f8128f9107 Merge pull request #1680
Reject unsupported handout perPage values in file.export
2026-11-02 23:07:45 -05:00
Brandon ThomasandClaude Opus 5.5 97050a353b Bullets: an own bullet size still clears an inherited follow-text flag (as #1589 did)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 23:07:34 -05:00
Brandon ThomasandClaude Opus 5.5 fb3b857f53 file.save: an explicit jpg format is refused too
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 23:07:29 -05:00
Brandon ThomasandClaude Opus 5.5 ba3b57c756 file.export: a perPage that isn't a count is refused, not read as 6
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 23:07:24 -05:00
Harrison Booth e4a0c2971b Keep Thai distributed text rendering outside this change 2026-11-02 22:07:16 -06:00
Harrison Booth 0f5364ee9f picture: use displayed group size for compression 2026-11-02 22:05:35 -06:00
Harrison Booth bb417bf98a Preserve Thai distributed paragraph alignment 2026-11-02 21:53:40 -06:00
Harrison Booth d00ef08fae Preserve normalized character height in PPTX 2026-11-02 21:50:20 -06:00
Harrison Booth 0d06481c34 Preserve compatible line spacing in PPTX 2026-11-02 21:47:50 -06:00
Harrison Booth 44b133a3c9 Preserve text overflow settings in PPTX 2026-11-02 21:45:18 -06:00
Harrison Booth b66ba2e10a Preserve centered anchoring on table cells 2026-11-02 21:42:44 -06:00
Dylan M. Taylor 8ec4f6cabb Fonts: shape long items in bounded pieces (#1702)
The shaper lets one call grow to 256 glyphs per input character, as an
embedded font's substitutions decide, and every glyph was then copied out.
Items longer than 1 KiB are now shaped in pieces (cut at a space where one
is near, never before a combining mark or after a joiner), each with the
rest of the paragraph as context and the item's script, and a piece that
expands past 32 glyphs per character falls back to one glyph per character
from the cmap.
2026-11-02 21:22:47 -05:00
Dylan M. Taylor 5a668bf02e Animations: index morph matching and timeline lookups by shape (#1700)
* Animations: index morph matching and timeline lookups by shape

Morph pairing searched every shape of the next slide for each shape of the
current one, four times over, rebuilding shape text inside each comparison.
Timeline state looked up a shape's effects, paragraph owner and base colour
by scanning every effect, group and colour on the slide, once per shape and
paragraph drawn. Both are now indexed once, keeping the same match order.

* Animations: drop wall-clock bounds from the large morph and paragraph tests

On a loaded runner a ten-second bound can fail after every functional
assertion passed. The inputs stay large enough that a quadratic regression
hangs the test instead.
2026-11-02 21:18:59 -05:00
NetterSilverandClaude Haiku 5.5 58c24883c7 Reject png/jpeg targets in file.save instead of writing zip bytes
Found while testing crates/engine/src/cmd/file.rs:489 (save, with save_bytes at :341-349 and format_for_path at :440)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-03 01:14:15 +01:00
Zach BerryandClaude Opus 5.5 b9eaaeb23b Test: hidden media controls are written as PowerPoint's p14 extension
The round trip now also checks the written presProps.xml: inside p:showPr, the extension uri and
p14:showMediaCtrls with its namespace declared on the element; the default writes nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 17:03:02 -06:00
Harrison Booth 3cfd4c5e6e Parse percentage-form bullet sizes 2026-11-02 15:47:58 -06:00
Harrison Booth a200b92258 Merge remote-tracking branch 'origin/main' into dc-build-d712
# Conflicts:
#	crates/model/src/text.rs
#	crates/pptx/src/read/dml.rs
#	crates/pptx/src/write/dml.rs
#	crates/pptx/tests/it/roundtrip.rs
2026-11-02 15:45:48 -06:00
Harrison Booth f2803102c1 Correct animation option labels 2026-11-02 15:41:17 -06:00
Harrison Booth fd4d2a8f79 Merge remote-tracking branch 'origin/main' into dc-build-d604
# Conflicts:
#	ROADMAP.md
#	docs/gaps.md
2026-11-02 15:36:41 -06:00
LeonardoandClaude Sonnet 5.5 e90e7f6c03 fix(render): size the tile of a picture's shadow and reflection in points too
Review of #1693 found that cast_effects built the picture content that a shadow,
a glow and a reflection are drawn from without converting a tiled fill to
points, so inside a scaled group the reflection of a tiled picture showed
child-space tiles while its face showed the right ones.

The content now goes through paint::tiled_picture_per_point with per_point_xy,
as the face does.

Test: a tiled picture's reflection in groups scaled 0.25, 1600 and 2x0.5 shows
the same colours as in an unscaled group; it fails without the change.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 17:46:33 -03:00
LeonardoandClaude Sonnet 5.5 9e59b5f223 fix(render): size a group's own tile and a picture shape's own tile in points too
Review of #1693 found two more places that drew a tiled picture fill in the
shape's own (child-space) units inside a scaled group.

A group nested in a scaled group stored its own tiled fill unconverted, so the
members that take it (grpFill) got oversized tiles. The owning group now
converts the fill with per_point_xy when it stores it, so inheriting members,
directly or through a chain of grpFill groups, get the converted tile.

A picture shape (p:pic) whose blip fill is a tile passed its own fill straight
to paint::picture. It now goes through paint::tiled_picture_per_point, which
tiled_per_point also uses.

Tests: a group's tile passed to its members and a picture shape's own tile, each
in outer groups scaled 1, 0.25, 1600 and 2x0.5; both fail without the change.

Docs: the Picture and texture fill checklist row is re-assessed (remains P) with
its status line and revision history, and the ROADMAP progress log row mentions
both cases.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 17:31:10 -03:00
Luis 5cb6ba8403 Comments: the pane keeps its width and resizes again (fixes #1431)
A comment card's reply row reserved a fixed 70 px for its Resolve and
delete buttons, which need more. The row overflowed the card, the pane
grew by the overflow every frame until it stuck at its widest, and
dragging its edge no longer changed it. The buttons are now laid out
first, from the right, and the reply field takes the width they leave.
2026-11-02 21:03:34 +01:00
LeonardoandClaude Sonnet 5.5 62ada3ab9a fix(render): tiled picture fills keep their size in scaled groups and upright tiles
A tiled picture fill (a:blipFill with a:tile) was sized in the shape's own
units. Inside a group whose child space differs from its box (old decks write
child spaces ~1800 times smaller) one tile covered hundreds of boxes, so the
fill showed a single flat texel instead of the texture.

PowerPoint's own PNG export of a synthetic probe deck shows the tile keeps its
size, offset, anchor and mirroring in slide points whatever the group's scale,
uniform or stretched unevenly, nested or flipped. The tile is now converted
from points to shape units per axis (Renderer::per_point_xy, paint::
tiled_per_point), and snapped to whole device pixels per axis.

Tiles with rotWithShape="0" are drawn in device pixels and were sized in
pixels, ignoring the zoom (even outside groups); they are now sized to pixels
first.

Tests: a tile in groups of seven scales (uniform and uneven, wide and tall
tile), and an upright tile in a turned shape at zoom 1 and 2.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 16:31:29 -03:00
NetterSilverandClaude Haiku 5.5 77cd617596 Use a short temp file name in write_file for long file names
Found while testing crates/engine/src/io.rs:49

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 13:37:19 +01:00
NetterSilverandClaude Haiku 5.5 72ac32715f Reject invalid master and layout indices in view.slideMaster
Found while testing crates/engine/src/cmd/design/master_view.rs:8 (master_view; `master` read via usize_param, `layout` at :14)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 12:21:37 +01:00
Naseq e0992c1325 Transitions: render cached previous slide with completed animation state
- Use render_frame with timeline.steps() and t = 0.0 so the previous slide
  is rendered in its final completed state during transition preview.
- Pass duration: 1000 integer ms in test to explicitly test the requested duration.
2026-11-02 15:25:31 +04:30
NetterSilverandClaude Haiku 5.5 4bed9b6c37 Reject unsupported handout perPage values in file.export
Found while testing crates/engine/src/cmd/file.rs:362 (pdf_options) with crates/pdf/src/lib.rs:364-371 (handout_boxes)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 11:50:54 +01:00
Naseq ea9dad8ef9 Transitions: play transition preview from previous slide when Preview is clicked (#1654)
- When Preview is clicked on the Transitions ribbon, initialize Show with
  start_transition_preview from the prior slide into the selected slide
  (or from black for slide 0).
- If tr.old is unset for a non-part transition with tr.from, render the
  previous slide texture on the first frame so the transition blends cleanly.
- Indicate active playback on the Preview button while previewing.
- Regression tests for transitions from previous slide and from black on slide 0.
2026-11-02 15:04:05 +04:30
MarekSpodBiedry 74d7b844fe Merge origin/main into issue-1153 2026-11-01 07:41:05 +01:00
Harrison Booth 98138f563b Trim whitespace in bullet point sizes 2026-10-30 23:24:07 -05:00
Harrison Booth 917d4b96a9 Honor bullet size schema bounds and inheritance 2026-10-30 23:07:54 -05:00
Harrison Booth b1900e526d Preserve point-sized bullets in PPTX 2026-10-30 22:42:28 -05:00
Harrison Booth d453bee54f D604: readable animation effect labels 2026-10-30 18:57:51 -05:00
Zach BerryandClaude Sonnet 5.5 6303166a18 [PP1] show.setup showMediaControls survives a pptx save and reopen
PowerPoint stores Show media controls as the p14:showMediaCtrls extension inside
p:showPr (uri {2FDB2607-...}); absent means shown. Write it when hidden, read it back.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-30 15:12:26 -05:00
NetterSilverandClaude Haiku 5.5 d8936f94af Keep whole character after a backslash in RTF outline import
Found while testing crates/format/src/rtf.rs:301-326 (symbol / text, reached via escape)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-27 10:58:38 +01:00
MarekSpodBiedry 813378cc20 Keep the PDF text layer aligned with line breaks, use one clock reading for raster and text layer, and test the page text (#1153) 2026-10-23 16:08:53 +02:00
MarekSpodBiedry cc6773c95f Use evaluated field values in the placed text so the PDF text layer shows the slide number (#1153) 2026-10-22 21:02:59 +02:00
7 changed files with 183 additions and 12 deletions
+3
View File
@@ -251,6 +251,9 @@ impl Popup {
if value.get("nextChanged").and_then(|v| v.as_bool()) == Some(false) {
data.next = previous.next.clone();
}
if data.slides.is_none() {
data.slides = previous.slides.clone();
}
}
*target.borrow_mut() = Some(data);
*received.borrow_mut() = js_sys::Date::now();
+4
View File
@@ -144,6 +144,10 @@ impl SlideApp {
let visible = show::viewport_visible(ctx);
let Some(doc) = self.session.active().map(|d| d.doc.clone()) else { return };
let Some(show) = self.show.as_mut() else { return };
if show.presenter_grid && self.services.presenter.as_ref().is_some_and(|host| !host.is_open()) {
// A web popup closed with its grid open must not hold auto-advance while this tab is hidden (#1866).
show.presenter_grid = false;
}
if visible {
// A visible logic-only pass (`run_logic`) carries the last full frame's input time.
// Anchoring that stale time to `now` would move the hidden clock backwards if the
+102 -5
View File
@@ -49,10 +49,15 @@ pub struct Snapshot {
pub paused: bool,
pub notes_px: f32,
pub blank: Option<String>,
/// All slides is open in the presenter window (#1866); the audience keeps the current slide.
pub grid: bool,
pub zoom_armed: bool,
pub current: Option<Preview>,
pub next: Option<Preview>,
/// The All slides thumbnails, in slide order, while `grid` is on. `None` in a sent delta
/// means "unchanged since the last snapshot the window received".
#[serde(default)]
pub slides: Option<Vec<Preview>>,
}
/// Images acknowledged by a successful transport send, never merely attempted images.
@@ -60,6 +65,7 @@ pub struct Snapshot {
pub struct DeltaCache {
current: Option<Preview>,
next: Option<Preview>,
slides: Option<Vec<Preview>>,
token: String,
}
impl DeltaCache {
@@ -75,6 +81,12 @@ impl DeltaCache {
let next_changed = fresh || self.next != snapshot.next;
let current = snapshot.current.clone();
let next = snapshot.next.clone();
let slides = snapshot.slides.clone();
if !fresh && self.slides == slides {
snapshot.slides = None;
} else if snapshot.slides.is_none() {
snapshot.slides = Some(Vec::new());
}
if !current_changed {
snapshot.current = None;
}
@@ -84,14 +96,28 @@ impl DeltaCache {
send(snapshot, current_changed, next_changed)?;
self.current = current;
self.next = next;
self.slides = slides;
self.token = token.to_owned();
Ok(())
}
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub enum Command {
Key { name: String, command: bool, shift: bool, alt: bool, ctrl: bool },
Zoom { x: f32, y: f32 },
Key {
name: String,
command: bool,
shift: bool,
alt: bool,
ctrl: bool,
},
Zoom {
x: f32,
y: f32,
},
/// A slide chosen in the presenter window's All slides grid (#1866).
Goto {
slide: usize,
},
End,
}
/// Implemented by the browser host. Native hosts retain the existing egui viewport.
@@ -112,6 +138,8 @@ pub struct View {
next: Option<egui::TextureHandle>,
previous_current: Option<Preview>,
previous_next: Option<Preview>,
grid_source: Option<Vec<Preview>>,
grid: Vec<Option<egui::TextureHandle>>,
}
impl View {
/// Install the same interface and dynamic fallback fonts as SlideApp before layout.
@@ -147,6 +175,10 @@ impl View {
.collect::<Vec<_>>()
});
for (key, modifiers) in keys {
if snapshot.grid && matches!(key, egui::Key::Space | egui::Key::Enter) {
// A focused thumbnail takes these to choose its slide; the show ignores them while the grid is open.
continue;
}
// Consume once before widgets see Space/Enter, avoiding a second button activation.
ui.input_mut(|i| i.consume_key(modifiers, key));
commands.push(Command::Key {
@@ -200,6 +232,11 @@ impl View {
}
});
ui.separator();
if snapshot.grid {
// All slides opens here, as in the desktop Presenter View; the audience keeps the current slide.
self.grid_ui(ui, snapshot, &mut commands);
return commands;
}
ui.columns(2, |columns| {
let left = &mut columns[0];
if snapshot.ended {
@@ -227,9 +264,6 @@ impl View {
if snapshot.zoom_armed {
left.label("Click the preview to zoom.");
}
if snapshot.grid {
left.label("Choose a slide in the audience window, or press G to return.");
}
let right = &mut columns[1];
right.label("Next");
if let Some(texture) = &self.next {
@@ -260,6 +294,43 @@ impl View {
commands
}
}
impl View {
fn grid_ui(&mut self, ui: &mut egui::Ui, snapshot: &Snapshot, commands: &mut Vec<Command>) {
let slides = snapshot.slides.as_deref().unwrap_or_default();
if self.grid_source.as_deref() != Some(slides) {
self.grid_source = Some(slides.to_vec());
self.grid = slides
.iter()
.enumerate()
.map(|(i, p)| p.image().map(|image| ui.ctx().load_texture(format!("remote-grid-{i}"), image, egui::TextureOptions::LINEAR)))
.collect();
}
ui.heading("All slides");
ui.label("Choose a slide to show it, or press G to return.");
if snapshot.total > crate::show::GRID_CAP {
ui.label(format!("First {} slides", crate::show::GRID_CAP));
}
egui::ScrollArea::vertical().show(ui, |ui| {
ui.horizontal_wrapped(|ui| {
for (i, texture) in self.grid.iter().enumerate() {
let size = egui::vec2(160.0, 90.0);
let label = format!("{}", i + 1);
let label = if i == snapshot.slide { egui::RichText::new(label).strong() } else { egui::RichText::new(label) };
let response = match texture {
Some(t) => ui.add(egui::Button::image_and_text(
egui::Image::new(t).fit_to_exact_size(fit_preview(t.size_vec2(), size.x, size.y)),
label,
)),
None => ui.add_sized(size, egui::Button::new(label)),
};
if response.clicked() {
commands.push(Command::Goto { slide: i });
}
}
});
});
}
}
fn fit_preview(size: egui::Vec2, width: f32, height: f32) -> egui::Vec2 {
size * (width.max(1.0) / size.x.max(1.0)).min(height.max(1.0) / size.y.max(1.0))
}
@@ -282,6 +353,7 @@ mod tests {
zoom_armed: false,
current: Some(Preview { width: 1, height: 1, rgba: vec![255; 4] }),
next: Some(Preview { width: 1, height: 1, rgba: vec![0; 4] }),
slides: None,
}
}
@@ -418,6 +490,7 @@ mod tests {
zoom_armed: false,
current: None,
next: None,
slides: None,
};
let mut h = egui_kittest::Harness::builder().with_size(egui::vec2(1000.0, 700.0)).build_ui_state(
|ui, (view, snapshot, sent): &mut (View, Snapshot, Vec<Command>)| {
@@ -437,6 +510,30 @@ mod tests {
assert!(matches!(h.state().2.last(), Some(Command::Key { name, .. }) if name == egui::Key::Space.name()));
}
#[test]
fn all_slides_opens_in_the_popup_and_picks_a_slide() {
use egui_kittest::kittest::Queryable;
let thumb = Preview { width: 16, height: 9, rgba: vec![200; 16 * 9 * 4] };
let mut snapshot = snapshot();
snapshot.total = 3;
snapshot.grid = true;
snapshot.slides = Some(vec![thumb.clone(), thumb.clone(), thumb]);
let mut h = egui_kittest::Harness::builder().with_size(egui::vec2(1000.0, 700.0)).build_ui_state(
|ui, (view, snapshot, sent): &mut (View, Snapshot, Vec<Command>)| {
sent.extend(view.ui(ui, snapshot));
},
(View::default(), snapshot, Vec::new()),
);
h.run_steps(2);
assert!(h.query_by_label("Notes").is_none(), "the grid replaces the presenter panes, as on desktop (#1866)");
h.get_by_label("3").click();
h.run_steps(2);
assert_eq!(h.state().2, vec![Command::Goto { slide: 2 }]);
h.key_press(egui::Key::Enter);
h.run_steps(2);
assert!(!h.state().2.iter().any(|c| matches!(c, Command::Key { .. })), "Enter is left to the focused thumbnail");
}
#[test]
fn previews_are_bounded_and_bad_dimensions_are_rejected() {
let image = egui::ColorImage::filled([1280, 720], egui::Color32::RED);
+4
View File
@@ -18,6 +18,7 @@ mod presenter;
mod render;
mod ui;
mod zoom;
pub(crate) use zoom::GRID_CAP;
#[cfg(test)]
use media::{on_screen, pointer_on_media_bar, shown_slide_rect, slide_media_bars};
@@ -65,6 +66,8 @@ pub struct Show {
preview_spawns: usize,
remote_preview: Option<crate::presenter::Preview>,
remote_next: Option<(usize, crate::presenter::Preview)>,
/// All slides thumbnails sent to the web presenter window while its grid is open (#1866).
remote_grid: Vec<crate::presenter::Preview>,
remote_sent: f64,
remote_opened: bool,
/// The next slide's first frame, rendered in the background while this one is shown so
@@ -237,6 +240,7 @@ impl Show {
preview_spawns: 0,
remote_preview: None,
remote_next: None,
remote_grid: vec![],
remote_sent: f64::NEG_INFINITY,
remote_opened: false,
prefetch: None,
+33 -2
View File
@@ -1132,6 +1132,8 @@ fn remote_presenter_uses_the_audience_state_and_closes_with_the_show() {
opens: usize,
closes: usize,
commands: Vec<Command>,
last: Option<Snapshot>,
gone: bool,
}
struct Mock(Rc<RefCell<Bridge>>);
impl Host for Mock {
@@ -1140,12 +1142,14 @@ fn remote_presenter_uses_the_audience_state_and_closes_with_the_show() {
Ok(())
}
fn is_open(&self) -> bool {
true
!self.0.borrow().gone
}
fn commands(&mut self) -> Vec<Command> {
std::mem::take(&mut self.0.borrow_mut().commands)
}
fn update(&mut self, _: Snapshot) {}
fn update(&mut self, snapshot: Snapshot) {
self.0.borrow_mut().last = Some(snapshot);
}
fn close(&mut self) {
self.0.borrow_mut().closes += 1;
}
@@ -1179,6 +1183,33 @@ fn remote_presenter_uses_the_audience_state_and_closes_with_the_show() {
h.run_steps(2);
assert_eq!(h.state().show.as_ref().unwrap().state.slide, slide, "{name}");
}
// #1866: All slides opens in the web Presenter View, as on desktop; the audience keeps its slide.
bridge.borrow_mut().commands.push(Command::Key { name: "G".into(), command: false, shift: false, alt: false, ctrl: false });
h.run_steps(2);
let show = h.state().show.as_ref().unwrap();
assert!(show.presenter_grid && !show.grid, "G from the popup opens its own grid, not the audience's");
for _ in 0..20 {
h.step();
std::thread::sleep(std::time::Duration::from_millis(15));
}
let last = bridge.borrow().last.clone().unwrap();
assert!(last.grid);
assert_eq!(last.slides.as_ref().map(Vec::len), Some(3), "the popup gets a thumbnail per slide");
assert!(last.slides.iter().flatten().all(|p| p.width.max(p.height) <= 96), "thumbnails stay small enough for one message");
assert!(last.current.is_none() && last.next.is_none(), "the grid replaces both previews");
bridge.borrow_mut().commands.push(Command::Goto { slide: 2 });
h.run_steps(2);
let show = h.state().show.as_ref().unwrap();
assert!(!show.presenter_grid && !show.grid);
assert_eq!(show.state.slide, 2);
// Closing the popup with its grid open must not hold auto-advance for the rest of the show.
bridge.borrow_mut().commands.push(Command::Key { name: "G".into(), command: false, shift: false, alt: false, ctrl: false });
h.run_steps(2);
assert!(h.state().show.as_ref().unwrap().presenter_grid);
bridge.borrow_mut().gone = true;
h.run_steps(2);
assert!(!h.state().show.as_ref().unwrap().presenter_grid);
bridge.borrow_mut().gone = false;
bridge.borrow_mut().commands.push(Command::End);
h.run_steps(2);
assert!(h.state().show.is_none());
+36 -4
View File
@@ -80,6 +80,10 @@ pub fn ui(app: &mut SlideApp, ui: &mut Ui) {
&& !show.reading
&& let Some(host) = app.services.presenter.as_mut()
{
if show.remote_opened && show.presenter_grid && !host.is_open() {
// A grid left open in the closed popup would hold auto-advance for the rest of the show.
show.presenter_grid = false;
}
if !show.remote_opened {
show.remote_opened = true;
if let Err(message) = host.open() {
@@ -96,9 +100,18 @@ pub fn ui(app: &mut SlideApp, ui: &mut Ui) {
crate::presenter::Command::Key { name, command, shift, alt, ctrl } => {
if let Some(key) = egui::Key::from_name(&name) {
let modifiers = egui::Modifiers { command, shift, alt, ctrl, mac_cmd: command && !ctrl };
out.keep &= handle_keys(&mut show, &doc, now, vec![(key, modifiers)], false).0;
// The popup is the Presenter View: G opens All slides there, not on the audience screen (#1866).
out.keep &= handle_keys(&mut show, &doc, now, vec![(key, modifiers)], true).0;
}
}
crate::presenter::Command::Goto { slide } if show.presenter_grid && slide < doc.slides.len() => {
show.presenter_grid = false;
show.blank = None;
show.zoom = None;
show.zoom_arm = false;
let action = show.state.goto(&doc, slide);
out.keep &= show.apply(action, &doc, now);
}
_ => {}
}
}
@@ -143,6 +156,20 @@ pub fn ui(app: &mut SlideApp, ui: &mut Ui) {
);
show.remote_next = crate::presenter::Preview::from_image(&crate::textures::to_color_image(&image, false)).map(|image| (n, image));
}
if !show.presenter_grid {
show.remote_grid.clear();
} else if show.remote_grid.len() < grid_indices(doc.slides.len()).len() {
// A few thumbnails per update keep the audience window responsive on the web.
for i in grid_indices(doc.slides.len()).into_iter().skip(show.remote_grid.len()).take(4) {
// At most 96 px on the long side: 48 thumbnails stay well under the popup's message limit.
let (w, h) = (doc.slide_size.width.max(1.0), doc.slide_size.height.max(1.0));
let scale = REMOTE_THUMB / w.max(h);
let size = (((w * scale).round() as u32).max(1), ((h * scale).round() as u32).max(1));
let image = deckcraft_render::render_slide(&doc, i, &RenderOpts { scale, size: Some(size), ..Default::default() });
let preview = crate::presenter::Preview::from_image(&crate::textures::to_color_image(&image, false));
show.remote_grid.push(preview.unwrap_or(crate::presenter::Preview { width: 1, height: 1, rgba: vec![0; 4] }));
}
}
host.update(crate::presenter::Snapshot {
slide: show.state.slide,
total: doc.slides.len(),
@@ -152,10 +179,12 @@ pub fn ui(app: &mut SlideApp, ui: &mut Ui) {
paused: show.timer.paused(),
notes_px: show.notes_px,
blank: show.blank_name().map(str::to_owned),
grid: show.grid,
grid: show.presenter_grid,
zoom_armed: show.zoom_arm,
current: show.remote_preview.clone(),
next: show.remote_next.as_ref().filter(|(n, _)| Some(*n) == next).map(|(_, image)| image.clone()),
// The grid replaces both previews in the popup; leaving them out keeps one message small.
current: show.remote_preview.clone().filter(|_| !show.presenter_grid),
next: show.remote_next.as_ref().filter(|(n, _)| Some(*n) == next && !show.presenter_grid).map(|(_, image)| image.clone()),
slides: show.presenter_grid.then(|| show.remote_grid.clone()),
});
show.remote_sent = now;
}
@@ -164,6 +193,9 @@ pub fn ui(app: &mut SlideApp, ui: &mut Ui) {
finish(app, show, &f, out.keep);
}
/// Longest side of an All slides thumbnail sent to the web presenter window (#1866).
const REMOTE_THUMB: f64 = 96.0;
fn paint_hidden(ui: &Ui, doc: &Presentation, show: &Show) {
if show.started {
let full = ui.max_rect();
+1 -1
View File
@@ -182,7 +182,7 @@ const WHEEL_NOTCHES_PER_DOUBLING: f32 = 4.0;
/// PowerPoint's slide show magnifier goes up to 400%.
const WHEEL_ZOOM_MAX: f32 = 4.0;
pub(super) const GRID_CAP: usize = 48;
pub(crate) const GRID_CAP: usize = 48;
const TOOL_BAR_W: f32 = 520.0;