monperrus / ExpandAnimations

LibreOffice/OpenOffice.org extension to expand animations before exporting to PDF. Looking for maintainers.
https://github.com/monperrus/ExpandAnimations
GNU Lesser General Public License v3.0
230 stars 30 forks source link

Addresses #10, Copy page number area to a new text area in the same position #31

Closed hylkevds closed 4 years ago

hylkevds commented 4 years ago

I did a bit of hacking trying to fix #10. My first ooBasic :) It:

Since it does this before the animation is expanded, all expanded pages will get the same page number. For this to work properly, the SlideNumberShape must not have custom formatting other than the TextVerticalAdjust. Only formatting from the style is copied to the new shape. The style should also have a non-transparent background so it hides the original number.

monperrus commented 4 years ago

really cool! since we have no CI, anybody to try the change?

hylkevds commented 4 years ago

I've moved the code to a function, and made it only run when the slide has a page number. It now also turns off the automatic page number, so it's no longer an issue of the page number shape has a transparent background.

I also noticed that page numbers were wrong in the index of the pdf. Since only the expanded pages had their name changed, all other pages got the wrong generated name. But names are treated very strangely. It's impossible to manually name a slide Slide XX. Auto-names are in the form of pageXX. In the end I just rename all pages that seem to have an auto generate name to Slide: XX. With a : in the name, since otherwise the rename is refused.

monperrus commented 4 years ago

New Github actions CI says OK (big kudos to @Nikolasel), merging.

Thanks for the fix!

Nikolasel commented 4 years ago

Improvement for the CI: the test ODP file should also contain a page number field in the master slide.