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

Rework the handling of FMTID0 in OlePropertiesContainer #220

Merged
merged 1 commit into from
Nov 18, 2024

Conversation

Numpsy
Copy link
Contributor

@Numpsy Numpsy commented Nov 17, 2024

As #142 but against v3.0 and with an extension to one of the unit tests to test that it retains the fmtid for a file with an 'app specific' (i.e not a known value) value,

@@ -36,6 +48,7 @@ public OlePropertiesContainer(int codePage, ContainerType containerType)
};

ContainerType = containerType;
FMTID0 = FmtIdFromContainerType(containerType);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There was a previous suggestion to add a constructor that allows users to specify the fmtid to use rather than inferring it such that values the library doesn't know about can be used, but I don't need tht ability myself so I never spent any time on it.
Could be done later if useful though

/// <summary>
/// Gets the FMTID of the properties container.
/// </summary>
public Guid FMTID0 { get; }

public PropertyContext Context { get; }

private readonly List<OleProperty> properties = new();
internal Stream? cfStream;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

A thought when looking at this - is there actually a need to keep the stream as a member?

@jeremy-visionaid jeremy-visionaid merged commit a311f64 into ironfede:master Nov 18, 2024
2 checks passed
@Numpsy Numpsy deleted the 3.0/fmtid2 branch November 18, 2024 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants