Files
craft-libs/crates/docx/src/read/chart
vangel76andClaude Sonnet 5.5 e76bf4bad4 DOCX: an Office 2016 chart with a text-only fallback keeps its size as a placeholder
read_chartex_alternate built the chart object only from a picture fallback. With a fallback
that holds only text (for example "Chart not available."), it returned None and the reader
used the fallback words, so the chart's 432 x 252 pt frame was never reserved and the pages
collapsed.

Now such a chart becomes a Chart graphic of the choice's wp:extent, drawn as the same kind of
placeholder unsupported classic charts get (frame, title, chart type), with the choice and
fallback kept so saving writes them back unchanged. A fallback that holds runs or paragraphs
is still read as before, because the writer puts the fallback inside the object's own run.

The frame reading at the top of read_drawing moves into drawing_frame so both paths share it.

Part of storytold/wordcraft#6820

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-16 02:04:08 +01:00
..
…