Nested html tags use styles of all elements in stack#433
Nested html tags use styles of all elements in stack#433jakobjoachim wants to merge 3 commits intoopensagres:masterfrom
Conversation
a481950 to
9a3927f
Compare
9a3927f to
bdab62a
Compare
MalteJoe
left a comment
There was a problem hiding this comment.
Not sure about the COMBINED ContainerType.
Otherwise just some formatting issues.
| */ | ||
| public class HTMLTextStylingContentHandler | ||
| extends DefaultHandler | ||
| public class HTMLTextStylingContentHandler extends DefaultHandler |
There was a problem hiding this comment.
Please revert the formatting changes in the whole file
| propertiesList.addAll( spansStack ); | ||
| ContainerProperties result = null; | ||
| for(ContainerProperties properties : propertiesList) { | ||
| if (result == null) { |
There was a problem hiding this comment.
Incnsistent formatting (whitespace around braces, curly braces in new line)
| public static ContainerProperties combine( ContainerProperties p1, ContainerProperties p2 ) | ||
| { | ||
| ContainerProperties result = new ContainerProperties( | ||
| p1.getType() == p2.getType() ? p1.getType() : ContainerType.COMBINED ); |
There was a problem hiding this comment.
Does this implementation lead to problems in ODT when combining Paragraphs?
There was a problem hiding this comment.
I just checked the ODTDocumentHandler.java currently it doesn't support styles from spans at all. So it really makes no difference. There is probably an Issue or there should be an Issue reading the Span Styles as well and when that is implemented the containerType would be read as well.
|
@MalteJoe what do you think about this PR? |
|
@angelozerr As the Formatting Guidelines mentioned in https://github.com/opensagres/xdocreport/wiki/CodeFormatAndConvention are outdated and may be replaced with https://github.com/palantir/palantir-java-format at some point, I will close my comments regarding formatting. There's still one open comment, but it's too old for me to remember what exactly it was about, as I haven't been working with xdocreport for a while now. |
While working on fixing Issue #432 I noticed a Bug when using nested spans with styles:
This HTML Code should produce a bold and italic text
But because only the first item in the stack is used when converting to docx the result is only italic:
should be: