Skip to content

PPTX: .potx and .ppsx declare a template and slide show main part (#210) - #212

Merged
h-a-n-a-s-h-i merged 1 commit into
storytold:mainfrom
justinjohn0306:issue-210-potx-ppsx-content-type
Oct 14, 2026
Merged

h-a-n-a-s-h-i merged 1 commit into
storytold:mainfrom
justinjohn0306:issue-210-potx-ppsx-content-type

Conversation

@justinjohn0306

Copy link
Copy Markdown
Contributor

Fixes #210.

Cause: format_for_path folded .pptx, .potx and .ppsx into "pptx", and the writer only had CT_PRES, so all three outputs were byte-identical.

Fix

  • format_for_path returns potx / ppsx for those extensions; save_bytes passes the format on.
  • New deckcraft_pptx::export_as(p, ext): potx → presentationml.template.main+xml, ppsx → presentationml.slideshow.main+xml, otherwise the presentation type. export(p) is unchanged for existing callers.

This covers File ▸ Save / Save As with a .potx / .ppsx name, file.export, and deckcraft-cli convert.

Verified

  • The issue's repro: convert to deck.pptx / deck.potx / deck.ppsx now gives presentation, template and slideshow main content types.
  • In PowerPoint (Microsoft 365, via COM): all three open with 8 slides; the .potx opened as a template becomes an untitled presentation ("Northern Lights", no path).
  • New templates_and_slide_shows_declare_their_own_main_content_type test (each one also reads back); cargo test -p deckcraft-pptx -p deckcraft-engine; cargo clippy --workspace --all-targets -D warnings; cargo fmt --check.

🤖 Generated with Claude Code

…orytold#210)

Saving with a .potx or .ppsx name wrote a byte-identical .pptx: the
main part was always presentationml.presentation.main+xml, because
format_for_path folded all three extensions into "pptx". It now keeps
potx/ppsx, and deckcraft_pptx::export_as picks the template or
slideshow content type.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@h-a-n-a-s-h-i
h-a-n-a-s-h-i merged commit 4dc6e06 into storytold:main Oct 14, 2026
@echelon

echelon commented Oct 14, 2026

Copy link
Copy Markdown
Member

Thank you for this contribution, @justinjohn0306! It has landed on main and will ship in the next DeckCraft release.

If you haven't already, please come join us on Discord: https://discord.gg/artcraft

sirmmo added a commit to sirmmo/deckcraft that referenced this pull request Oct 14, 2026
Brings in 669 upstream commits. Upstream's .potx/.ppsx content types
(storytold#212) now go through PptxKind (export_as takes a kind; .pptm/.potm/.ppsm
too); kept add-in parts (storytold#531) and the VBA project are both written.
Office.js reports 3D models as model3D; quick-xml 0.41's normalized_value.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
anishguduru pushed a commit to anishguduru/deckcraft that referenced this pull request Oct 16, 2026
…orytold#212)

* M3: unify toolbar and menu theme preferences

Co-authored-by: Codex <noreply@openai.com>

* M3: use the current egui style API in theme regression

Co-authored-by: Codex <noreply@openai.com>

---------

Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Saving as .potx or .ppsx writes a regular presentation (wrong main content type)

3 participants