Repository navigation
Conversation
… bit 5) (storytold#914) * Issue storytold#568: honour the document's copy permission ISO 32000-2 §7.6.4.1 has readers restrict access to an encrypted file according to its permissions, and Table 22 bit 5 covers "Copy or otherwise extract text and graphics". PdfCraft reported the bit (Document Properties shows "Content copying: Not allowed") but ⌘C copied selected text anyway. - Engine: Document::allows_copying / check_copying, and Needs::Copying for Take a snapshot, Export to image/text/Word/HTML/RTF and Export all images. Save Image As refuses too. - UI: ⌘C moves from canvas::shortcuts to the app, which knows the document. Refused copies, snapshots and exports say why. The snapshot tool and the exports check again when they act, since the tool stays selected across tabs. - Automation: text_extract (and the MCP text resources), text_paragraphs, doc_export_text/images/all_images, doc_export_office and image_save refuse. Find, read aloud and the accessibility tools keep working: the spec exempts assistive technology, and searching isn't copying. Page extraction stays with the assemble bit, as before. Owners and unencrypted files are unaffected. * Refresh catalog hashes --------- Co-authored-by: Brandon Thomas <echelon@gmail.com>
Adds deckcraft_pptx::odp_write: slides with their size, background and visibility; autoshapes (ODF shape types, ooxml-* for the rest, custom geometry), text boxes and placeholders with resolved run and paragraph formatting, bullets and numbering; connectors; groups; pictures; and speaker notes. Save As, Export and file.export accept .odp. Co-authored-by: Cursor <cursoragent@cursor.com>
FredApps
left a comment
There was a problem hiding this comment.
ReviewerA — source-read COMMENT (not an approval)
I read the head of the diff: saving OpenDocument .odp presentations, a first slice. The CLI convert test moves out.odp out of the list of unsupported targets and checks that converting a file to .odp succeeds and that the result starts with PK\x03\x04 (a ZIP package). The check proves only that a ZIP was written, not that it is a valid ODP; LibreOffice opening the file is the proof, and the PR should say that the contributor opened the result there. It is the writing counterpart of the import PRs (deckcraft#524, #527) by the same author. ODF requires the mimetype entry first and stored (uncompressed), which a test should check. I did not read the writer. I have not run it, and no exact-head CI result exists for this head. Nothing was run.
I ran nothing and have no exact-head CI result for this PR, so this is not an approval. Where a diff was long I read its code hunks rather than every generated or documentation line.
Status: waiting_author.
Summary
deckcraft_pptx::odp_write::export_odp: a valid ODF 1.3 package (mimetypefirst and stored, manifest, content, styles, meta,Pictures/)draw:custom-shape(ODF type names,ooxml-<preset>for the rest, as LibreOffice reads them), custom geometry as an enhanced path, rotation kept around the centre, fill and line colours/widths; connectors asdraw:line; groups asdraw:g; pictures asdraw:frame/draw:image; titles and alt textpresentation:notesfile.exportand Save As accept.odp/odp; Save As types and the Export dialog list it; the MCP export enum includes itodp_write.rs; docs rows may need a trivial merge with Pptx: import OpenDocument .odp presentations #524Test plan
cargo xtask ci