Add flag to ColumnText to control if words are chopped or Throw exception instead of arbitrarily chopping long words#1297 #1379
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.
Feature to address issue #1297 Throw exception instead of arbitrarily chopping long words
I added a flag to ColumnText that defaults to current behavior, but if the flag setStrictWordWrapping(true) then it throws a StrictWordWrapException when this condition occurs.
Unit-Tests for the new Feature/Bugfix
The following code can be used to reproduce the bug/feature. Toggle column.setStrictWordWrapping() between true and false to test this issue.
Compatibilities Issues
Is anything broken because of the new code? No
Any changes in method signatures? no, but in BidiLine I did have to overload processLine()
Your real name
Please specify your full name here, so that we can verify your identity. - Chris Simoes
If you have a conflict of interest describe this here also. - no conflicts of interest
Testing details
Any other details about how to test the new feature or bugfix? I believe the code above does a good job reproducing the issue.