-
Notifications
You must be signed in to change notification settings - Fork 554
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
DocumentFormat.OpenXml.Linq namespace-related classes have missing XName fields. #1813
Comments
@twsouthwick and @mikeebowen, any thoughts on this? This is a breaking change for any application using those tags. |
@twsouthwick and @mikeebowen, are there any plans to fix this bug? I guess content controls didn't suddenly disappear in Microsoft Word. To the contrary, the last time I participated in Office add-in community calls, support for content controls was being improved. |
Sorry for the delay. I've started working through the backlog after being focused on a different project (i.e. got a fix for #1814 yesterday). Trying to prioritize the issues that have come in :) |
Thanks, @twsouthwick, I do understand. Just wanted to make sure it is not totally forgotten. |
I got a fix for include the SdtPr and related types. However, I don't see @mikeebowen @tomjebo can you take a look at if those are included? @ThomasBarnekow have you been able to use a strongly typed element for those types? |
This change adds support to the LINQ generator to include base classes and their members so it'll be similar to what was in the 2.x version: - Refactor LINQ generator to use a visitor pattern - Add SdtElement expansion - Visit base types Part of #1813
@twsouthwick, I don't remember using the strongly-typed class for However, the |
P.S.: If the |
That makes sense. I don't see anything in the 2.20 version for that being special cased, but I also don't see it in the generated file: https://github.com/dotnet/Open-XML-SDK/blob/v2.19.0/src/DocumentFormat.OpenXml.Linq/GeneratedCode/W.g.cs. Can you verify that it was actually there? |
We can always add it outside of the generation - if you have a snippet of what it should look like, you can create a PR for the LINQ project to add it (back). |
Just checked. I stand corrected. The |
It looks like the |
Describe the bug
The generated classes in the
DocumentFormat.OpenXml.Linq
namespace (e.g.,W
) are missing certainXName
fields that were still present in previous versions of the SDK (e.g., 2.19.0). For example, the following fields are missing (among possibly others that I did not see):W.sdtPr
W.sdtEndPr
W.tag
To Reproduce
To reproduce, just try to reference any of the above in your code.
Observed behavior
XName
fields are suddenly no longer generated.Expected behavior
All relevant fields should be generated.
Desktop (please complete the following information):
Additional context
3.1.1 is the first release after 3.x that I am trying. I previously used 2.19.0 and possibly 2.20.0. Thus, I don't know exactly when the issue first appeared.
Edit November 22, 2024: It turns out the SmartTag-related fields were not part of 2.19.0:
W.smartTag
W.smartTagPr
The text was updated successfully, but these errors were encountered: