feat: write pictures and attachments through the page model
Inserted pictures and files are paragraph content in the page model
(ParagraphContent::Image and ParagraphContent::Attachment, read with their
payloads, sizes and the attachment preview icon) and the writer lowers a new
one the way OneNote stores it: the payload goes into the section file-data
store list as a file-data store object, a file-data declaration names it by
identity and extension (a picture container, or an embedded-file object for
attachments), and a picture or attachment object with the displayed size,
name and the flags every native one carries becomes the paragraph content.
The DPAPI-protected per-user blob OneNote adds to pictures is omitted, and
an attachment preview icon is optional; OneNote accepts both. Stored
pictures and attachments stay fixed and can be removed with their paragraph.
The transaction writer gains payload embedding: write_revisions_with_payloads
validates file declarations, builds the file-data store objects and appends
their nodes to the existing file-data store list or creates it. The squash
pass carries file objects through with their jcid and re-embeds payloads the
source lacks. The canvas treats picture and attachment paragraphs as
read-only content.
corpus/picture-edit and corpus/attachment-edit (without and with a preview
icon) are the native gates, cold-read by OneNote 2010 with the exact payload
bytes; tools/test_picture_edit.py and tools/test_attachment_edit.py check
them without a VM.
Assisted-by: claude-fable-5.1
cb4842d4e6clover caruso committed on 9/13/2026, 12:00:32 AMparent59c8648