flow_table made a table's first row a header row whenever its look had
header_row set, and the look defaults to Word's (header row on). The look
is an option of the table's style (w:tblLook/@w:firstRow), so a table
with no style, or a style the document doesn't have, got a header row
Word never shows: RTF bolded it and marked it \trhdr (repeat on each
page), HTML made it th, and ODT repeated it. Only Repeat as header row
(RowProps::header) makes such a row a header now; styled tables are
unchanged.
Moves the format part of storytold/wordcraft#6162 into craft-wordmodel,
craft-docx, craft-flow and craft-odf, where WordCraft's DOCX and ODT I/O now
live (#778).
A DrawingML `prstGeom frame` (a letterhead's page border) was read as a
rectangle, so its fill covered the whole page behind the text. It is now
ShapeKind::Frame, its border width read from `adj1` (capped, as a rounded
rectangle's corner is) and written back as the same preset.
connector::frame_width gives the border in points. Formats with no frame
shape (ODT and the other flow formats) get the freeform it draws: its
outline and, wound the other way, its hole, so the hole stays empty under
either fill rule.
Moves the import part of storytold/wordcraft#4964 into craft-flow, where
WordCraft's RTF and ODT import now builds its tables (#778).
Import raised every column under 6 pt to 6 pt, so a form with many narrow
columns came out wider than its source. Columns over 1 pt now keep the
width the file gives; one of a point or less, none or not a number still
gives the table equal columns, so nothing below a point, negative or NaN
reaches layout.
craft-rtf merged grid columns under 6 pt that no row needed, because import
would widen them. With import keeping them, that merge only moved cell
edges, so it goes: grid columns merge only while there are over 63 or one
is a point or less.
Stacked on the craft-rtf column grid change.
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>
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>
* 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.