Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chart not supported by Deck Builder #74

Closed
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions Clippit/PowerPoint/FluentPresentationBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -672,8 +672,6 @@ private void CopyRelatedPartsForContentParts(OpenXmlPart oldContentPart, OpenXml
foreach (var chartReference in newContent.DescendantsAndSelf(C.chart))
{
var relId = (string)chartReference.Attribute(R.id);
if (newContentPart.HasRelationship(relId))
continue;
sergey-tihon marked this conversation as resolved.
Show resolved Hide resolved

var oldPartIdPair2 = oldContentPart.Parts.FirstOrDefault(p => p.RelationshipId == relId);
if (oldPartIdPair2.OpenXmlPart is ChartPart oldPart)
Expand Down
2 changes: 0 additions & 2 deletions Clippit/PowerPoint/PresentationBuilderTools.cs
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,6 @@ internal static void AddRelationships(OpenXmlPart oldPart, OpenXmlPart newPart,
var newRid = Relationships.GetNewRelationshipId();
var oldHyperlink = oldPart.HyperlinkRelationships.FirstOrDefault(h => h.Id == relId);
if (oldHyperlink is null) {
//TODO Issue with reference to another part: var temp = oldPart.GetPartById(relId);
RemoveContent(newContent, e.Name, relId);
Copy link
Owner

Choose a reason for hiding this comment

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

This case is interesting... We copy hyperlinks relationships and cannot find hyperlinks inside the source document by it is relId.

The code assumes that the link is broken and removes the relationship from the target file. Can you create new slide manually from scratch that triggers this if statement during slide publishing?

continue;
}
newPart.AddHyperlinkRelationship(oldHyperlink.Uri, oldHyperlink.IsExternal, newRid);
Expand Down
Loading