Skip to content

Export editable animation-free ODP and harden PDF output - #62

Merged
monperrus merged 5 commits into
monperrus:masterfrom
jeffwitz:master
Jun 27, 2026
Merged

Export editable animation-free ODP and harden PDF output#62
monperrus merged 5 commits into
monperrus:masterfrom
jeffwitz:master

Conversation

@jeffwitz

@jeffwitz jeffwitz commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR makes the expanded presentation a first-class output instead of an internal temporary file.

The macro now writes two files next to the source deck:

  • presentation-expanded.odp: editable, with animation timelines removed
  • presentation.pdf: exported from the expanded deck

The source presentation is left untouched.

Main changes

  • Save an editable *-expanded.odp in addition to the PDF.
  • Remove all animation timelines from the expanded ODP so it can be edited or re-exported normally.
  • Drop hidden slides from the expanded ODP, matching the PDF page order.
  • Freeze slide-number and page-count fields before duplicating slides.
  • Rewrite internal slide links so they keep working in both the generated PDF and a later manual PDF export from the expanded ODP.
  • Preserve paragraph layout for paragraph-by-paragraph reveal animations by keeping blank lines instead of deleting future paragraphs.
  • Embed standard fonts in generated PDFs.
  • Warn when unsupported animation effects are present instead of silently implying they were expanded.
  • Add a dialog-free CommandLine macro for headless use.
  • Build and validate the OXT in CI, upload it as an artifact, and keep the checked-in OXT reproducible.

Tests and fixtures

The test target now installs the extension into an isolated LibreOffice profile and exercises real ODP files:

  • historical test-ExpandAnimations.odp output still matches the reference PDF text
  • BadVerticalAlign.odp covers vertical alignment for paragraph animations
  • links.odp covers internal links, hidden slides, and manual re-export from the expanded ODP
  • UnsupportedEmphasis.odp covers mixed unsupported effects such as font color and transparency

CI also checks that:

  • the OXT archive is structurally valid
  • expanded ODP files contain no animation nodes
  • generated PDFs have embedded fonts
  • internal links are PDF destinations, not external URI links

Related issues

Fixes #15
Fixes #26
Fixes #50
Fixes #55
Fixes #59
Fixes #61

Addresses #16 by yielding during slide expansion, which reduces UI lockups on large decks.
Addresses #17 and #37 with CI packaging and stricter OXT validation.
Addresses #24 by printing LibreOffice and unopkg versions in CI.
Addresses #39 by enabling standard font embedding and checking generated PDFs with pdffonts.
Addresses #52 by saving the expanded ODP through storeToUrl(..., Overwrite=True) instead of doc.store().
Documents #57 as a PDF format limitation.
Adds regression coverage and warnings for #28 and #60, but does not implement full color/transparency animation expansion yet.

Validation

Run locally with LibreOffice 24.2.7.2 on Linux:

make clean
make validate
make test

@jeffwitz
jeffwitz marked this pull request as ready for review June 16, 2026 21:21

@jeffwitz jeffwitz left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will continue to solve the opened issues using Codex

@jeffwitz
jeffwitz marked this pull request as draft June 16, 2026 21:41
@jeffwitz jeffwitz changed the title Expand animations to editable animation-free ODP Export editable animation-free ODP and harden PDF output Jun 18, 2026
@jeffwitz
jeffwitz marked this pull request as ready for review June 18, 2026 13:49
@jeffwitz

Copy link
Copy Markdown
Contributor Author

Hi @monperrus,

This PR is ready for review.

I cleaned up the history into 3 focused commits and updated the PR description with the scope,
related issues, and validation steps.

GitHub is currently waiting for maintainer approval to run the workflow because the PR comes from a
fork.

Thanks!

@monperrus
monperrus merged commit c8fc374 into monperrus:master Jun 27, 2026
2 checks passed
@monperrus

Copy link
Copy Markdown
Owner

Did a few adjustments. Thanks a lot for your contribution @jeffwitz

@jeffwitz

jeffwitz commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

You're welcome,
It's been years that I want to improve this extension, thanks to AI I finally did it !
Thanks for working on it for so many years !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants