From 8dfa6f19941aa10d7cbcfcfbba8c5c5620f1606b Mon Sep 17 00:00:00 2001 From: Harrison Booth <73434116+Harrison-Booth@users.noreply.github.com> Date: Tue, 27 Oct 2026 21:04:00 -0500 Subject: [PATCH] pptx: Auto-reverse is read only when every behaviour node has autoRev --- crates/pptx/src/read/timing.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/pptx/src/read/timing.rs b/crates/pptx/src/read/timing.rs index f84869f5..f549b8d0 100644 --- a/crates/pptx/src/read/timing.rs +++ b/crates/pptx/src/read/timing.rs @@ -94,11 +94,11 @@ fn max_dur(e: &El, depth: usize) -> Option { best } -/// Does any behaviour time node (`p:cBhvr/p:cTn`) under the effect node `c` carry `autoRev`? +/// Does every behaviour time node (`p:cBhvr/p:cTn`) under the effect node `c` carry `autoRev`? fn behaviour_auto_reverses(c: &El) -> bool { let mut behaviours = vec![]; c.find_all("cBhvr", &mut behaviours); - behaviours.iter().any(|b| b.child("cTn").and_then(|t| t.bool("autoRev")).unwrap_or(false)) + !behaviours.is_empty() && behaviours.iter().all(|b| b.child("cTn").and_then(|t| t.bool("autoRev")).unwrap_or(false)) } /// Flatten the timing tree into the Animation Pane list.