Skip to content

Commit

Permalink
Add commentsids part to maindocumentpart relationship (#928)
Browse files Browse the repository at this point in the history
* add commentsids part to maindocumentpart relationship
* add extension helper for object output
  • Loading branch information
tomjebo committed May 13, 2021
1 parent 6de7de8 commit 7a9efbf
Show file tree
Hide file tree
Showing 11 changed files with 617 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ namespace DocumentFormat.OpenXml.Packaging
[PartConstraint(typeof(VbaProjectPart), false, false)]
[PartConstraint(typeof(WordprocessingCommentsExPart), false, false)]
[PartConstraint(typeof(WordprocessingPeoplePart), false, false)]
[PartConstraint(typeof(WordprocessingCommentsIdsPart), false, false)]
[PartConstraint(typeof(AlternativeFormatImportPart), false, true)]
[PartConstraint(typeof(ChartPart), false, true)]
[PartConstraint(typeof(ExtendedChartPart), false, true)]
Expand Down Expand Up @@ -234,6 +235,11 @@ public DocumentFormat.OpenXml.Wordprocessing.GlossaryDocument GlossaryDocument
/// </summary>
public WordprocessingCommentsExPart? WordprocessingCommentsExPart => GetSubPartOfType<WordprocessingCommentsExPart>();

/// <summary>
/// Gets the WordprocessingCommentsIdsPart of the GlossaryDocumentPart
/// </summary>
public WordprocessingCommentsIdsPart? WordprocessingCommentsIdsPart => GetSubPartOfType<WordprocessingCommentsIdsPart>();

/// <summary>
/// Gets the WordprocessingCommentsPart of the GlossaryDocumentPart
/// </summary>
Expand Down Expand Up @@ -491,6 +497,8 @@ internal sealed override OpenXmlPart CreatePartCore(string relationshipType)
return new WordprocessingCommentsExPart();
case WordprocessingPeoplePart.RelationshipTypeConstant:
return new WordprocessingPeoplePart();
case WordprocessingCommentsIdsPart.RelationshipTypeConstant:
return new WordprocessingCommentsIdsPart();
case AlternativeFormatImportPart.RelationshipTypeConstant:
return new AlternativeFormatImportPart();
case ChartPart.RelationshipTypeConstant:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ namespace DocumentFormat.OpenXml.Packaging
[PartConstraint(typeof(VbaProjectPart), false, false)]
[PartConstraint(typeof(WordprocessingCommentsExPart), false, false)]
[PartConstraint(typeof(WordprocessingPeoplePart), false, false)]
[PartConstraint(typeof(WordprocessingCommentsIdsPart), false, false)]
[PartConstraint(typeof(AlternativeFormatImportPart), false, true)]
[PartConstraint(typeof(ChartPart), false, true)]
[PartConstraint(typeof(ExtendedChartPart), false, true)]
Expand Down Expand Up @@ -253,6 +254,11 @@ public DocumentFormat.OpenXml.Wordprocessing.Document Document
/// </summary>
public WordprocessingCommentsExPart? WordprocessingCommentsExPart => GetSubPartOfType<WordprocessingCommentsExPart>();

/// <summary>
/// Gets the WordprocessingCommentsIdsPart of the MainDocumentPart
/// </summary>
public WordprocessingCommentsIdsPart? WordprocessingCommentsIdsPart => GetSubPartOfType<WordprocessingCommentsIdsPart>();

/// <summary>
/// Gets the WordprocessingCommentsPart of the MainDocumentPart
/// </summary>
Expand Down Expand Up @@ -622,6 +628,8 @@ internal sealed override OpenXmlPart CreatePartCore(string relationshipType)
return new WordprocessingCommentsExPart();
case WordprocessingPeoplePart.RelationshipTypeConstant:
return new WordprocessingPeoplePart();
case WordprocessingCommentsIdsPart.RelationshipTypeConstant:
return new WordprocessingCommentsIdsPart();
case AlternativeFormatImportPart.RelationshipTypeConstant:
return new AlternativeFormatImportPart();
case ChartPart.RelationshipTypeConstant:
Expand Down

0 comments on commit 7a9efbf

Please sign in to comment.