A style WordCraft writes that the file didn't have, based on a style the
import read under another name (`Base_20_Style`, WordCraft's `BaseStyle`),
named WordCraft's name as its parent. That resolved to WordCraft's own copy
of the style, without what WordCraft doesn't model of the file's. Its parent
and next style now take the file's name for every style read under another
name (`kept::file_names`), not only where an unread namesake collides.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A style WordCraft writes that the file didn't have (one made after reading)
is added as written, so one based on a read style whose WordCraft name is an
unread style of the file's (`MyCustom` beside `My_20_Custom`) derived from
that namesake. Its parent and next style now take the file's name, as text
written from the model does. `kept::read_names` gives the names unescaped;
the writer escapes them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A file style the import read (My_20_Custom) whose WordCraft name (MyCustom) is
another of the file's styles the import didn't read keeps that namesake's own
definition. A paragraph or text span written from the model now names the
file's style it was read with, directly or as its automatic style's parent,
instead of resolving to the namesake.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An edited style the file names as WordCraft does (`Eigen`) was skipped by
the rewrite, so its parent kept WordCraft's name (`BaseStyle`) instead of
the file's (`Base_20_Style`). It is now rewritten like any other.
A style the import didn't read whose name is the one WordCraft writes a
read style under (`MyCustom` beside `My_20_Custom`) took that style's edit
or deletion. It now keeps its own definition.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Any style or list change threw away every definition in the file's
office:styles and wrote them all from the model, which does not hold
everything: gradients, fill pictures, styles the model doesn't have and
the default style's settings were lost.
The import now records, per office:styles child, a hash of what the
writer would write for it (KeptXml::style_prints, replacing the single
styles_fp fingerprint) and which of the file's style names it read into
which style id (KeptXml::style_ids). A save rewrites only the
definitions whose hash changed, under the file's own names, escaped,
with parent and next style named as the file named them; a deleted
style stays deleted; everything else is written as read.
Ported from storytold/wordcraft#5702 (the ODT reader and writer now
live here).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* craft-dxf: add VectorCraft's ASCII drawing writer
Move the incremental file writer from vectorcraft-cad (crates/cad/src/writer.rs)
into craft_dxf::drawing. It writes the HEADER/TABLES/BLOCKS/OBJECTS skeleton
around a pre-built ENTITIES section, which is the format API VectorCraft's
scene mapper already uses. The existing model::write tag serializer is
unchanged.
Golden files lock the bytes for empty and one-LINE drawings in R12, 2000 and
2018. Part of #791 / #778.
* test(dxf): preserve exact golden bytes on Windows checkout
* fix(dxf): preserve BYBLOCK and use valid image dictionary keys
* test(dxf): clone images before write in dictionary-key test
Drawing::write takes self, so the assertions have to use a clone of
the image list. The rest of the test is unchanged.
---------
Co-authored-by: Dylan M. Taylor <dylan@dylanmtaylor.com>
Extract the remaining metadata delegation from #1198 after #1331 landed the raster facade changes. Preserve current image-codecs API, pixel transforms, docs and regression tests; omit unrelated resolution reexports and TIFF cleanup.
Original-change: 1d52e89405