Open
Conversation
huan086
pushed a commit
to huan086/Open-Xml-PowerTools
that referenced
this pull request
Sep 17, 2024
* Enabled building & testing with ubuntu * Cleaned up code
knilecrack
added a commit
to knilecrack/Open-Xml-PowerTools
that referenced
this pull request
Jan 28, 2026
…mparer This commit addresses two issues: 1. XDocument Mutation (Issue OpenXmlDev#3): - WmlDocument.MainDocumentPart and PtMainDocumentPart.WordprocessingCommentsPart were removing nodes from cached XDocuments, causing subsequent GetXDocument() calls to return empty documents within the same package lifetime - Fixed by cloning the root element before extracting and removing child nodes - Location: WmlDocument.cs lines 67-81 and 20-37 2. Duplicate Singleton Relationships: - WmlComparer.MoveRelatedPartsToDestination was creating duplicate relationships for singleton parts (fontTable, styles, numbering, settings, webSettings, theme) - This caused validation errors: "can only have one instance of relationship that targets part fontTable" - Fixed by checking if a singleton relationship already exists and reusing it instead of creating a duplicate - Location: WmlComparer.cs MoveRelatedPartsToDestination method Test Results: - Fixed 2 WmlComparer tests (RC-0020, WCB-1740) that were failing with fontTable errors - Improved from 22 failing tests to 20 failing tests (956 -> 958 passing) - Remaining failures are unrelated to these issues Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added on transform action in the HTML to WML converter. It provides a way for injecting a custom logic for the transformation via the settings object.