Commit Graph
5 Commits
Author SHA1 Message Date
Dylan M. Taylor d9e56e3f7c Merge pull request #1290 from vangel76/feat/docx-chart-axis-series
DOCX charts keep axis and series formatting
2026-11-15 18:30:37 -05:00
vangel76andClaude Sonnet 5.5 51a35cecb7 flow: keep the old paragraph direction in the tracked formatting-change snapshot
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-15 13:27:34 +01:00
vangel76andClaude Sonnet 5.5 b6a2df0c1d docx: chart axis and series formatting
Add the series formatting (fill, line, markers, smooth, labels, number
format) and the category/value axis formatting (title, bounds, number
format, gridlines, tick labels, axis line) to the chart model, and read
and write them in the DOCX chart part. GraphicItem::Text gets an angle
for the rotated vertical axis title. With none of the new fields set the
chart part is written as before.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 11:27:03 +01:00
vangel76andClaude Sonnet 5.5 a528fa7430 rtf: keep right-to-left paragraph direction
Read \rtlpar/\rtldir and \ltrpar/\ltrdir into the paragraph's bidi flag
and write \rtlpar for right-to-left paragraphs. The flow paragraph
carries the direction between the document and the RTF reader/writer.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 11:23:04 +01:00
Dylan M. Taylor baf6bd58f0 Add craft-flow: the flow model the text formats map to (#1025)
* Add craft-wordmodel: WordCraft's document model without its editing code

WordCraft's crates/doc (wordcraft-doc, at 07f97737) moved as it is, so the DOCX,
RTF, ODT and other text-format crates can read into and write from one model.
Module paths, type names and serde attributes are unchanged: an app that
re-exports the crate keeps its native file format.

Left in the app: range editing (edit.rs), IME text and equation editing. Not
model, and already in craft-libs: code pages (craft-rtf), the ZIP entry-count
check (craft-opc), the compound-file guard (craft-cfb). The paragraph walks
moved to walk.rs and the unit helpers of wordcraft-geom to geom.rs.

* craft-wordmodel: math_tree, the arguments of an equation node and a walk over its runs

The DOCX reader and writer walk an equation's runs. The walk and the child
accessors it uses were in WordCraft's equation editor (math_edit.rs), which
stays in the app; they are structure, not editing.

* craft-wordmodel: keep the document operations (edit.rs) with the model

The DOCX and RTF readers use them: alternative-format chunks are merged into
a document with adopt_blocks, and a reader formats ranges with format_range
and inserts objects. They operate on the document, not on a view, so they
belong beside it. The tests that drove them come back with them; the
paragraph walks stay in walk.rs and edit re-exports them.

base64 0.23, as WordCraft and craft-offcrypto use.

* Add craft-flow: the flow model the text formats map to, on craft-wordmodel

WordCraft's crates/formats/src/model (07f97737) moved as it is: Flow,
FBlock, Para, Inline, Fmt, tables and cells, pictures, to_doc and
from_doc, picture sniffing, colours, base64 and the Dropped report. Only
the paths changed (wordcraft_doc is craft_wordmodel); the report helpers
are public so the format crates can call them; the image re-encoding
helper stays with WordCraft's RTF writer.
2026-11-11 20:41:34 -05:00