Skip to content

Commit 93e58d4

Browse files
authored
Additional O19 types to match Open Specifications (#916)
* Additional O19 types
1 parent 9a7a224 commit 93e58d4

File tree

27 files changed

+15776
-9795
lines changed

27 files changed

+15776
-9795
lines changed

src/DocumentFormat.OpenXml/Framework/OpenXmlNamespace.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,8 @@ private static string NormalizeNamespace(in OpenXmlNamespace ns)
242242

243243
// O19
244244
{ "http://schemas.microsoft.com/office/powerpoint/2017/3/main", "p173", FileFormatVersions.Office2019 },
245+
{ "http://schemas.microsoft.com/office/powerpoint/2017/10/main", "p1710", FileFormatVersions.Office2019 },
246+
{ "http://schemas.microsoft.com/office/powerpoint/2018/4/main", "p184", FileFormatVersions.Office2019 },
245247
{ "http://schemas.microsoft.com/office/spreadsheetml/2016/pivotdefaultlayout", "xpdl", FileFormatVersions.Office2019 },
246248
{ "http://schemas.microsoft.com/office/spreadsheetml/2016/01/main", "xlPr", FileFormatVersions.Office2019 },
247249
{ "http://schemas.microsoft.com/office/spreadsheetml/2015/revision2", "xr2", FileFormatVersions.Office2019 },
@@ -257,9 +259,14 @@ private static string NormalizeNamespace(in OpenXmlNamespace ns)
257259
{ "http://schemas.microsoft.com/office/spreadsheetml/2018/threadedcomments", "xltc", FileFormatVersions.Office2019 },
258260
{ "http://schemas.microsoft.com/office/drawing/2017/03/chart", "c16r3", FileFormatVersions.Office2019 },
259261
{ "http://schemas.microsoft.com/office/spreadsheetml/2017/dynamicarray", "xda", FileFormatVersions.Office2019 },
262+
{ "http://schemas.microsoft.com/office/drawing/2016/11/main", "a1611", FileFormatVersions.Office2019 },
260263
{ "http://schemas.microsoft.com/office/drawing/2016/11/diagram", "dgm1611", FileFormatVersions.Office2019 },
261264
{ "http://schemas.microsoft.com/office/drawing/2016/12/diagram", "dgm1612", FileFormatVersions.Office2019 },
262265
{ "http://schemas.microsoft.com/office/drawing/2016/ink", "aink", FileFormatVersions.Office2019 },
266+
{ "http://schemas.microsoft.com/office/drawing/2017/model3d", "am3d", FileFormatVersions.Office2019 },
267+
{ "http://schemas.microsoft.com/office/drawing/2017/decorative", "adec", FileFormatVersions.Office2019 },
268+
{ "http://schemas.microsoft.com/office/drawing/2018/animation", "aanim", FileFormatVersions.Office2019 },
269+
{ "http://schemas.microsoft.com/office/drawing/2018/animation/model3d", "a3danim", FileFormatVersions.Office2019 },
263270
{ "http://schemas.microsoft.com/office/drawing/2018/hyperlinkcolor", "ahyp", FileFormatVersions.Office2019 },
264271
{ "http://schemas.microsoft.com/office/word/2016/wordml/cid", "w16cid", FileFormatVersions.Office2019 },
265272
{ "http://schemas.microsoft.com/office/drawing/2016/SVG/main", "asvg", FileFormatVersions.Office2019 },

src/DocumentFormat.OpenXml/GeneratedCode/schemas_microsoft_com_office_drawing_2016_11_diagram.g.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ namespace DocumentFormat.OpenXml.Office2019.Drawing.Diagram11
2828
/// </list>
2929
/// </remark>
3030
#pragma warning disable CS0618 // Type or member is obsolete
31-
[SchemaAttr(103, "autoBuNodeInfoLst")]
31+
[SchemaAttr(106, "autoBuNodeInfoLst")]
3232
#pragma warning restore CS0618 // Type or member is obsolete
3333
public partial class NumberDiagramInfoList : OpenXmlCompositeElement
3434
{
@@ -66,7 +66,7 @@ public NumberDiagramInfoList(string outerXml) : base(outerXml)
6666
internal override void ConfigureMetadata(ElementMetadata.Builder builder)
6767
{
6868
base.ConfigureMetadata(builder);
69-
builder.SetSchema(103, "autoBuNodeInfoLst");
69+
builder.SetSchema(106, "autoBuNodeInfoLst");
7070
builder.Availability = FileFormatVersions.Office2019;
7171
builder.AddChild<NumberDiagramInfo>();
7272
builder.Particle = new CompositeParticle.Builder(ParticleType.Sequence, 1, 1)
@@ -94,7 +94,7 @@ internal override void ConfigureMetadata(ElementMetadata.Builder builder)
9494
/// </list>
9595
/// </remark>
9696
#pragma warning disable CS0618 // Type or member is obsolete
97-
[SchemaAttr(103, "buPr")]
97+
[SchemaAttr(106, "buPr")]
9898
#pragma warning restore CS0618 // Type or member is obsolete
9999
public partial class DiagramAutoBullet : OpenXmlCompositeElement
100100
{
@@ -164,7 +164,7 @@ public BooleanValue? LeadZeros
164164
internal override void ConfigureMetadata(ElementMetadata.Builder builder)
165165
{
166166
base.ConfigureMetadata(builder);
167-
builder.SetSchema(103, "buPr");
167+
builder.SetSchema(106, "buPr");
168168
builder.Availability = FileFormatVersions.Office2019;
169169
builder.AddChild<DocumentFormat.OpenXml.Drawing.NoBullet>();
170170
builder.AddChild<DocumentFormat.OpenXml.Drawing.AutoNumberedBullet>();
@@ -253,7 +253,7 @@ public DocumentFormat.OpenXml.Drawing.PictureBullet? PictureBullet
253253
/// </list>
254254
/// </remark>
255255
#pragma warning disable CS0618 // Type or member is obsolete
256-
[SchemaAttr(103, "autoBuNodeInfo")]
256+
[SchemaAttr(106, "autoBuNodeInfo")]
257257
#pragma warning restore CS0618 // Type or member is obsolete
258258
public partial class NumberDiagramInfo : OpenXmlCompositeElement
259259
{
@@ -323,7 +323,7 @@ public EnumValue<DocumentFormat.OpenXml.Office2019.Drawing.Diagram11.STorageType
323323
internal override void ConfigureMetadata(ElementMetadata.Builder builder)
324324
{
325325
base.ConfigureMetadata(builder);
326-
builder.SetSchema(103, "autoBuNodeInfo");
326+
builder.SetSchema(106, "autoBuNodeInfo");
327327
builder.Availability = FileFormatVersions.Office2019;
328328
builder.AddChild<DiagramAutoBullet>();
329329
builder.AddElement<NumberDiagramInfo>()
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
// Copyright (c) Microsoft. All rights reserved.
2+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3+
4+
#nullable enable
5+
6+
using DocumentFormat.OpenXml;
7+
using DocumentFormat.OpenXml.Framework;
8+
using DocumentFormat.OpenXml.Framework.Metadata;
9+
using DocumentFormat.OpenXml.Packaging;
10+
using DocumentFormat.OpenXml.Validation.Schema;
11+
using System;
12+
using System.Collections.Generic;
13+
using System.IO.Packaging;
14+
15+
namespace DocumentFormat.OpenXml.Office2019.Drawing
16+
{
17+
/// <summary>
18+
/// <para>Defines the PictureAttributionSourceURL Class.</para>
19+
/// <para>This class is available in Office 2019 and above.</para>
20+
/// <para>When the object is serialized out as xml, it's qualified name is a1611:picAttrSrcUrl.</para>
21+
/// </summary>
22+
#pragma warning disable CS0618 // Type or member is obsolete
23+
[SchemaAttr(105, "picAttrSrcUrl")]
24+
#pragma warning restore CS0618 // Type or member is obsolete
25+
public partial class PictureAttributionSourceURL : OpenXmlLeafElement
26+
{
27+
/// <summary>
28+
/// Initializes a new instance of the PictureAttributionSourceURL class.
29+
/// </summary>
30+
public PictureAttributionSourceURL() : base()
31+
{
32+
}
33+
34+
/// <summary>
35+
/// <para>id, this property is only available in Office 2019 and later.</para>
36+
/// <para>Represents the following attribute in the schema: r:id</para>
37+
/// </summary>
38+
/// <remark>
39+
/// xmlns:r=http://schemas.openxmlformats.org/officeDocument/2006/relationships
40+
/// </remark>
41+
42+
#pragma warning disable CS0618 // Type or member is obsolete
43+
44+
[SchemaAttr(19, "id")]
45+
#pragma warning restore CS0618 // Type or member is obsolete
46+
47+
public StringValue? Id
48+
{
49+
get => GetAttribute<StringValue>();
50+
set => SetAttribute(value);
51+
}
52+
53+
internal override void ConfigureMetadata(ElementMetadata.Builder builder)
54+
{
55+
base.ConfigureMetadata(builder);
56+
builder.SetSchema(105, "picAttrSrcUrl");
57+
builder.Availability = FileFormatVersions.Office2019;
58+
builder.AddElement<PictureAttributionSourceURL>()
59+
.AddAttribute(19, "id", a => a.Id, aBuilder =>
60+
{
61+
aBuilder.AddValidator(RequiredValidator.Instance);
62+
});
63+
}
64+
65+
/// <inheritdoc/>
66+
public override OpenXmlElement CloneNode(bool deep) => CloneImp<PictureAttributionSourceURL>(deep);
67+
}
68+
}

src/DocumentFormat.OpenXml/GeneratedCode/schemas_microsoft_com_office_drawing_2016_12_diagram.g.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ namespace DocumentFormat.OpenXml.Office2019.Drawing.Diagram12
4141
/// </list>
4242
/// </remark>
4343
#pragma warning disable CS0618 // Type or member is obsolete
44-
[SchemaAttr(104, "spPr")]
44+
[SchemaAttr(107, "spPr")]
4545
#pragma warning restore CS0618 // Type or member is obsolete
4646
public partial class ShapeProperties : OpenXmlCompositeElement
4747
{
@@ -95,7 +95,7 @@ public EnumValue<DocumentFormat.OpenXml.Drawing.BlackWhiteModeValues>? BlackWhit
9595
internal override void ConfigureMetadata(ElementMetadata.Builder builder)
9696
{
9797
base.ConfigureMetadata(builder);
98-
builder.SetSchema(104, "spPr");
98+
builder.SetSchema(107, "spPr");
9999
builder.Availability = FileFormatVersions.Office2019;
100100
builder.AddChild<DocumentFormat.OpenXml.Drawing.Transform2D>();
101101
builder.AddChild<DocumentFormat.OpenXml.Drawing.CustomGeometry>();
@@ -194,7 +194,7 @@ public DocumentFormat.OpenXml.Drawing.Transform2D? Transform2D
194194
/// </list>
195195
/// </remark>
196196
#pragma warning disable CS0618 // Type or member is obsolete
197-
[SchemaAttr(104, "lstStyle")]
197+
[SchemaAttr(107, "lstStyle")]
198198
#pragma warning restore CS0618 // Type or member is obsolete
199199
public partial class TextListStyleType : OpenXmlCompositeElement
200200
{
@@ -232,7 +232,7 @@ public TextListStyleType(string outerXml) : base(outerXml)
232232
internal override void ConfigureMetadata(ElementMetadata.Builder builder)
233233
{
234234
base.ConfigureMetadata(builder);
235-
builder.SetSchema(104, "lstStyle");
235+
builder.SetSchema(107, "lstStyle");
236236
builder.Availability = FileFormatVersions.Office2019;
237237
builder.AddChild<DocumentFormat.OpenXml.Drawing.DefaultParagraphProperties>();
238238
builder.AddChild<DocumentFormat.OpenXml.Drawing.Level1ParagraphProperties>();

src/DocumentFormat.OpenXml/GeneratedCode/schemas_microsoft_com_office_drawing_2016_SVG_main.g.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ namespace DocumentFormat.OpenXml.Office2019.Drawing.SVG
2121
/// <para>When the object is serialized out as xml, it's qualified name is asvg:svgBlip.</para>
2222
/// </summary>
2323
#pragma warning disable CS0618 // Type or member is obsolete
24-
[SchemaAttr(108, "svgBlip")]
24+
[SchemaAttr(115, "svgBlip")]
2525
#pragma warning restore CS0618 // Type or member is obsolete
2626
public partial class SVGBlip : OpenXmlLeafElement
2727
{
@@ -73,7 +73,7 @@ public StringValue? Link
7373
internal override void ConfigureMetadata(ElementMetadata.Builder builder)
7474
{
7575
base.ConfigureMetadata(builder);
76-
builder.SetSchema(108, "svgBlip");
76+
builder.SetSchema(115, "svgBlip");
7777
builder.Availability = FileFormatVersions.Office2019;
7878
builder.AddElement<SVGBlip>()
7979
.AddAttribute(19, "embed", a => a.Embed)

src/DocumentFormat.OpenXml/GeneratedCode/schemas_microsoft_com_office_drawing_2017_03_chart.g.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ namespace DocumentFormat.OpenXml.Office2019.Drawing.Chart
2727
/// </list>
2828
/// </remark>
2929
#pragma warning disable CS0618 // Type or member is obsolete
30-
[SchemaAttr(101, "dataDisplayOptions16")]
30+
[SchemaAttr(103, "dataDisplayOptions16")]
3131
#pragma warning restore CS0618 // Type or member is obsolete
3232
public partial class DataDisplayOptions16 : OpenXmlCompositeElement
3333
{
@@ -65,7 +65,7 @@ public DataDisplayOptions16(string outerXml) : base(outerXml)
6565
internal override void ConfigureMetadata(ElementMetadata.Builder builder)
6666
{
6767
base.ConfigureMetadata(builder);
68-
builder.SetSchema(101, "dataDisplayOptions16");
68+
builder.SetSchema(103, "dataDisplayOptions16");
6969
builder.Availability = FileFormatVersions.Office2019;
7070
builder.AddChild<BooleanFalse>();
7171
builder.Particle = new CompositeParticle.Builder(ParticleType.Sequence, 1, 1)
@@ -97,7 +97,7 @@ public BooleanFalse? BooleanFalse
9797
/// <para>When the object is serialized out as xml, it's qualified name is c16r3:dispNaAsBlank.</para>
9898
/// </summary>
9999
#pragma warning disable CS0618 // Type or member is obsolete
100-
[SchemaAttr(101, "dispNaAsBlank")]
100+
[SchemaAttr(103, "dispNaAsBlank")]
101101
#pragma warning restore CS0618 // Type or member is obsolete
102102
public partial class BooleanFalse : OpenXmlLeafElement
103103
{
@@ -118,7 +118,7 @@ public BooleanFalse() : base()
118118

119119
#pragma warning disable CS0618 // Type or member is obsolete
120120

121-
[SchemaAttr(101, "val")]
121+
[SchemaAttr(103, "val")]
122122
#pragma warning restore CS0618 // Type or member is obsolete
123123

124124
public BooleanValue? Val
@@ -130,10 +130,10 @@ public BooleanValue? Val
130130
internal override void ConfigureMetadata(ElementMetadata.Builder builder)
131131
{
132132
base.ConfigureMetadata(builder);
133-
builder.SetSchema(101, "dispNaAsBlank");
133+
builder.SetSchema(103, "dispNaAsBlank");
134134
builder.Availability = FileFormatVersions.Office2019;
135135
builder.AddElement<BooleanFalse>()
136-
.AddAttribute(101, "val", a => a.Val, aBuilder =>
136+
.AddAttribute(103, "val", a => a.Val, aBuilder =>
137137
{
138138
aBuilder.AddValidator(new OfficeVersionValidator(FileFormatVersions.Office2019));
139139
});
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
// Copyright (c) Microsoft. All rights reserved.
2+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3+
4+
#nullable enable
5+
6+
using DocumentFormat.OpenXml;
7+
using DocumentFormat.OpenXml.Drawing;
8+
using DocumentFormat.OpenXml.Framework;
9+
using DocumentFormat.OpenXml.Framework.Metadata;
10+
using DocumentFormat.OpenXml.Packaging;
11+
using DocumentFormat.OpenXml.Validation.Schema;
12+
using System;
13+
using System.Collections.Generic;
14+
using System.IO.Packaging;
15+
16+
namespace DocumentFormat.OpenXml.Office2019.Drawing
17+
{
18+
/// <summary>
19+
/// <para>Defines the Decorative Class.</para>
20+
/// <para>This class is available in Office 2019 and above.</para>
21+
/// <para>When the object is serialized out as xml, it's qualified name is adec:decorative.</para>
22+
/// </summary>
23+
#pragma warning disable CS0618 // Type or member is obsolete
24+
[SchemaAttr(110, "decorative")]
25+
#pragma warning restore CS0618 // Type or member is obsolete
26+
public partial class Decorative : OpenXmlLeafElement
27+
{
28+
/// <summary>
29+
/// Initializes a new instance of the Decorative class.
30+
/// </summary>
31+
public Decorative() : base()
32+
{
33+
}
34+
35+
/// <summary>
36+
/// <para>val, this property is only available in Office 2019 and later.</para>
37+
/// <para>Represents the following attribute in the schema: val</para>
38+
/// </summary>
39+
40+
#pragma warning disable CS0618 // Type or member is obsolete
41+
42+
[SchemaAttr(0, "val")]
43+
#pragma warning restore CS0618 // Type or member is obsolete
44+
45+
public BooleanValue? Val
46+
{
47+
get => GetAttribute<BooleanValue>();
48+
set => SetAttribute(value);
49+
}
50+
51+
internal override void ConfigureMetadata(ElementMetadata.Builder builder)
52+
{
53+
base.ConfigureMetadata(builder);
54+
builder.SetSchema(110, "decorative");
55+
builder.Availability = FileFormatVersions.Office2019;
56+
builder.AddElement<Decorative>()
57+
.AddAttribute(0, "val", a => a.Val);
58+
}
59+
60+
/// <inheritdoc/>
61+
public override OpenXmlElement CloneNode(bool deep) => CloneImp<Decorative>(deep);
62+
}
63+
}

0 commit comments

Comments
 (0)