Skip to content

Unload root element if Part.GetStream updates the underlying value #1760

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

Merged
merged 2 commits into from
Jul 26, 2024

Conversation

twsouthwick
Copy link
Member

Fixes #1755

@twsouthwick twsouthwick enabled auto-merge (squash) July 25, 2024 22:56
Copy link

Test Results

    70 files  ± 0      70 suites  ±0   57m 52s ⏱️ +56s
 2 032 tests + 4   2 029 ✅ + 4   3 💤 ±0  0 ❌ ±0 
32 310 runs  +48  32 274 ✅ +48  36 💤 ±0  0 ❌ ±0 

Results for commit cf89336. ± Comparison against base commit cd814ec.

Copy link

@benjaminki benjaminki left a comment

Choose a reason for hiding this comment

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

I'm new to reviewing OpenXml source, but I reviewed these changes and they look good to me. I think the issue I was encountering is related to DOM and SAX used together; I saw my SAX changes not being preserved and I think its because the DOM objects in memory were overwriting them when saving to disk; with these changes I see unloading of DOM object being queued whenever stream is written to. The Unit Test GetStreamWrite looks like a repro of the issue I was facing, so these changes should fix what I was experiencing.

@twsouthwick twsouthwick merged commit 522f9f3 into main Jul 26, 2024
18 checks passed
@twsouthwick twsouthwick deleted the fix-write-create branch July 26, 2024 19:20
twsouthwick added a commit that referenced this pull request Nov 19, 2024
This is fall out from #1760 that removes the loaded part but doesn't check if we're saving an existing root element
twsouthwick added a commit that referenced this pull request Nov 20, 2024
This is fall out from #1760 that removes the loaded part but doesn't
check if we're saving an existing root element

Fixes #1771
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.

Unable to Write Shared String Table Part using OpenXmlWriter
4 participants