Closed
Description
Describe the bug
Based on my analysis, the Flat OPC and cloning features are "broken" since v3.0.1:
- When creating a Flat OPC document, the resulting
WordprocessingDocument
instances no longer have the relationship parts. - Cloning a
WordprocessingDocument
created from a Flat OPC document or string throws anOpenXmlPackageException
.
To Reproduce
To reproduce, have a look at the OpenXmlSdtTests repo that I created for this purpose. I have created several xUnit-based projects that test the same features for the following versions:
- v2.19.0, where everything works as expected,
- v3.0.0, where everything works as expected after having made the changes related to
Package
being obsolete, - v3.0.1, where the features are first broken, and
- v3.1.1, where the features are still broken.
Observed behavior
- Since v3.0.1,
WordprocessingDocument
instances created usingWordprocessingDocument.FromFlatOpcString(xml)
no longer have the relationship parts. Up to and including v3.0.0, those parts appeared. - Since v3.0.1, cloning a
WordprocessingDocument
instance created usingWordprocessingDocument.FromFlatOpcString(xml)
can no longer be cloned. Calling theClone()
method or its overloads will throw an error.
Expected behavior
- Flat OPC documents are created correctly (as before).
WordprocessingDocument
instances can be cloned (as before).
Desktop (please complete the following information):
- OS: any (tested on macOS and Windows 11)
- Office version: any
- .NET Target: any (tested using .NET 8 and .NET Framework 4.7.2)
- DocumentFormat.OpenXml Version: since v3.0.1
Metadata
Metadata
Assignees
Labels
No labels