diff --git a/data/schemas/schemas_openxmlformats_org_drawingml_2006_main.json b/data/schemas/schemas_openxmlformats_org_drawingml_2006_main.json index 297c3cc41..8361da4f2 100644 --- a/data/schemas/schemas_openxmlformats_org_drawingml_2006_main.json +++ b/data/schemas/schemas_openxmlformats_org_drawingml_2006_main.json @@ -11818,6 +11818,9 @@ { "Name": "adec:CT_Decorative/adec:decorative" }, + { + "Name": "ahyp:CT_HyperlinkColor/ahyp:hlinkClr" + }, { "Name": "a16:CT_CreationId/a16:creationId" }, @@ -11833,9 +11836,6 @@ { "Name": "a16:CT_Identifier/a16:colId" }, - { - "Name": "ahyp:CT_HyperlinkColor/ahyp:hlinkClr" - }, { "Name": "wp15:CT_WebVideoPr/wp15:webVideoPr" }, @@ -17381,84 +17381,6 @@ ] } }, - { - "Name": "a:CT_TableCell/a:tc", - "ClassName": "TableCell", - "Summary": "Table Cell.", - "CompositeType": "OneSequence", - "BaseClass": "OpenXmlCompositeElement", - "Attributes": [ - { - "QName": ":rowSpan", - "PropertyName": "RowSpan", - "Type": "Int32Value", - "PropertyComments": "Row Span" - }, - { - "QName": ":gridSpan", - "PropertyName": "GridSpan", - "Type": "Int32Value", - "PropertyComments": "Grid Span" - }, - { - "QName": ":hMerge", - "PropertyName": "HorizontalMerge", - "Type": "BooleanValue", - "PropertyComments": "Horizontal Merge" - }, - { - "QName": ":vMerge", - "PropertyName": "VerticalMerge", - "Type": "BooleanValue", - "PropertyComments": "Vertical Merge" - } - ], - "Children": [ - { - "Name": "a:CT_TextBody/a:txBody", - "PropertyName": "TextBody", - "PropertyComments": "Text Body" - }, - { - "Name": "a:CT_TableCellProperties/a:tcPr", - "PropertyName": "TableCellProperties", - "PropertyComments": "Table Cell Properties" - }, - { - "Name": "a:CT_OfficeArtExtensionList/a:extLst", - "PropertyName": "ExtensionList" - } - ], - "Particle": { - "Kind": "Sequence", - "Items": [ - { - "Name": "a:CT_TextBody/a:txBody", - "Occurs": [ - { - "Max": 1 - } - ] - }, - { - "Name": "a:CT_TableCellProperties/a:tcPr", - "Occurs": [ - { - "Max": 1 - } - ] - }, - { - "Name": "a:CT_OfficeArtExtensionList/a:extLst", - "Occurs": [ - { - "Max": 1 - } - ] - } - ] - } - }, { "Name": "a:CT_TableStyle/a:tableStyle", "ClassName": "TableStyle", @@ -18054,7 +17976,7 @@ "QName": ":w", "PropertyName": "Width", "Type": "Int64Value", - "PropertyComments": "Width", + "PropertyComments": "w", "Validators": [ { "Name": "RequiredValidator" @@ -18080,15 +18002,15 @@ ], "Children": [ { - "Name": "a:CT_OfficeArtExtensionList/a:extLst", - "PropertyName": "ExtensionList" + "Name": "a:CT_TableColExtensionList/a:extLst", + "PropertyName": "TableColExtensionList" } ], "Particle": { "Kind": "Sequence", "Items": [ { - "Name": "a:CT_OfficeArtExtensionList/a:extLst", + "Name": "a:CT_TableColExtensionList/a:extLst", "Occurs": [ { "Max": 1 @@ -18301,7 +18223,7 @@ "QName": ":h", "PropertyName": "Height", "Type": "Int64Value", - "PropertyComments": "Height", + "PropertyComments": "h", "Validators": [ { "Name": "RequiredValidator" @@ -18330,7 +18252,7 @@ "Name": "a:CT_TableCell/a:tc" }, { - "Name": "a:CT_OfficeArtExtensionList/a:extLst" + "Name": "a:CT_TableRowExtensionList/a:extLst" } ], "Particle": { @@ -18343,7 +18265,7 @@ ] }, { - "Name": "a:CT_OfficeArtExtensionList/a:extLst", + "Name": "a:CT_TableRowExtensionList/a:extLst", "Occurs": [ { "Max": 1 @@ -25037,6 +24959,186 @@ ] } }, + { + "Name": "a:CT_TableColExtension/a:ext", + "ClassName": "TableColExtension", + "Summary": "Defines the TableColExtension Class.", + "BaseClass": "OpenXmlCompositeElement", + "Children": [ + { + "Name": "a16:CT_Identifier/a16:colId", + "PropertyName": "ColIdIdentifier" + } + ], + "Particle": { + "Kind": "Choice", + "Items": [ + { + "Name": "a16:CT_Identifier/a16:colId", + "InitialVersion": "Office2016" + }, + { + "Kind": "Any", + "Occurs": [ + { + "Max": 1 + } + ] + } + ] + } + }, + { + "Name": "a:CT_TableRowExtension/a:ext", + "ClassName": "TableRowExtension", + "Summary": "Defines the TableRowExtension Class.", + "BaseClass": "OpenXmlCompositeElement", + "Children": [ + { + "Name": "a16:CT_Identifier/a16:rowId", + "PropertyName": "RowIdIdentifier" + } + ], + "Particle": { + "Kind": "Choice", + "Items": [ + { + "Name": "a16:CT_Identifier/a16:rowId", + "InitialVersion": "Office2016" + }, + { + "Kind": "Any", + "Occurs": [ + { + "Max": 1 + } + ] + } + ] + } + }, + { + "Name": "a:CT_TableColExtensionList/a:extLst", + "ClassName": "TableColExtensionList", + "Summary": "Defines the TableColExtensionList Class.", + "BaseClass": "OpenXmlCompositeElement", + "Children": [ + { + "Name": "a:CT_TableColExtension/a:ext" + } + ], + "Particle": { + "Kind": "Sequence", + "Items": [ + { + "Name": "a:CT_TableColExtension/a:ext", + "Occurs": [ + {} + ] + } + ] + } + }, + { + "Name": "a:CT_TableCell/a:tc", + "ClassName": "TableCell", + "Summary": "Defines the TableCell Class.", + "CompositeType": "OneSequence", + "BaseClass": "OpenXmlCompositeElement", + "Attributes": [ + { + "QName": ":rowSpan", + "PropertyName": "RowSpan", + "Type": "Int32Value", + "PropertyComments": "Row Span" + }, + { + "QName": ":gridSpan", + "PropertyName": "GridSpan", + "Type": "Int32Value", + "PropertyComments": "Grid Span" + }, + { + "QName": ":hMerge", + "PropertyName": "HorizontalMerge", + "Type": "BooleanValue", + "PropertyComments": "Horizontal Merge" + }, + { + "QName": ":vMerge", + "PropertyName": "VerticalMerge", + "Type": "BooleanValue", + "PropertyComments": "Vertical Merge" + } + ], + "Children": [ + { + "Name": "a:CT_TextBody/a:txBody", + "PropertyName": "TextBody", + "PropertyComments": "Text Body" + }, + { + "Name": "a:CT_TableCellProperties/a:tcPr", + "PropertyName": "TableCellProperties", + "PropertyComments": "Table Cell Properties" + }, + { + "Name": "a:CT_OfficeArtExtensionList/a:extLst", + "PropertyName": "ExtensionList" + } + ], + "Particle": { + "Kind": "Sequence", + "Items": [ + { + "Name": "a:CT_TextBody/a:txBody", + "Occurs": [ + { + "Max": 1 + } + ] + }, + { + "Name": "a:CT_TableCellProperties/a:tcPr", + "Occurs": [ + { + "Max": 1 + } + ] + }, + { + "Name": "a:CT_OfficeArtExtensionList/a:extLst", + "Occurs": [ + { + "Max": 1 + } + ] + } + ] + } + }, + { + "Name": "a:CT_TableRowExtensionList/a:extLst", + "ClassName": "TableRowExtensionList", + "Summary": "Defines the TableRowExtensionList Class.", + "BaseClass": "OpenXmlCompositeElement", + "Children": [ + { + "Name": "a:CT_TableRowExtension/a:ext" + } + ], + "Particle": { + "Kind": "Sequence", + "Items": [ + { + "Name": "a:CT_TableRowExtension/a:ext", + "Occurs": [ + {} + ] + } + ] + } + }, { "Name": "a:CT_HyperlinkExtension/a:ext", "ClassName": "HyperlinkExtension", diff --git a/data/typed/schemas_openxmlformats_org_drawingml_2006_main.json b/data/typed/schemas_openxmlformats_org_drawingml_2006_main.json index 1bb759de4..7b982a9b9 100644 --- a/data/typed/schemas_openxmlformats_org_drawingml_2006_main.json +++ b/data/typed/schemas_openxmlformats_org_drawingml_2006_main.json @@ -619,6 +619,14 @@ "Name": "a:CT_ShapePropertiesExtension/a:ext", "ClassName": "ShapePropertiesExtension" }, + { + "Name": "a:CT_TableColExtension/a:ext", + "ClassName": "TableColExtension" + }, + { + "Name": "a:CT_TableRowExtension/a:ext", + "ClassName": "TableRowExtension" + }, { "Name": "a:CT_BlipExtensionList/a:extLst", "ClassName": "BlipExtensionList" @@ -663,6 +671,14 @@ "Name": "a:CT_ShapePropertiesExtensionList/a:extLst", "ClassName": "ShapePropertiesExtensionList" }, + { + "Name": "a:CT_TableColExtensionList/a:extLst", + "ClassName": "TableColExtensionList" + }, + { + "Name": "a:CT_TableRowExtensionList/a:extLst", + "ClassName": "TableRowExtensionList" + }, { "Name": "a:CT_ColorSchemeAndMapping/a:extraClrScheme", "ClassName": "ExtraColorScheme" diff --git a/generated/DocumentFormat.OpenXml.Linq/DocumentFormat.OpenXml.Generator/DocumentFormat.OpenXml.Generator.OpenXmlGenerator/Linq.A.g.cs b/generated/DocumentFormat.OpenXml.Linq/DocumentFormat.OpenXml.Generator/DocumentFormat.OpenXml.Generator.OpenXmlGenerator/Linq.A.g.cs index ee852f5fd..e977947b3 100644 --- a/generated/DocumentFormat.OpenXml.Linq/DocumentFormat.OpenXml.Generator/DocumentFormat.OpenXml.Generator.OpenXmlGenerator/Linq.A.g.cs +++ b/generated/DocumentFormat.OpenXml.Linq/DocumentFormat.OpenXml.Generator/DocumentFormat.OpenXml.Generator.OpenXmlGenerator/Linq.A.g.cs @@ -1396,9 +1396,9 @@ public static partial class A /// As an XML element, it: /// /// has the following parent XML elements: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , . - /// has the following child XML elements: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , . + /// has the following child XML elements: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , . /// has the following XML attributes: . - /// corresponds to the following strongly-typed classes: BlipExtension, ConnectorLockingExtension, DataModelExtension, Extension, Extents, GvmlGroupShapeExtension, HyperlinkExtension, LinePropertiesExtension, NonVisualDrawingPropertiesExtension, NonVisualGroupDrawingShapePropsExtension, NonVisualPicturePropertiesExtension, OfficeStyleSheetExtension, PtExtension, ShapePropertiesExtension. + /// corresponds to the following strongly-typed classes: BlipExtension, ConnectorLockingExtension, DataModelExtension, Extension, Extents, GvmlGroupShapeExtension, HyperlinkExtension, LinePropertiesExtension, NonVisualDrawingPropertiesExtension, NonVisualGroupDrawingShapePropsExtension, NonVisualPicturePropertiesExtension, OfficeStyleSheetExtension, PtExtension, ShapePropertiesExtension, TableColExtension, TableRowExtension. /// /// public static readonly XName ext = a + "ext"; @@ -1411,7 +1411,7 @@ public static partial class A /// /// has the following parent XML elements: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , . /// has the following child XML elements: . - /// corresponds to the following strongly-typed classes: BlipExtensionList, ConnectorLockingExtensionList, ExtensionList, GvmlGroupShapeExtensionList, HyperlinkExtensionList, LinePropertiesExtensionList, NonVisualDrawingPropertiesExtensionList, NonVisualGroupDrawingShapePropsExtensionList, NonVisualPicturePropertiesExtensionList, OfficeStyleSheetExtensionList, ShapePropertiesExtensionList. + /// corresponds to the following strongly-typed classes: BlipExtensionList, ConnectorLockingExtensionList, ExtensionList, GvmlGroupShapeExtensionList, HyperlinkExtensionList, LinePropertiesExtensionList, NonVisualDrawingPropertiesExtensionList, NonVisualGroupDrawingShapePropsExtensionList, NonVisualPicturePropertiesExtensionList, OfficeStyleSheetExtensionList, ShapePropertiesExtensionList, TableColExtensionList, TableRowExtensionList. /// /// public static readonly XName extLst = a + "extLst"; diff --git a/generated/DocumentFormat.OpenXml.Linq/DocumentFormat.OpenXml.Generator/DocumentFormat.OpenXml.Generator.OpenXmlGenerator/Linq.A16.g.cs b/generated/DocumentFormat.OpenXml.Linq/DocumentFormat.OpenXml.Generator/DocumentFormat.OpenXml.Generator.OpenXmlGenerator/Linq.A16.g.cs index 34051cd10..6e3ae170f 100644 --- a/generated/DocumentFormat.OpenXml.Linq/DocumentFormat.OpenXml.Generator/DocumentFormat.OpenXml.Generator.OpenXmlGenerator/Linq.A16.g.cs +++ b/generated/DocumentFormat.OpenXml.Linq/DocumentFormat.OpenXml.Generator/DocumentFormat.OpenXml.Generator.OpenXmlGenerator/Linq.A16.g.cs @@ -21,7 +21,7 @@ public static partial class A16 /// /// As an XML element, it: /// - /// has the following parent XML elements: . + /// has the following parent XML elements: , . /// corresponds to the following strongly-typed classes: ColIdIdentifier. /// /// @@ -72,7 +72,7 @@ public static partial class A16 /// /// As an XML element, it: /// - /// has the following parent XML elements: . + /// has the following parent XML elements: , . /// corresponds to the following strongly-typed classes: RowIdIdentifier. /// /// diff --git a/generated/DocumentFormat.OpenXml/DocumentFormat.OpenXml.Generator/DocumentFormat.OpenXml.Generator.OpenXmlGenerator/schemas_openxmlformats_org_drawingml_2006_main.g.cs b/generated/DocumentFormat.OpenXml/DocumentFormat.OpenXml.Generator/DocumentFormat.OpenXml.Generator.OpenXmlGenerator/schemas_openxmlformats_org_drawingml_2006_main.g.cs index c1161b102..c811be072 100644 --- a/generated/DocumentFormat.OpenXml/DocumentFormat.OpenXml.Generator/DocumentFormat.OpenXml.Generator.OpenXmlGenerator/schemas_openxmlformats_org_drawingml_2006_main.g.cs +++ b/generated/DocumentFormat.OpenXml/DocumentFormat.OpenXml.Generator/DocumentFormat.OpenXml.Generator.OpenXmlGenerator/schemas_openxmlformats_org_drawingml_2006_main.g.cs @@ -22681,157 +22681,6 @@ public DocumentFormat.OpenXml.Drawing.Cell3DProperties? Cell3DProperties public override OpenXmlElement CloneNode(bool deep) => CloneImp(deep); } - /// - /// Table Cell. - /// This class is available in Office 2007 and above. - /// When the object is serialized out as xml, it's qualified name is a:tc. - /// - /// - /// The following table lists the possible child types: - /// - /// <a:extLst> - /// <a:tcPr> - /// <a:txBody> - /// - /// - public partial class TableCell : OpenXmlCompositeElement - { - /// - /// Initializes a new instance of the TableCell class. - /// - public TableCell() : base() - { - } - - /// - /// Initializes a new instance of the TableCell class with the specified child elements. - /// - /// Specifies the child elements. - public TableCell(IEnumerable childElements) : base(childElements) - { - } - - /// - /// Initializes a new instance of the TableCell class with the specified child elements. - /// - /// Specifies the child elements. - public TableCell(params OpenXmlElement[] childElements) : base(childElements) - { - } - - /// - /// Initializes a new instance of the TableCell class from outer XML. - /// - /// Specifies the outer XML of the element. - public TableCell(string outerXml) : base(outerXml) - { - } - - /// - /// Row Span - /// Represents the following attribute in the schema: rowSpan - /// - public Int32Value? RowSpan - { - get => GetAttribute(); - set => SetAttribute(value); - } - - /// - /// Grid Span - /// Represents the following attribute in the schema: gridSpan - /// - public Int32Value? GridSpan - { - get => GetAttribute(); - set => SetAttribute(value); - } - - /// - /// Horizontal Merge - /// Represents the following attribute in the schema: hMerge - /// - public BooleanValue? HorizontalMerge - { - get => GetAttribute(); - set => SetAttribute(value); - } - - /// - /// Vertical Merge - /// Represents the following attribute in the schema: vMerge - /// - public BooleanValue? VerticalMerge - { - get => GetAttribute(); - set => SetAttribute(value); - } - - internal override void ConfigureMetadata(ElementMetadata.Builder builder) - { - base.ConfigureMetadata(builder); - builder.SetSchema("a:tc"); - builder.AddChild(); - builder.AddChild(); - builder.AddChild(); - builder.AddElement() - .AddAttribute("rowSpan", a => a.RowSpan) - .AddAttribute("gridSpan", a => a.GridSpan) - .AddAttribute("hMerge", a => a.HorizontalMerge) - .AddAttribute("vMerge", a => a.VerticalMerge); - builder.Particle = new CompositeParticle.Builder(ParticleType.Sequence, 1, 1) - { - new ElementParticle(typeof(DocumentFormat.OpenXml.Drawing.TextBody), 0, 1), - new ElementParticle(typeof(DocumentFormat.OpenXml.Drawing.TableCellProperties), 0, 1), - new ElementParticle(typeof(DocumentFormat.OpenXml.Drawing.ExtensionList), 0, 1) - }; - builder.AddConstraint(new AttributeValueRangeConstraint(builder.CreateQName("a:rowSpan"), true, 1, true, double.PositiveInfinity, true)); - builder.AddConstraint(new AttributeValueRangeConstraint(builder.CreateQName("a:gridSpan"), true, 1, true, double.PositiveInfinity, true)); - } - - /// - /// Text Body. - /// Represents the following element tag in the schema: a:txBody. - /// - /// - /// xmlns:a = http://schemas.openxmlformats.org/drawingml/2006/main - /// - public DocumentFormat.OpenXml.Drawing.TextBody? TextBody - { - get => GetElement(); - set => SetElement(value); - } - - /// - /// Table Cell Properties. - /// Represents the following element tag in the schema: a:tcPr. - /// - /// - /// xmlns:a = http://schemas.openxmlformats.org/drawingml/2006/main - /// - public DocumentFormat.OpenXml.Drawing.TableCellProperties? TableCellProperties - { - get => GetElement(); - set => SetElement(value); - } - - /// - /// ExtensionList. - /// Represents the following element tag in the schema: a:extLst. - /// - /// - /// xmlns:a = http://schemas.openxmlformats.org/drawingml/2006/main - /// - public DocumentFormat.OpenXml.Drawing.ExtensionList? ExtensionList - { - get => GetElement(); - set => SetElement(value); - } - - /// - public override OpenXmlElement CloneNode(bool deep) => CloneImp(deep); - } - /// /// Table Style. /// This class is available in Office 2007 and above. @@ -23356,7 +23205,7 @@ internal override void ConfigureMetadata(ElementMetadata.Builder builder) /// /// The following table lists the possible child types: /// - /// <a:extLst> + /// <a:extLst> /// /// public partial class GridColumn : OpenXmlCompositeElement @@ -23393,7 +23242,7 @@ public GridColumn(string outerXml) : base(outerXml) } /// - /// Width + /// w /// Represents the following attribute in the schema: w /// public Int64Value? Width @@ -23406,7 +23255,7 @@ internal override void ConfigureMetadata(ElementMetadata.Builder builder) { base.ConfigureMetadata(builder); builder.SetSchema("a:gridCol"); - builder.AddChild(); + builder.AddChild(); builder.AddElement() .AddAttribute("w", a => a.Width, aBuilder => { @@ -23415,20 +23264,20 @@ internal override void ConfigureMetadata(ElementMetadata.Builder builder) }); builder.Particle = new CompositeParticle.Builder(ParticleType.Sequence, 1, 1) { - new ElementParticle(typeof(DocumentFormat.OpenXml.Drawing.ExtensionList), 0, 1) + new ElementParticle(typeof(DocumentFormat.OpenXml.Drawing.TableColExtensionList), 0, 1) }; } /// - /// ExtensionList. + /// TableColExtensionList. /// Represents the following element tag in the schema: a:extLst. /// /// /// xmlns:a = http://schemas.openxmlformats.org/drawingml/2006/main /// - public DocumentFormat.OpenXml.Drawing.ExtensionList? ExtensionList + public DocumentFormat.OpenXml.Drawing.TableColExtensionList? TableColExtensionList { - get => GetElement(); + get => GetElement(); set => SetElement(value); } @@ -23685,8 +23534,8 @@ internal override void ConfigureMetadata(ElementMetadata.Builder builder) /// /// The following table lists the possible child types: /// - /// <a:extLst> /// <a:tc> + /// <a:extLst> /// /// public partial class TableRow : OpenXmlCompositeElement @@ -23723,7 +23572,7 @@ public TableRow(string outerXml) : base(outerXml) } /// - /// Height + /// h /// Represents the following attribute in the schema: h /// public Int64Value? Height @@ -23736,8 +23585,8 @@ internal override void ConfigureMetadata(ElementMetadata.Builder builder) { base.ConfigureMetadata(builder); builder.SetSchema("a:tr"); - builder.AddChild(); builder.AddChild(); + builder.AddChild(); builder.AddElement() .AddAttribute("h", a => a.Height, aBuilder => { @@ -23747,7 +23596,7 @@ internal override void ConfigureMetadata(ElementMetadata.Builder builder) builder.Particle = new CompositeParticle.Builder(ParticleType.Sequence, 1, 1) { new ElementParticle(typeof(DocumentFormat.OpenXml.Drawing.TableCell), 0, 0), - new ElementParticle(typeof(DocumentFormat.OpenXml.Drawing.ExtensionList), 0, 1) + new ElementParticle(typeof(DocumentFormat.OpenXml.Drawing.TableRowExtensionList), 0, 1) }; } @@ -30992,6 +30841,395 @@ internal override void ConfigureMetadata(ElementMetadata.Builder builder) public override OpenXmlElement CloneNode(bool deep) => CloneImp(deep); } + /// + /// Defines the TableColExtension Class. + /// This class is available in Office 2007 and above. + /// When the object is serialized out as xml, it's qualified name is a:ext. + /// + /// + /// The following table lists the possible child types: + /// + /// <a16:colId> + /// + /// + public partial class TableColExtension : OpenXmlCompositeElement + { + /// + /// Initializes a new instance of the TableColExtension class. + /// + public TableColExtension() : base() + { + } + + /// + /// Initializes a new instance of the TableColExtension class with the specified child elements. + /// + /// Specifies the child elements. + public TableColExtension(IEnumerable childElements) : base(childElements) + { + } + + /// + /// Initializes a new instance of the TableColExtension class with the specified child elements. + /// + /// Specifies the child elements. + public TableColExtension(params OpenXmlElement[] childElements) : base(childElements) + { + } + + /// + /// Initializes a new instance of the TableColExtension class from outer XML. + /// + /// Specifies the outer XML of the element. + public TableColExtension(string outerXml) : base(outerXml) + { + } + + internal override void ConfigureMetadata(ElementMetadata.Builder builder) + { + base.ConfigureMetadata(builder); + builder.SetSchema("a:ext"); + builder.AddChild(); + builder.Particle = new CompositeParticle.Builder(ParticleType.Choice, 1, 1) + { + new ElementParticle(typeof(DocumentFormat.OpenXml.Office2016.Drawing.ColIdIdentifier), 1, 1, version: FileFormatVersions.Office2016), + new AnyParticle(0, 1) + }; + } + + /// + public override OpenXmlElement CloneNode(bool deep) => CloneImp(deep); + } + + /// + /// Defines the TableRowExtension Class. + /// This class is available in Office 2007 and above. + /// When the object is serialized out as xml, it's qualified name is a:ext. + /// + /// + /// The following table lists the possible child types: + /// + /// <a16:rowId> + /// + /// + public partial class TableRowExtension : OpenXmlCompositeElement + { + /// + /// Initializes a new instance of the TableRowExtension class. + /// + public TableRowExtension() : base() + { + } + + /// + /// Initializes a new instance of the TableRowExtension class with the specified child elements. + /// + /// Specifies the child elements. + public TableRowExtension(IEnumerable childElements) : base(childElements) + { + } + + /// + /// Initializes a new instance of the TableRowExtension class with the specified child elements. + /// + /// Specifies the child elements. + public TableRowExtension(params OpenXmlElement[] childElements) : base(childElements) + { + } + + /// + /// Initializes a new instance of the TableRowExtension class from outer XML. + /// + /// Specifies the outer XML of the element. + public TableRowExtension(string outerXml) : base(outerXml) + { + } + + internal override void ConfigureMetadata(ElementMetadata.Builder builder) + { + base.ConfigureMetadata(builder); + builder.SetSchema("a:ext"); + builder.AddChild(); + builder.Particle = new CompositeParticle.Builder(ParticleType.Choice, 1, 1) + { + new ElementParticle(typeof(DocumentFormat.OpenXml.Office2016.Drawing.RowIdIdentifier), 1, 1, version: FileFormatVersions.Office2016), + new AnyParticle(0, 1) + }; + } + + /// + public override OpenXmlElement CloneNode(bool deep) => CloneImp(deep); + } + + /// + /// Defines the TableColExtensionList Class. + /// This class is available in Office 2007 and above. + /// When the object is serialized out as xml, it's qualified name is a:extLst. + /// + /// + /// The following table lists the possible child types: + /// + /// <a:ext> + /// + /// + public partial class TableColExtensionList : OpenXmlCompositeElement + { + /// + /// Initializes a new instance of the TableColExtensionList class. + /// + public TableColExtensionList() : base() + { + } + + /// + /// Initializes a new instance of the TableColExtensionList class with the specified child elements. + /// + /// Specifies the child elements. + public TableColExtensionList(IEnumerable childElements) : base(childElements) + { + } + + /// + /// Initializes a new instance of the TableColExtensionList class with the specified child elements. + /// + /// Specifies the child elements. + public TableColExtensionList(params OpenXmlElement[] childElements) : base(childElements) + { + } + + /// + /// Initializes a new instance of the TableColExtensionList class from outer XML. + /// + /// Specifies the outer XML of the element. + public TableColExtensionList(string outerXml) : base(outerXml) + { + } + + internal override void ConfigureMetadata(ElementMetadata.Builder builder) + { + base.ConfigureMetadata(builder); + builder.SetSchema("a:extLst"); + builder.AddChild(); + builder.Particle = new CompositeParticle.Builder(ParticleType.Sequence, 1, 1) + { + new ElementParticle(typeof(DocumentFormat.OpenXml.Drawing.TableColExtension), 0, 0) + }; + } + + /// + public override OpenXmlElement CloneNode(bool deep) => CloneImp(deep); + } + + /// + /// Defines the TableCell Class. + /// This class is available in Office 2007 and above. + /// When the object is serialized out as xml, it's qualified name is a:tc. + /// + /// + /// The following table lists the possible child types: + /// + /// <a:extLst> + /// <a:tcPr> + /// <a:txBody> + /// + /// + public partial class TableCell : OpenXmlCompositeElement + { + /// + /// Initializes a new instance of the TableCell class. + /// + public TableCell() : base() + { + } + + /// + /// Initializes a new instance of the TableCell class with the specified child elements. + /// + /// Specifies the child elements. + public TableCell(IEnumerable childElements) : base(childElements) + { + } + + /// + /// Initializes a new instance of the TableCell class with the specified child elements. + /// + /// Specifies the child elements. + public TableCell(params OpenXmlElement[] childElements) : base(childElements) + { + } + + /// + /// Initializes a new instance of the TableCell class from outer XML. + /// + /// Specifies the outer XML of the element. + public TableCell(string outerXml) : base(outerXml) + { + } + + /// + /// Row Span + /// Represents the following attribute in the schema: rowSpan + /// + public Int32Value? RowSpan + { + get => GetAttribute(); + set => SetAttribute(value); + } + + /// + /// Grid Span + /// Represents the following attribute in the schema: gridSpan + /// + public Int32Value? GridSpan + { + get => GetAttribute(); + set => SetAttribute(value); + } + + /// + /// Horizontal Merge + /// Represents the following attribute in the schema: hMerge + /// + public BooleanValue? HorizontalMerge + { + get => GetAttribute(); + set => SetAttribute(value); + } + + /// + /// Vertical Merge + /// Represents the following attribute in the schema: vMerge + /// + public BooleanValue? VerticalMerge + { + get => GetAttribute(); + set => SetAttribute(value); + } + + internal override void ConfigureMetadata(ElementMetadata.Builder builder) + { + base.ConfigureMetadata(builder); + builder.SetSchema("a:tc"); + builder.AddChild(); + builder.AddChild(); + builder.AddChild(); + builder.AddElement() + .AddAttribute("rowSpan", a => a.RowSpan) + .AddAttribute("gridSpan", a => a.GridSpan) + .AddAttribute("hMerge", a => a.HorizontalMerge) + .AddAttribute("vMerge", a => a.VerticalMerge); + builder.Particle = new CompositeParticle.Builder(ParticleType.Sequence, 1, 1) + { + new ElementParticle(typeof(DocumentFormat.OpenXml.Drawing.TextBody), 0, 1), + new ElementParticle(typeof(DocumentFormat.OpenXml.Drawing.TableCellProperties), 0, 1), + new ElementParticle(typeof(DocumentFormat.OpenXml.Drawing.ExtensionList), 0, 1) + }; + builder.AddConstraint(new AttributeValueRangeConstraint(builder.CreateQName("a:rowSpan"), true, 1, true, double.PositiveInfinity, true)); + builder.AddConstraint(new AttributeValueRangeConstraint(builder.CreateQName("a:gridSpan"), true, 1, true, double.PositiveInfinity, true)); + } + + /// + /// Text Body. + /// Represents the following element tag in the schema: a:txBody. + /// + /// + /// xmlns:a = http://schemas.openxmlformats.org/drawingml/2006/main + /// + public DocumentFormat.OpenXml.Drawing.TextBody? TextBody + { + get => GetElement(); + set => SetElement(value); + } + + /// + /// Table Cell Properties. + /// Represents the following element tag in the schema: a:tcPr. + /// + /// + /// xmlns:a = http://schemas.openxmlformats.org/drawingml/2006/main + /// + public DocumentFormat.OpenXml.Drawing.TableCellProperties? TableCellProperties + { + get => GetElement(); + set => SetElement(value); + } + + /// + /// ExtensionList. + /// Represents the following element tag in the schema: a:extLst. + /// + /// + /// xmlns:a = http://schemas.openxmlformats.org/drawingml/2006/main + /// + public DocumentFormat.OpenXml.Drawing.ExtensionList? ExtensionList + { + get => GetElement(); + set => SetElement(value); + } + + /// + public override OpenXmlElement CloneNode(bool deep) => CloneImp(deep); + } + + /// + /// Defines the TableRowExtensionList Class. + /// This class is available in Office 2007 and above. + /// When the object is serialized out as xml, it's qualified name is a:extLst. + /// + /// + /// The following table lists the possible child types: + /// + /// <a:ext> + /// + /// + public partial class TableRowExtensionList : OpenXmlCompositeElement + { + /// + /// Initializes a new instance of the TableRowExtensionList class. + /// + public TableRowExtensionList() : base() + { + } + + /// + /// Initializes a new instance of the TableRowExtensionList class with the specified child elements. + /// + /// Specifies the child elements. + public TableRowExtensionList(IEnumerable childElements) : base(childElements) + { + } + + /// + /// Initializes a new instance of the TableRowExtensionList class with the specified child elements. + /// + /// Specifies the child elements. + public TableRowExtensionList(params OpenXmlElement[] childElements) : base(childElements) + { + } + + /// + /// Initializes a new instance of the TableRowExtensionList class from outer XML. + /// + /// Specifies the outer XML of the element. + public TableRowExtensionList(string outerXml) : base(outerXml) + { + } + + internal override void ConfigureMetadata(ElementMetadata.Builder builder) + { + base.ConfigureMetadata(builder); + builder.SetSchema("a:extLst"); + builder.AddChild(); + builder.Particle = new CompositeParticle.Builder(ParticleType.Sequence, 1, 1) + { + new ElementParticle(typeof(DocumentFormat.OpenXml.Drawing.TableRowExtension), 0, 0) + }; + } + + /// + public override OpenXmlElement CloneNode(bool deep) => CloneImp(deep); + } + /// /// Defines the HyperlinkExtension Class. /// This class is available in Office 2007 and above. diff --git a/test/DocumentFormat.OpenXml.Framework.Tests/ElementChildren.json b/test/DocumentFormat.OpenXml.Framework.Tests/ElementChildren.json index daa8b453f..99bbba914 100644 --- a/test/DocumentFormat.OpenXml.Framework.Tests/ElementChildren.json +++ b/test/DocumentFormat.OpenXml.Framework.Tests/ElementChildren.json @@ -15633,6 +15633,24 @@ } ] }, + { + "Element": "DocumentFormat.OpenXml.Drawing.TableColExtension", + "Children": [ + { + "Name": "colId", + "Namespace": "http://schemas.microsoft.com/office/drawing/2014/main" + } + ] + }, + { + "Element": "DocumentFormat.OpenXml.Drawing.TableColExtensionList", + "Children": [ + { + "Name": "ext", + "Namespace": "http://schemas.openxmlformats.org/drawingml/2006/main" + } + ] + }, { "Element": "DocumentFormat.OpenXml.Drawing.TableGrid", "Children": [ @@ -15704,6 +15722,24 @@ } ] }, + { + "Element": "DocumentFormat.OpenXml.Drawing.TableRowExtension", + "Children": [ + { + "Name": "rowId", + "Namespace": "http://schemas.microsoft.com/office/drawing/2014/main" + } + ] + }, + { + "Element": "DocumentFormat.OpenXml.Drawing.TableRowExtensionList", + "Children": [ + { + "Name": "ext", + "Namespace": "http://schemas.openxmlformats.org/drawingml/2006/main" + } + ] + }, { "Element": "DocumentFormat.OpenXml.Drawing.TableStyle", "Children": [ diff --git a/test/DocumentFormat.OpenXml.Packaging.Tests/data/Particles.json b/test/DocumentFormat.OpenXml.Packaging.Tests/data/Particles.json index eb729d3ab..b186f1dcf 100644 --- a/test/DocumentFormat.OpenXml.Packaging.Tests/data/Particles.json +++ b/test/DocumentFormat.OpenXml.Packaging.Tests/data/Particles.json @@ -13294,7 +13294,7 @@ "Value": { "ChildrenParticles": [ { - "ElementType": "DocumentFormat.OpenXml.Drawing.ExtensionList", + "ElementType": "DocumentFormat.OpenXml.Drawing.TableColExtensionList", "MinOccurs": 0 } ], @@ -19773,6 +19773,56 @@ } ] }, + { + "Key": "DocumentFormat.OpenXml.Drawing.TableColExtension", + "Value": [ + { + "Key": "Office2016, Office2019, Office2021, Microsoft365", + "Value": { + "ChildrenParticles": [ + { + "ElementType": "DocumentFormat.OpenXml.Office2016.Drawing.ColIdIdentifier" + }, + { + "MinOccurs": 0, + "ParticleType": "Any" + } + ], + "ParticleType": "Choice" + } + }, + { + "Key": "Office2007, Office2010, Office2013", + "Value": { + "ChildrenParticles": [ + { + "MinOccurs": 0, + "ParticleType": "Any" + } + ], + "ParticleType": "Choice" + } + } + ] + }, + { + "Key": "DocumentFormat.OpenXml.Drawing.TableColExtensionList", + "Value": [ + { + "Key": "Office2007, Office2010, Office2013, Office2016, Office2019, Office2021, Microsoft365", + "Value": { + "ChildrenParticles": [ + { + "ElementType": "DocumentFormat.OpenXml.Drawing.TableColExtension", + "MaxOccurs": 0, + "MinOccurs": 0 + } + ], + "ParticleType": "Sequence" + } + } + ] + }, { "Key": "DocumentFormat.OpenXml.Drawing.TableGrid", "Value": [ @@ -19878,7 +19928,57 @@ "MinOccurs": 0 }, { - "ElementType": "DocumentFormat.OpenXml.Drawing.ExtensionList", + "ElementType": "DocumentFormat.OpenXml.Drawing.TableRowExtensionList", + "MinOccurs": 0 + } + ], + "ParticleType": "Sequence" + } + } + ] + }, + { + "Key": "DocumentFormat.OpenXml.Drawing.TableRowExtension", + "Value": [ + { + "Key": "Office2016, Office2019, Office2021, Microsoft365", + "Value": { + "ChildrenParticles": [ + { + "ElementType": "DocumentFormat.OpenXml.Office2016.Drawing.RowIdIdentifier" + }, + { + "MinOccurs": 0, + "ParticleType": "Any" + } + ], + "ParticleType": "Choice" + } + }, + { + "Key": "Office2007, Office2010, Office2013", + "Value": { + "ChildrenParticles": [ + { + "MinOccurs": 0, + "ParticleType": "Any" + } + ], + "ParticleType": "Choice" + } + } + ] + }, + { + "Key": "DocumentFormat.OpenXml.Drawing.TableRowExtensionList", + "Value": [ + { + "Key": "Office2007, Office2010, Office2013, Office2016, Office2019, Office2021, Microsoft365", + "Value": { + "ChildrenParticles": [ + { + "ElementType": "DocumentFormat.OpenXml.Drawing.TableRowExtension", + "MaxOccurs": 0, "MinOccurs": 0 } ],