Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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)]";
Expand All @@ -30,6 +31,12 @@ public static class AttributeStrings
AttributeStrings.EditorBrowsableNever,
];

private static readonly List<string> 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<TypedQName, Dictionary<TypedQName, List<string>>> _attributeData =
new Dictionary<TypedQName, Dictionary<TypedQName, List<string>>>()
Expand Down Expand Up @@ -117,6 +124,26 @@ public static class AttributeStrings
},
}
},
{
"xlpda:CT_PivotCacheDynamicArray/xlpda:pivotCacheDynamicArray",
new Dictionary<TypedQName, List<string>>()
{
{
"xlpda:CT_PivotCacheDynamicArray/xlpda:pivotCacheDynamicArray",
ObsoleteClassErrorList
},
}
},
{
"xprd:CT_PivotCacheRichInfo/xprd:richInfo",
new Dictionary<TypedQName, List<string>>()
{
{
"xprd:CT_PivotCacheRichInfo/xprd:richInfo",
ObsoleteClassErrorList
},
}
},
};

public static bool GetDataModelSyntax(this IndentedTextWriter writer, OpenXmlGeneratorServices services, SchemaNamespace model)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ namespace DocumentFormat.OpenXml.Office.SpreadSheetML.Y2022.PivotRichData
/// <para>This class is available in Microsoft365 and above.</para>
/// <para>When the object is serialized out as xml, it's qualified name is xprd:richInfo.</para>
/// </summary>
[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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ namespace DocumentFormat.OpenXml.Office.SpreadSheetML.Y2024.PivotDynamicArrays
/// <para>This class is available in Microsoft365 and above.</para>
/// <para>When the object is serialized out as xml, it's qualified name is xlpda:pivotCacheDynamicArray.</para>
/// </summary>
[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
Expand Down
Loading