From 0f2c32d1a8307e6fefeb958508f94b2672c4f9cd Mon Sep 17 00:00:00 2001 From: FredApps <153173854+FredApps@users.noreply.github.com> Date: Wed, 18 Nov 2026 18:34:15 +0700 Subject: [PATCH] XLSX: say the chart import budget is the workbook's, not one chart's The point budget is shared by every chart in the workbook (`chart_budget` in the read context), so the warning and the doc comment no longer call it per-chart. Signed-off-by: FredApps <153173854+FredApps@users.noreply.github.com> --- crates/xlsx/src/chart.rs | 2 +- crates/xlsx/src/drawing.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/xlsx/src/chart.rs b/crates/xlsx/src/chart.rs index 20cfd63b1..8f06aed19 100644 --- a/crates/xlsx/src/chart.rs +++ b/crates/xlsx/src/chart.rs @@ -135,7 +135,7 @@ const MAX_CACHED_POINTS: usize = gridcraft_core::MAX_ROWS as usize; /// points are `None`. Points without a valid `idx` (schema-invalid, but some writers omit it) go /// in document order. A missing, unreadable or too small `ptCount` gives way to the points present. /// -/// The per-chart budget is checked before allocation. If the requested count would exceed the +/// The workbook-wide budget is checked before allocation. If the requested count would exceed the /// remaining budget, all present points are retained when they fit; only trailing gaps are /// clamped. If present points extend past the remaining budget, points beyond that boundary are /// dropped as well, and the caller is warned. diff --git a/crates/xlsx/src/drawing.rs b/crates/xlsx/src/drawing.rs index e2e445417..579120ce4 100644 --- a/crates/xlsx/src/drawing.rs +++ b/crates/xlsx/src/drawing.rs @@ -192,7 +192,7 @@ pub fn read_drawing(cx: &mut Ctx<'_>, part: &str, sheet: &mut Sheet) -> Result<( ch.id = cx.next_object_id(); ch.anchor = anchor; if !was_exceeded && cx.chart_budget.exceeded { - cx.warn("cached chart points were dropped after the per-chart import budget was exceeded"); + cx.warn("cached chart points were dropped after the workbook's chart import budget was exceeded"); } if !caches.is_empty() { cx.pivot_charts.push((ch.id, caches));