https://issues.apache.org/bugzilla/show_bug.cgi?id=51703
Bug #: 51703
Summary: IllegalArgumentException when applying font
Product: POI
Version: 3.8-dev
Platform: PC
OS/Version: Linux
Status: NEW
Severity: major
Priority: P2
Component: HSSF
AssignedTo: dev@poi.apache.org
ReportedBy: jan.stette@gmail.com
Classification: Unclassified
I have seen POI failing to read several spreadsheets, with the following stack
trace:
Caused by: java.lang.IllegalArgumentException: Start index must be less than
end index.
at
org.apache.poi.hssf.usermodel.HSSFRichTextString.applyFont(HSSFRichTextString.java:139)
at
org.apache.poi.hssf.record.TextObjectRecord.processFontRuns(TextObjectRecord.java:157)
at
org.apache.poi.hssf.record.TextObjectRecord.<init>(TextObjectRecord.java:133)
at sun.reflect.GeneratedConstructorAccessor45.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at
org.apache.poi.hssf.record.RecordFactory$ReflectionConstructorRecordCreator.create(RecordFactory.java:57)
... 20 more
Debugging it, it looks like there's a text record which has a font applied,
where the length of the text string is 42 characters (in one of the examples),
but the index for where to apply the font is 60. The cases I've seen this
being a problem all seem related to a floating graphic containing a formatted
string only, but I don't know if that's definitely the cause of it as I haven't
been able to reproduce this in a simple spreadsheet that I've created myself.
I'm afraid the spreadsheets I have that produce this problem can't be provided
as they contain confidential data.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
|