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

Conversation

krystyna-hurieieva
Copy link
Contributor

No description provided.

@@ -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?

@@ -204,7 +206,6 @@ private void CopyPresentationParts(PresentationDocument sourceDocument)
{
var newPart = _newDocument.PresentationPart.AddNewPart<PresentationPropertiesPart>();
var xd1 = presentationPropertiesPart.GetXDocument();
xd1.Descendants(P.custShow).Remove();
Copy link
Owner

Choose a reason for hiding this comment

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

Why?

This element specifies a custom show which is an ordered list of a group of slides that are contained within the presentation. The custom show element allows for the specification of a presentation order that is different from the order in which the slides themselves are stored.

{
switch (oldPartIdPair.OpenXmlPart)
if (oldChart.Parts.FirstOrDefault(p => p.RelationshipId == relId) is { } oldPartIdPair)
Copy link
Owner

Choose a reason for hiding this comment

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

let's extract oldChart.Parts.FirstOrDefault(p => p.RelationshipId == relId) into variable and combine 2 if conditions into one

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.

None yet

2 participants