From e86b2ef0efa181fb464c7fb08755872053845ca8 Mon Sep 17 00:00:00 2001 From: AnhNgoo <110978888+AnhNgoo@users.noreply.github.com> Date: Sat, 21 Nov 2026 14:56:43 +0700 Subject: [PATCH] fix(xlsx): remove duplicate closing braces in chart reader --- crates/xlsx/src/chart.rs | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/crates/xlsx/src/chart.rs b/crates/xlsx/src/chart.rs index 7af0dee7a..8611c0733 100644 --- a/crates/xlsx/src/chart.rs +++ b/crates/xlsx/src/chart.rs @@ -307,13 +307,11 @@ pub(crate) fn from_dml_chart(dc: DmlChart, root: Option<&El>) -> Chart { // The c14 Choice uses different IDs, so read the c:style Fallback. style: root .and_then(|r| { - r.child_val("style") - .and_then(parse_chart_style) - .or_else(|| { - r.kids("AlternateContent") - .filter_map(|wrapper| wrapper.child("Fallback")) - .find_map(|fallback| fallback.child_val("style").and_then(parse_chart_style)) - }) + r.child_val("style").and_then(parse_chart_style).or_else(|| { + r.kids("AlternateContent") + .filter_map(|wrapper| wrapper.child("Fallback")) + .find_map(|fallback| fallback.child_val("style").and_then(parse_chart_style)) + }) }) .or_else(|| (1..=48).contains(&dc.style).then_some(dc.style)) .unwrap_or(2), @@ -326,15 +324,6 @@ pub(crate) fn from_dml_chart(dc: DmlChart, root: Option<&El>) -> Chart { pivot: dc.pivot_source.as_deref().map(strip_book).filter(|n| !n.is_empty()).map(str::to_string), } } - hole_size, - first_slice_angle: dc.first_slice_angle, - x_title: dc.axis_titles.0, - y_title: dc.axis_titles.1, - source: None, - by_rows: false, - pivot: dc.pivot_source.as_deref().map(strip_book).filter(|n| !n.is_empty()).map(str::to_string), - } -} pub fn read_chart(root: &El) -> Option { let craft = to_craft_el(root);