Bug 56260

Summary: Fix some common causes of "Found a TextHeaderAtom not followed by a TextBytesAtom or TextCharsAtom: Followed by "
Product: POI Reporter: Nick Burch <apache>
Component: HSLFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 3.11-dev   
Target Milestone: ---   
Hardware: PC   
OS: Linux   

Description Nick Burch 2014-03-14 10:06:24 UTC
This one has come up a few times, both on our lists and elsewhere, eg:

https://jira.atlassian.com/browse/CONF-18721
http://apache-poi.1045710.n5.nabble.com/Found-a-TextHeaderAtom-not-followed-by-a-TextBytesAtom-or-TextCharsAtom-Followed-by-3999-td2289102.html
http://blog.gmane.org/gmane.comp.jakarta.poi.devel/month=20100901

It seems there are a few common causes of this warning, where the file isn't quite as we expect, but it's close enough that we can still work with it. We should handle those cases, so that the warning remains only for cases which really need flagging up
Comment 1 Nick Burch 2014-03-15 08:20:13 UTC
Hopefully fixed in r1577803.

We now skip over "empty" TextHeaderAtoms, where there's no records before the next TextHeaderAtom

If there's a TextRulerAtom / MasterTextPropAtom / TextSpecInfoAtom before the Text Chars / Bytes, we skip over those