From 37c60d65849dee72a1027840ab5eeec5a41f3aa6 Mon Sep 17 00:00:00 2001 From: Michael Bowen <10384982+mikeebowen@users.noreply.github.com> Date: Fri, 27 Jun 2025 11:31:06 -0700 Subject: [PATCH] obsolete PivotCacheRichInfo and PivotCacheDynamicArray classes --- .../Elements/DataModelWriterExtensions.cs | 27 +++++++++++++++++++ ...fice_spreadsheetml_2022_pivotRichData.g.cs | 2 ++ ...spreadsheetml_2024_pivotDynamicArrays.g.cs | 2 ++ 3 files changed, 31 insertions(+) diff --git a/gen/DocumentFormat.OpenXml.Generator.Models/Generators/Elements/DataModelWriterExtensions.cs b/gen/DocumentFormat.OpenXml.Generator.Models/Generators/Elements/DataModelWriterExtensions.cs index 64a214cc8..80af12c00 100644 --- a/gen/DocumentFormat.OpenXml.Generator.Models/Generators/Elements/DataModelWriterExtensions.cs +++ b/gen/DocumentFormat.OpenXml.Generator.Models/Generators/Elements/DataModelWriterExtensions.cs @@ -15,6 +15,7 @@ public static class DataModelWriterExtensions { public static class AttributeStrings { + public const string ObsoleteClassWarn = "[Obsolete(\"Unused class, will be removed in a future version.\", false)]"; public const string ObsoletePropertyWarn = "[Obsolete(\"Unused property, will be removed in a future version.\", false)]"; public const string ObsoletePropertyError = "[Obsolete(\"Unused property, will be removed in a future version.\", true)]"; public const string ObsoleteAttributeWarn = "[Obsolete(\"Unused attribute, will be removed in a future version.\", false)]"; @@ -30,6 +31,12 @@ public static class AttributeStrings AttributeStrings.EditorBrowsableNever, ]; + private static readonly List ObsoleteClassErrorList = + [ + AttributeStrings.ObsoleteClassWarn, + AttributeStrings.EditorBrowsableNever, + ]; + // Use this dictionary to add attributes like ObsoleteAttribute or other directives to classes, child elements or attributes. private static readonly Dictionary>> _attributeData = new Dictionary>>() @@ -117,6 +124,26 @@ public static class AttributeStrings }, } }, + { + "xlpda:CT_PivotCacheDynamicArray/xlpda:pivotCacheDynamicArray", + new Dictionary>() + { + { + "xlpda:CT_PivotCacheDynamicArray/xlpda:pivotCacheDynamicArray", + ObsoleteClassErrorList + }, + } + }, + { + "xprd:CT_PivotCacheRichInfo/xprd:richInfo", + new Dictionary>() + { + { + "xprd:CT_PivotCacheRichInfo/xprd:richInfo", + ObsoleteClassErrorList + }, + } + }, }; public static bool GetDataModelSyntax(this IndentedTextWriter writer, OpenXmlGeneratorServices services, SchemaNamespace model) diff --git a/generated/DocumentFormat.OpenXml/DocumentFormat.OpenXml.Generator/DocumentFormat.OpenXml.Generator.OpenXmlGenerator/schemas_microsoft_com_office_spreadsheetml_2022_pivotRichData.g.cs b/generated/DocumentFormat.OpenXml/DocumentFormat.OpenXml.Generator/DocumentFormat.OpenXml.Generator.OpenXmlGenerator/schemas_microsoft_com_office_spreadsheetml_2022_pivotRichData.g.cs index 5c1775993..29fc0d636 100644 --- a/generated/DocumentFormat.OpenXml/DocumentFormat.OpenXml.Generator/DocumentFormat.OpenXml.Generator.OpenXmlGenerator/schemas_microsoft_com_office_spreadsheetml_2022_pivotRichData.g.cs +++ b/generated/DocumentFormat.OpenXml/DocumentFormat.OpenXml.Generator/DocumentFormat.OpenXml.Generator.OpenXmlGenerator/schemas_microsoft_com_office_spreadsheetml_2022_pivotRichData.g.cs @@ -21,6 +21,8 @@ namespace DocumentFormat.OpenXml.Office.SpreadSheetML.Y2022.PivotRichData /// This class is available in Microsoft365 and above. /// When the object is serialized out as xml, it's qualified name is xprd:richInfo. /// + [Obsolete("Unused class, will be removed in a future version.", false)] + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] public partial class PivotCacheRichInfo : OpenXmlLeafElement { #pragma warning disable CS0109 diff --git a/generated/DocumentFormat.OpenXml/DocumentFormat.OpenXml.Generator/DocumentFormat.OpenXml.Generator.OpenXmlGenerator/schemas_microsoft_com_office_spreadsheetml_2024_pivotDynamicArrays.g.cs b/generated/DocumentFormat.OpenXml/DocumentFormat.OpenXml.Generator/DocumentFormat.OpenXml.Generator.OpenXmlGenerator/schemas_microsoft_com_office_spreadsheetml_2024_pivotDynamicArrays.g.cs index 3297d8019..e69f85b9c 100644 --- a/generated/DocumentFormat.OpenXml/DocumentFormat.OpenXml.Generator/DocumentFormat.OpenXml.Generator.OpenXmlGenerator/schemas_microsoft_com_office_spreadsheetml_2024_pivotDynamicArrays.g.cs +++ b/generated/DocumentFormat.OpenXml/DocumentFormat.OpenXml.Generator/DocumentFormat.OpenXml.Generator.OpenXmlGenerator/schemas_microsoft_com_office_spreadsheetml_2024_pivotDynamicArrays.g.cs @@ -21,6 +21,8 @@ namespace DocumentFormat.OpenXml.Office.SpreadSheetML.Y2024.PivotDynamicArrays /// This class is available in Microsoft365 and above. /// When the object is serialized out as xml, it's qualified name is xlpda:pivotCacheDynamicArray. /// + [Obsolete("Unused class, will be removed in a future version.", false)] + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] public partial class PivotCacheDynamicArray : OpenXmlLeafElement { #pragma warning disable CS0109