Fix phantom slideMaster overrides and notesMaster placeholders triggering PowerPoint repair (#1443, #1444)#1458
Open
rupivbluegreen wants to merge 1 commit into
Conversation
…(Issues gitbrent#1443, gitbrent#1444) * gitbrent#1444 - emit only a single <Override> for slideMaster1.xml makeXmlContTypes() previously generated a slideMaster Override per slide ('slideMaster1.xml', 'slideMaster2.xml', ...) but only one slideMaster1.xml is ever written to the archive. The phantom references made every multi-slide deck trigger the PowerPoint repair dialog. Moved the Override line outside the per-slide loop. * gitbrent#1443 - remove placeholder shapes from notesMaster PowerPoint stripped the 6 placeholder shapes from the notesMaster via the repair dialog on every open. The minimal structure (bg, empty spTree, clrMap, notesStyle) is what PowerPoint kept after repair; emitting it directly avoids the dialog. Per-slide notesSlide files continue to declare their own placeholders, so notes rendering is unaffected. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change Summary
Follow-up to #1457. Fixes two more OOXML schema/structure issues in
src/gen-xml.tsthat cause PowerPoint to show the "found a problem with content" repair dialog on every generated deck.Change Type
Related Issues
[Content_Types].xmlreferences phantomslideMaster2/3/...xmlnotesMasterplaceholder shapes are stripped by PowerPoint repairMotivation and Context
Every multi-slide deck triggers the PowerPoint repair dialog because:
[Content_Types].xmldeclaresslideMaster1.xml,slideMaster2.xml, ...,slideMasterN.xml— but onlyslideMaster1.xmlis ever written to the archive. The phantom references fail content-type validation. ([BUG] Content_Types.xml references phantom slideMaster entries for multi-slide presentations #1444)notesMasterships with 6 placeholder shapes that PowerPoint considers invalid and removes during the repair pass. The repaired notesMaster keeps only<p:bg>, an empty<p:spTree>,<p:clrMap>, and<p:notesStyle>. ([BUG] notesMaster placeholder shapes are removed by PowerPoint repair #1443)Change Description
#1444 —
makeXmlContTypes()(gen-xml.ts:1406)Move the
slideMaster1.xmlOverride out of the per-slide loop so it's emitted exactly once:#1443 —
makeXmlNotesMaster()(gen-xml.ts:1591)Replace the 6 hand-written placeholder shapes with the minimal structure PowerPoint produces after the repair pass — only
<p:bg>, an empty<p:spTree>,<p:clrMap>, and<p:notesStyle>remain.Compatibility note: per-slide notesSlide files (
makeXmlNotesSlide) continue to declare their own placeholder shapes (sldImg,body,sldNum), so any deck that contains speaker notes will still render them. The notesMaster's previous placeholder shapes were design-time scaffolding for the notes view; functionally, removing them produces the same file PowerPoint creates after repair.Verification
Built locally with
npm run buildand ran a script that generates a 5-slide deck and inspects the produced XML:On
master(without the fix) the same script reports 5 phantom slideMaster Overrides and 6 placeholder shapes — matching the issue reports exactly.npx eslint src/gen-xml.tspasses clean.Checklist
src/*.tsmodified — nodist/src/bldchanges