ironfede / openmcdf

Microsoft Compound File .net component - pure C# - netstandard 2.0
Mozilla Public License 2.0
308 stars 76 forks source link

Add a function to create a new UserDefinedProperties section in a OLE… #120

Closed Numpsy closed 1 month ago

Numpsy commented 7 months ago

…PropertiesContainer

refs #104

As it stands, if there is an existing DocumentSummaryInfo section in a document, but it has no UserDefinedProperties, then it doens't seem to be possible to add a new UserDefinedProperties (UserDefinedProperties and HasUserDefinedProperties both have private setters).

So, I think there should be a function to add a new UserDefinedProperties fo a DocumentSummaryInfo section?

Question: Should it just be possible to create a new UserDefinedProperties if one doesn't exist already, or should it be possible to replace any existing value with a new one?

On a related note, maybe there is a related question on if a means of deleting an existing UserDefinedProperties from a file would be useful?

ironfede commented 1 month ago

@Numpsy , I think that all functions you've mentioned are absolutely useful and correctly integrated. If you think this PR is ok I'm going to merge. Please let me know. Many thanks as usual!

Numpsy commented 1 month ago

I've been using the change, and it's been working for me.

If a function to remove an existing UserDefinedProperties would be useful, that could be done seperately.