When testing adding or modifying properties, I noticed that new or modified string properties weren't getting null terminated, and that was causing issues with office apps like powerpoint which were showing truncated property values.
I went to add the null values, but it isn't quite that simple as any properties that OpenMxdf has read itself will retain the null terminators from the originating file whereas new values supplied by a user generally won't, so - try to check if the value has a trailing null already and only write an extra one if not.
This seems to work, though i'm not 100% sure on the situation with empty strings (The Windows native compound doc apis seem to set a length of 1 and include a null for empty string properties, so I've done the same)
refs #47
When testing adding or modifying properties, I noticed that new or modified string properties weren't getting null terminated, and that was causing issues with office apps like powerpoint which were showing truncated property values.
I went to add the null values, but it isn't quite that simple as any properties that OpenMxdf has read itself will retain the null terminators from the originating file whereas new values supplied by a user generally won't, so - try to check if the value has a trailing null already and only write an extra one if not.
This seems to work, though i'm not 100% sure on the situation with empty strings (The Windows native compound doc apis seem to set a length of 1 and include a null for empty string properties, so I've done the same)