diff --git a/Clippit/PowerPoint/FluentPresentationBuilder.cs b/Clippit/PowerPoint/FluentPresentationBuilder.cs index 37dde975..91b8779a 100644 --- a/Clippit/PowerPoint/FluentPresentationBuilder.cs +++ b/Clippit/PowerPoint/FluentPresentationBuilder.cs @@ -625,7 +625,8 @@ private void CopyRelatedPartsForContentParts(OpenXmlPart oldContentPart, OpenXml if (newContentPart.HasRelationship(relId)) continue; - if (oldContentPart.Parts.FirstOrDefault(p => p.RelationshipId == relId) is {} oldPartIdPair) + var oldPartIdPair = oldContentPart.Parts.FirstOrDefault(p => p.RelationshipId == relId); + if (oldPartIdPair != default) { var oldPart = oldPartIdPair.OpenXmlPart; OpenXmlPart newPart = null; @@ -751,7 +752,7 @@ private void CopyRelatedPartsForContentParts(OpenXmlPart oldContentPart, OpenXml continue; var oldPartIdPair9 = oldContentPart.Parts.FirstOrDefault(p => p.RelationshipId == relId); - if (oldPartIdPair9 is {}) + if (oldPartIdPair9 != default) { var newPart = _newDocument.PresentationPart.AddCustomXmlPart(CustomXmlPartType.CustomXml); using (var stream = oldPartIdPair9.OpenXmlPart.GetStream()) diff --git a/Clippit/PowerPoint/PresentationBuilderTools.cs b/Clippit/PowerPoint/PresentationBuilderTools.cs index 9c7e9dda..faf8f72c 100644 --- a/Clippit/PowerPoint/PresentationBuilderTools.cs +++ b/Clippit/PowerPoint/PresentationBuilderTools.cs @@ -106,7 +106,8 @@ internal static void CopyChartObjects(ChartPart oldChart, ChartPart newChart) { var relId = dataReference.Attribute(R.id).Value; - if (oldChart.Parts.FirstOrDefault(p => p.RelationshipId == relId) is {} oldPartIdPair) + var oldPartIdPair = oldChart.Parts.FirstOrDefault(p => p.RelationshipId == relId); + if (oldPartIdPair != default) { switch (oldPartIdPair.OpenXmlPart) { @@ -196,7 +197,8 @@ internal static void CopyExtendedChartObjects(ExtendedChartPart oldChart, Extend { var relId = dataReference.Attribute(R.id).Value; - if (oldChart.Parts.FirstOrDefault(p => p.RelationshipId == relId) is {} oldPartIdPair) + var oldPartIdPair = oldChart.Parts.FirstOrDefault(p => p.RelationshipId == relId); + if (oldPartIdPair != default) { switch (oldPartIdPair.OpenXmlPart) {