para_html takes whether to write spacing and indents: a list item's further
paragraph does not, like the item itself.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merges main at 3b8e426a26.
- crates/ui: main's e-sign dialog (crates/ui/src/esign) moves to craft-cloud-ui beside the
share dialog, behind craft-cloud-ui's esign feature; craft-ui forwards `esign` and
re-exports the module.
- crates/proof: main's can_suggest_cased goes to affix/check.rs and its tests to
affix/tests.rs (next split affix.rs); French wiring in lib.rs.
- crates/svg: main's validated resolver and raster validation stay under tree-render, which
now also enables gif and image-webp; the shared image-codec helpers are gated on tree.
- craft-ai-agents: main's rev (craft-ai-integrations main), one entry.
- crates/craft: facade dependencies, features and re-exports for main's new crates.
* craft-docx: a DOCX border without w:sz is an eighth of a point
* craft-docx: a table border without w:sz is width 0, and ODT and RTF keep it
A table, cell or table-style border without w:sz gives the same output in
Word as w:sz="0" and takes no room; read as half a point, rows below a
pandoc table's header rule moved down half a point. PropCtx::table_borders
now reads it as 0, as PropCtx::borders does since #1488.
ODT and RTF have no border that is drawn and takes no room, so a drawn
width-0 cell side is written at Border::THINNEST instead of being dropped.
Where two ODT cells share an edge, a line with a width wins over a width-0
one, whichever cell states it.
Table half of storytold/wordcraft#5764.
---------
Co-authored-by: Nghiathan13 <201675788+Nghiathan13@users.noreply.github.com>
take_out searched the whole rest of the document for the next picture and the next inline
object on every item, so a document with many of one kind and none (or few) of the other cost
items × size. It now keeps where the next of each is and searches for a kind again only once
it has been passed. The output is the same.
storytold main 83cb1133dd (291 commits) into the integration head bab1a99b85; 47 conflicted files.
- Domain test files (metafile, prepress, pdf plates, settings store, heif, media-testkit, atomic): tests next cut stay cut; tests new on main are kept, as trials where the crate's test target runs trials.
- atomic: main's group-bits test and Faulty::set_group go to src/tests.rs. audio: main's GSM and SBC oracles join tests/main.rs. cms constructors, pdf knockout_backdrop and testing_pdf join their crates' one test binary; timeline's preflight tests become src/preflight_tests.rs trials.
- update: main's changes to detect, install (linux, macos) and the tests land in next's split modules. The app's own offer is inspected on a thread of its own, picked up by tick's polling; settle_for_tests settles offers too. Later on a ready update drops the close it asked for. updater_pin_tests.rs stays deleted; its new pin test is in tests/it/update.rs.
- craft-color: main added a different crate at crates/color (the colour tags of compositor and display frames); it is next's craft-color module `tags`, re-exported at the root.
- Old crates/ui (combo, docking, testing, README) and keymap's ui/view.rs stay deleted; main's new crates/ui/src/testing files are dropped with them.
- New crates in the craft facade: ai, control, dds, frame, ipc, media-source, palette, press-print, score, ssip. testkit and xtask are listed outside it.
- Cargo.lock: the union of both locks, resolved by cargo metadata. Workflow: main's nextest Windows leg, with next's --keep-going clippy.
A file style that `rewritten_defs` writes back as read (an unread namesake,
`MyCustom` beside an edited `My_20_Custom`) was left out of the package
files to keep, so a picture only it named was dropped while its href
stayed in styles.xml. The files kept now follow the markup the rewrite
writes for each key.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
main's page background change (#1809) asked `KeptXml::styles_as_read`,
which this branch replaces with per-definition fingerprints, to tell
whether the file's style definitions are written as read. `with_kept_files`
now asks per definition instead: one the document changed or that is
written from the model doesn't keep its package files, as a drawing
definition WordCraft writes its own of doesn't. `common_changes` gives both
it and `styles_as_read` the same answer.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 text:h inside a text:list-item is read as one of the item's further
paragraphs, but continues_list accepted only plain paragraphs, so the
HTML, Markdown and ODT writers ended the list at the heading and the
numbering restarted after it.
continues_list now also accepts headings. HTML writes the heading tag
inside the li, ODT writes a text:h inside the text:list-item, and
Markdown writes the ATX heading indented under the item. Quotes, code
and other kinds still end the list, as the writers cannot put them in
an item.
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>
- flow: each piece of a further paragraph split at a page break keeps its item.
- flow: body text resets the per-level item text positions, so a list starting with a
header after an earlier, further-indented list keeps the header in its list.
- flow: a further paragraph in a table-style-formatted cell keeps its list_item marker.
- html: a further paragraph is written through para_html, keeping alignment and page break.
- markdown: a quoted list item's further paragraph joins the item with a line break, so the
quoted list stays one list and keeps its numbers.
- odf: a further paragraph opening or closing a kept section ends the list run, as an item does.
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>
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.
unset_z_index only looked at the floating objects' orders, so a group
member without a stored order could be written below a member that has
one. It now also walks the groups' members.
- Preserves page background images and bitmap fills (`draw:fill="bitmap"`) alongside legacy `<style:background-image>` fallbacks on ODT export, preventing orphaned duplicate backgrounds and resolving naming collisions with header pictures.
- Reuses kept picture files or fill images with identical bytes on export instead of duplicating background files and definitions on every save.
- Allocates distinct fill names for replaced page pictures and maps colliding names in linear time.
- Falls back to legacy `<style:background-image>` when modern bitmap fill is missing or contains non-image bytes.
- Adds comprehensive round-trip tests in `crates/odf/src/text/tests_more/page_setup.rs`.
961 upstream commits since 7bb6c900. Resolutions:
- Test-only conflicts: upstream tests from before the base that our side
cut stay cut; tests new upstream are kept (audio aac/config, layout,
encode_format; cms lutfile; media mux; print windows_native, ticket;
update self_update; xml hostile).
- Code our side moved, with upstream's change carried to the new place:
craft-media mux roll sample groups (mux/boxes.rs) and writer-start
offsets with overflow checks (mux/progressive.rs); craft-print's
shrink-to-fit scale guard (sheets/plan.rs); craft-update's nextest
archive detection (self_update/detect.rs); craft-vectorcraft-format's
Tail::write_to_with (container.rs); craft-i18n's pedantic fixes
(bidi.rs, negotiation.rs).
- craft-ui: the old crate's modules stay removed; gpu_test_lock guarded
their per-test wgpu renderers, which the snapshot kit does not have.
- New upstream tests in crates that build their integration tests into
the library's test executable are modules of tests/main.rs (audio
flac_decode and qoa_oracle, cms, docpath, pcraft-format,
vectorcraft-format).
- The 22 new crates are optional members of the craft facade.
LibreOffice writes an unnumbered list entry as an item's second paragraph.
The ODT reader joined it to the first with a line break, so a save could
bring the file back with the wrong paragraphs, and a list header got a
number. Such paragraphs are now read as paragraphs of their own, with no
number, at the item's text indent, and marked with the new
`ParaProps::list_item` (the flow model's `Para::item`).
- HTML and Markdown export keep the paragraph in its item, so one numbered
list continues across it.
- Markdown `parse_list` joins a code block, quote or heading inside an item
back to the item (also after a sublist), so it gets no number.
- The writers keep a paragraph in its item only while it sits at the item's
text indent, so text outdented to the margin leaves the list.
- ODT written from the model puts a further paragraph inside its
`text:list-item`.
- A level first used after an unnumbered paragraph keeps the file's label.
Ported from storytold/wordcraft#5723 after the readers and writers moved here.
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>
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>