Fix Shared Strings Table parsing when using SST cache#105
Merged
monitorjbl merged 2 commits intomonitorjbl:masterfrom Aug 17, 2017
Merged
Fix Shared Strings Table parsing when using SST cache#105monitorjbl merged 2 commits intomonitorjbl:masterfrom
monitorjbl merged 2 commits intomonitorjbl:masterfrom
Conversation
3d2be39 to
28eac55
Compare
Owner
|
Looks good to me! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR fixes three issues I encountered using the SST cache feature due to errors parsing
xl/sharedStrings.xml:Truncated text where eg.
B1 is Blank --->was being parsed asB1 is Blank ---. The XML parser was parsing the>at the end of the string as a second XMLEvent which the code ignored. Fixed by usingXMLEventReader.getElementText()instead ofXmlEventReader.nextEvent().asCharacters(). Example input:The issue with blank strings described in com.sun.xml.internal.stream.events.EndElementEvent cannot be cast to javax.xml.stream.events.Characters #100. This is fixed by using
XMLEventReader.getElementText(). Example input:Strings with rich text formatting were getting dropped. Fixed by adding code to parse the
<r><t>...</t></r>pattern (Rich Text Run). Note that the new code still drops the formatting. Example input: