From f9bd1e7eca87be44edf9840f8c4ab460fe2ec168 Mon Sep 17 00:00:00 2001 From: vangel76 Date: Mon, 26 Oct 2026 20:52:27 +0100 Subject: [PATCH] Fix WordArt for ActiveSheet API change after merge Co-Authored-By: Claude Sonnet 5.5 --- crates/engine/src/cmd/wordart.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/engine/src/cmd/wordart.rs b/crates/engine/src/cmd/wordart.rs index f300e16a9..ded5bda6d 100644 --- a/crates/engine/src/cmd/wordart.rs +++ b/crates/engine/src/cmd/wordart.rs @@ -197,7 +197,7 @@ fn insert_word_art(s: &mut Session, p: &Json) -> Result { let height = f64_param(p, "height").unwrap_or(lines * pt * 1.35 * 96.0 / 72.0 + 12.0).clamp(8.0, MAX_SIDE); shape.anchor.width = width as f32; shape.anchor.height = height as f32; - let sheet = d.wb.active_sheet; + let sheet = d.wb.active_sheet(); edit(s, |cx| { cx.sheet_mut(sheet)?.shapes.push(shape); Ok(json!({"shape": id})) @@ -209,7 +209,7 @@ fn set_word_art(s: &mut Session, p: &Json) -> Result { let style = style_param("wordArt.set", p)?; let text = text_param("wordArt.set", p)?; let d = s.doc()?; - let sheet = d.wb.active_sheet; + let sheet = d.wb.active_sheet(); let sh = d.wb.active().ok_or_else(|| bad("wordArt.set", "no such WordArt"))?; let current = sh.shapes.iter().find(|x| x.id == id).ok_or_else(|| bad("wordArt.set", "no such WordArt"))?; if current.kind != ShapeKind::WordArt {