From 9f68e8e2cce47ba84acabf2489b59850d1056167 Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Tue, 3 Nov 2026 08:52:48 -0500 Subject: [PATCH] Reuse: a non-finite size ratio leaves content unscaled; cell text scaling tested; doc history kept --- ROADMAP.md | 2 +- crates/engine/src/cmd/reuse.rs | 14 ++++++++++++-- docs/gaps.md | 2 +- docs/parity-checklist.md | 4 +++- 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/ROADMAP.md b/ROADMAP.md index 44d67db08..046ed84f3 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -2,7 +2,7 @@ **Stage: alpha** · next: beta, ~20 points and ~120–210 h away -> **Last reviewed:** 2026-11-02 · **Last updated:** 2026-11-02 · **Change:** trivial (reused slides scale to the destination size, including kept masters, layouts, groups, tables and text; reuse remains partial because picker thumbnails are not implemented) · **Target:** Microsoft PowerPoint for Mac 16.113 (Microsoft 365) +> **Last reviewed:** 2026-11-02 · **Last updated:** 2026-11-02 · **Change:** trivial (reused slides scale to the destination size, including kept masters, layouts, groups, tables and text; reuse remains partial because picker thumbnails are not implemented; previous: File › About replaces Account) · **Target:** Microsoft PowerPoint for Mac 16.113 (Microsoft 365) > **Last reviewed:** 2026-10-14 · **Last updated:** 2026-11-01 · **Change:** trivial (locked No Fill and no-outline click-through regression coverage added; No Fill hit-testing follows resolved fill instead of the presence of a style (#1621); scores unchanged) · **Target:** Microsoft PowerPoint for Mac 16.113 (Microsoft 365) > **Last reviewed:** 2026-10-14 · **Last updated:** 2026-10-30 · **Change:** trivial (progress log: read-only `slide.actions` lists shape and table text actions; parity scores unchanged) · **Target:** Microsoft PowerPoint for Mac 16.113 (Microsoft 365) > **Last reviewed:** 2026-10-14 · **Last updated:** 2026-10-27 · **Change:** trivial (progress log: Set Up Slide Show ▸ Keep mouse cursor visible, #1445; stage and scores unchanged) · **Target:** Microsoft PowerPoint for Mac 16.113 (Microsoft 365) diff --git a/crates/engine/src/cmd/reuse.rs b/crates/engine/src/cmd/reuse.rs index 765e4a81b..b12da34d2 100644 --- a/crates/engine/src/cmd/reuse.rs +++ b/crates/engine/src/cmd/reuse.rs @@ -318,7 +318,8 @@ fn reuse(s: &mut Session, p: &Value) -> Result { s.edit(|doc, sel| { let at = at.unwrap_or(sel.slide + 1).min(doc.slides.len()); let scale = |source: f64, destination: f64| { - if source.is_finite() && source > 0.0 && destination.is_finite() && destination > 0.0 { destination / source } else { 1.0 } + let ratio = destination / source; + if source > 0.0 && destination > 0.0 && ratio.is_finite() && ratio > 0.0 { ratio } else { 1.0 } }; let sx = scale(source_size.width, doc.slide_size.width); let sy = scale(source_size.height, doc.slide_size.height); @@ -453,7 +454,14 @@ mod tests { Shape { xfrm: Some(Xfrm::new(40.0, 50.0, 400.0, 200.0)), text: Some(text), - kind: ShapeKind::Table(Table::new(2, 2, 400.0, 40.0)), + kind: ShapeKind::Table({ + let mut table = Table::new(2, 2, 400.0, 40.0); + table.rows[0].cells[0].text = TextBody::from_text("cell"); + if let Some(run) = table.rows[0].cells[0].text.paragraphs.first_mut().and_then(|p| p.runs.first_mut()) { + run.props.size = Some(18.0); + } + table + }), ..Default::default() }, Shape { @@ -496,6 +504,8 @@ mod tests { assert_eq!(table.rows.first().map(|r| r.height), Some(20.0)); let font_size = table_shape.text.as_ref().and_then(|t| t.paragraphs.first()).and_then(|p| p.runs.first()).and_then(|r| r.props.size); assert_eq!(font_size, Some(12.0)); + let cell_size = table.rows[0].cells[0].text.paragraphs.first().and_then(|p| p.runs.first()).and_then(|r| r.props.size); + assert_eq!(cell_size, Some(9.0)); let group = reused.shapes.get(2).expect("group"); assert!(matches!(&group.kind, ShapeKind::Group { .. })); let ShapeKind::Group { children, child } = &group.kind else { return }; diff --git a/docs/gaps.md b/docs/gaps.md index b37a5ed63..1729e56fb 100644 --- a/docs/gaps.md +++ b/docs/gaps.md @@ -284,7 +284,7 @@ and starts at that effect. The pane has an advanced timeline with draggable bars ### Smaller missing rows Zoom: live thumbnails, the zoom-in animation and the native `p166:sldZm` element (3–5 h; `insert.zoom` makes linked pictures with Return to Zoom), reuse slides pane with thumbnails -(1–2 h; `slide.reuseList` picks which slides of a file to insert, and reused content now fits the destination size), laser pointer from the presenter window (1–2 h), +(1–2 h; `slide.reuseList` picks which slides of a file to insert, #1103; reused content now fits the destination size), laser pointer from the presenter window (1–2 h), artistic effects (3–6 h for the other 15 of 22; 7 approximated and round-tripped), remove background (6–10 h; needs a model or a classical matte), insert screenshot (2–3 h), record audio/screen and record slide show (8–12 h), compare presentations beyond accepting and rejecting each revision, or all (#850; per-object accept and reject, markers on the slide: 2–4 h), password protection (4–6 h, ECMA-376 diff --git a/docs/parity-checklist.md b/docs/parity-checklist.md index ea3147927..4d25e2ab5 100644 --- a/docs/parity-checklist.md +++ b/docs/parity-checklist.md @@ -4,6 +4,8 @@ > **Last updated:** 2026-11-02 · Reused slides fit their geometry, tables and text to the destination size; reuse remains partial because the picker has no thumbnails. Scores unchanged. > +> **Previously (2026-11-02):** Tiled picture fills keep their size in scaled groups and upright tiles (#1693); Picture and texture fill row remains P. Scores unchanged. +> > **Previously (2026-11-01):** Locked-shape and no-outline regressions added for #1621; fill row re-assessed: remains D; No Fill hit-testing now follows resolved appearance. Scores unchanged. The summary between ` @@ -72,7 +74,7 @@ Open P0 items: Contextual tabs (Shape Format, Picture Format, Table Design/Layou | Files | Export video (MP4) / animated GIF (GIF: one frame per slide, no transitions; no video) | P2 | P | | Files | Print (slides, handouts, notes, outline) | P1 | M | | Files | Password protection | P2 | M | -| Files | Reuse slides from another file (content fits destination size; picker thumbnails remain) | P1 | P | +| Files | Reuse slides from another file | P1 | P | | Files | Drag and drop files onto the window | P1 | D | | Files | OpenDocument .odp open/save | P2 | M | | Slides | New slide by layout | P0 | D |