-
Notifications
You must be signed in to change notification settings - Fork 808
feat: read trackChange #808
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
base: trunk
Are you sure you want to change the base?
Conversation
|
Thanks but can you add tests? Have you run the existing tests? Can you provide some background about the change? |
|
-1 from me I think the change tracking should not be hacked as if is a text run. If we were to add such changes, I think they should not be ignored by the parser by default and the change data should be stored in dedicated classes. The last thing we need is to have our POI Word parser returning deleted paragraphs and text as if they were still visible in the doc. |
like this , the 'EF' ins trackChange can‘t read , |
I will try try to veto this change. The change tracking should not be treated like a text run. It needs it own dedicated handling. |
|
If you add test coverage then this can be reviewed but it is bad practice to provide PRs with no description and no tests. |
Got it. I'll proceed with adding test cases. |
| addNewLine = false; | ||
| XWPFRun xRun = (XWPFRun) o; | ||
| // don't include the text if reviewing is enabled and this is a deleted run | ||
| if (xRun.getCTR().getDelTextArray().length == 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use isEmpty() instead of length == 0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will make the corresponding changes here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but Here, it's an array, not a collection.
|
I downloaded the docx in the PR. Word shows the suggested changes but they are just suggestions. They are not the saved state of the document. |
Yes, but the INS (insertion) track changes in XWPFParagraph are being read as TextRun objects. I want them to have consistent behavior (i.e., either all treated as tracked changes or all as final text). |


read trackChange in sdtcontent