Skip to content

pptx writer: Handle reference doc without slides#11310

Merged
jgm merged 1 commit intojgm:mainfrom
TuongNM:pptx-writer-reference-with-no-slides
Nov 30, 2025
Merged

pptx writer: Handle reference doc without slides#11310
jgm merged 1 commit intojgm:mainfrom
TuongNM:pptx-writer-reference-with-no-slides

Conversation

@TuongNM
Copy link
Contributor

@TuongNM TuongNM commented Nov 30, 2025

An empty sldIdLst is now added if the reference doc is missing one so that modifySldIdLst can replace it. To ensure PowerPoint doesn't say that the file will need fixing, the sldIdLst has to be placed after the sldMasterIdLst. I also added a test to ensure that if there are notes, they will be placed between the sldMasterIdLst and sldIdLst. Otherwise PowerPoint wouldn't show the slide of a note when viewing Notes Pages.

Since I'm reusing existing logic, I combined some of it into shared functions to avoid code duplication.

Fixes: #7536

Add an empty sldIdLst at the correct position if one is missing in the
reference doc so that modifySldIdLst can replace it.

Also apply hlint suggestion to use elem.
@jgm jgm merged commit 6592dfb into jgm:main Nov 30, 2025
11 of 14 checks passed
@jgm
Copy link
Owner

jgm commented Nov 30, 2025

Thanks!

@TuongNM TuongNM deleted the pptx-writer-reference-with-no-slides branch November 30, 2025 12:24
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.

pptx: Reference doc with no slides causes no slides in output

2 participants