Skip to content
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

Fully replace content of XWPFTableCell on setText #503

Closed

Conversation

AntonOellerer
Copy link

Up until now, invoking XWPFTableCell#setText(String) appended the string to a paragraph if one already existed in the cell, contrary to what would be expected.
This is fixed in this commit by first removing all runs and iruns from the paragraph in the cell.

Fixes https://bz.apache.org/bugzilla/show_bug.cgi?id=66988

Up until now, invoking `XWPFTableCell#setText(String)` appended the string
to a paragraph if one already existed in the cell, contrary to what would
be expected.
This is fixed in this commit by first removing all runs and iruns from
the paragraph in the cell.
Using `.clear` does not work for the list returned by `getRuns`,
so it was rewritten to use the provided `removeRun` method.
@asfgit asfgit closed this in 1bdfdcc Aug 18, 2023
@pjfanning
Copy link
Contributor

This broke an existing test called test63624 - I'll rewrite that test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants