Skip to content

Fix PowerPoint relationship copying edge cases - #312

Merged
sergey-tihon merged 6 commits into
masterfrom
feature/bug-pic-rel-id
Jun 2, 2026
Merged

Fix PowerPoint relationship copying edge cases#312
sergey-tihon merged 6 commits into
masterfrom
feature/bug-pic-rel-id

Conversation

@sergey-tihon

Copy link
Copy Markdown
Owner

Summary

  • Copy a1611:picAttrSrcUrl online-image relationship IDs when publishing slides.
  • Drop zero-byte custom XML parts referenced by p:custData and prune dangling p:custDataLst markup to avoid PowerPoint repair prompts.
  • Normalize non-standard SVG image MIME type image/svg to image/svg+xml during image copy.
  • Bump CLI changelog to 0.1.2 for the next package publish.

Fixed Issues

  • Online image source URL relationships were not rewritten, leaving copied slides with stale r:id references.
  • Empty custom XML parts could be copied into generated decks and trigger PowerPoint repair dialogs.
  • Mixed/non-standard SVG content types could produce package inconsistencies that PowerPoint repairs.

Validation

  • dotnet csharpier format Clippit/PowerPoint/Fluent/FluentPresentationBuilder.Copy.cs Clippit.Tests/PowerPoint/PresentationBuilderSlidePublishingTests.Fluent.cs
  • dotnet test --project Clippit.Tests/ --treenode-filter "///PresentationBuilderSlidePublishingTests/CustData"
  • dotnet run --project Clippit.Cli/Clippit.Cli.csproj -- version --format json

Copilot AI review requested due to automatic review settings June 2, 2026 14:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR hardens the slide publishing/copy pipeline against several PowerPoint package/relationship edge cases that can lead to stale references or repair prompts when opening generated decks.

Changes:

  • Rewrites a1611:picAttrSrcUrl online-image relationship IDs during content part copying.
  • Skips copying zero-byte CustomXmlParts referenced by p:custData and prunes dangling p:custDataLst markup.
  • Normalizes non-standard SVG MIME type image/svg to image/svg+xml during image part copy, and bumps CLI changelog to 0.1.2.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
Clippit/PtOpenXmlUtil.cs Adds A1611.picAttrSrcUrl XName constant used for relationship rewrite detection.
Clippit/PowerPoint/Fluent/FluentPresentationBuilder.Copy.cs Implements the relationship rewrite + empty customXml pruning + SVG content-type normalization.
Clippit.Tests/PowerPoint/PresentationBuilderSlidePublishingTests.Fluent.cs Adds a regression test for skipping empty CustomXmlPart referenced by p:custData.
Clippit.Cli/CHANGELOG.md Adds 0.1.2 changelog entry for the upcoming CLI publish.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Clippit/PowerPoint/Fluent/FluentPresentationBuilder.Copy.cs
Comment thread Clippit/PowerPoint/Fluent/FluentPresentationBuilder.Copy.cs Outdated
Comment thread Clippit.Tests/PowerPoint/PresentationBuilderSlidePublishingTests.Fluent.cs Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Comment thread Clippit/PowerPoint/Fluent/FluentPresentationBuilder.Copy.cs Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

Comment thread Clippit/PowerPoint/Fluent/FluentPresentationBuilder.Copy.cs Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Comment thread Clippit/PowerPoint/Fluent/FluentPresentationBuilder.Copy.cs

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

@sergey-tihon
sergey-tihon merged commit d19f532 into master Jun 2, 2026
10 checks passed
@sergey-tihon
sergey-tihon deleted the feature/bug-pic-rel-id branch June 2, 2026 17:44
sergey-tihon added a commit that referenced this pull request Jun 3, 2026
* docs: add v3.4.5 changelog entry

Summarises all changes on master since the v3.4.4 tag:
CLI feature (#309), pptx relationship fix (#312), refactors (#307/#308),
test and dependency updates.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix: update notes

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
sergey-tihon added a commit that referenced this pull request Jun 29, 2026
* feat: support online images

* fix: avoid PowerPoint repair on generated decks

* fix: address PR review comments

* fix: preserve corrupt customXml handling

* fix: stream customXml copy after empty check

* refactor: simplify customXml pruning flow
sergey-tihon added a commit that referenced this pull request Jun 29, 2026
* docs: add v3.4.5 changelog entry

Summarises all changes on master since the v3.4.4 tag:
CLI feature (#309), pptx relationship fix (#312), refactors (#307/#308),
test and dependency updates.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix: update notes

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.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.

2 participants