Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more properties to the 'DocumentSummaryInfo' PropertyIdentifiers set #266

Merged
merged 1 commit into from
Dec 4, 2024
Merged
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
17 changes: 14 additions & 3 deletions OpenMcdf.Ole/PropertyIdentifiers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ public static class PropertyIdentifiers
{
readonly static FrozenDictionary<uint, string> SummaryInfo = new Dictionary<uint, string>()
{
{0x00000001, "CodePageString" },
{0x00000001, "PIDSI_CODEPAGE" },
{0x00000002, "PIDSI_TITLE" },
{0x00000003, "PIDSI_SUBJECT" },
{0x00000004, "PIDSI_AUTHOR" },
Expand All @@ -28,7 +28,7 @@ public static class PropertyIdentifiers

readonly static FrozenDictionary<uint, string> DocumentSummaryInfo = new Dictionary<uint, string>()
{
{0x00000001, "CodePageString" },
{0x00000001, "PIDDSI_CODEPAGE" },
{0x00000002, "PIDDSI_CATEGORY" },
{0x00000003, "PIDDSI_PRESFORMAT" },
{0x00000004, "PIDDSI_BYTECOUNT" },
Expand All @@ -43,7 +43,18 @@ public static class PropertyIdentifiers
{0x0000000D, "PIDDSI_DOCPARTS" },
{0x0000000E, "PIDDSI_MANAGER" },
{0x0000000F, "PIDDSI_COMPANY" },
{0x00000010, "PIDDSI_LINKSDIRTY" }
{0x00000010, "PIDDSI_LINKSDIRTY" },
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should CodePageString also be updated to PIDDSI_CODEPAGE? And similarly PIDSI_CODEPAGE for SummaryInfo?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know what the historical reason was for it being different, but the new major version seems like the right time to change it if wanted

{0x00000011, "PIDDSI_CCHWITHSPACES" },
{0x00000013, "PIDDSI_SHAREDDOC" },
{0x00000014, "PIDDSI_LINKBASE" },
{0x00000015, "PIDDSI_HLINKS" },
{0x00000016, "PIDDSI_HYPERLINKSCHANGED" },
{0x00000017, "PIDDSI_VERSION" },
{0x00000018, "PIDDSI_DIGSIG" },
{0x0000001A, "PIDDSI_CONTENTTYPE" },
{0x0000001B, "PIDDSI_CONTENTSTATUS" },
{0x0000001C, "PIDDSI_LANGUAGE" },
{0x0000001D, "PIDDSI_DOCVERSION" }
}.ToFrozenDictionary();

public static string GetDescription(uint identifier, ContainerType map, IDictionary<uint, string>? customDictionary = null)
Expand Down
Loading