mirror of
https://github.com/storytold/gridcraft.git
synced 2026-12-01 18:26:05 -06:00
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>
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user