Bug 29976 - [PATCH] HSSF hyperlink formula size problem
Summary: [PATCH] HSSF hyperlink formula size problem
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 2.5-FINAL
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2004-07-08 14:41 UTC by Bernard Chesnoy
Modified: 2005-03-20 17:06 UTC (History)
0 users

contains the patch and the test case, format (tar and bz2) (3.25 KB, application/octet-stream)
2004-07-08 14:42 UTC, Bernard Chesnoy
tar and bz2 compression (3.02 KB, application/octet-stream)
2004-08-04 09:10 UTC, Bernard Chesnoy

Note You need to log in before you can comment on or make changes to this bug.
Description Bernard Chesnoy 2004-07-08 14:41:22 UTC
If you give an hyperlink with a size between 127 and 255 length, with the 
sources I got an ArrayOutOfBoundException, and with the binary distribution 
everything goes good until you try to read the .xls, excel can't do it
(unreadable file...).

It seems, that the length is keep in a Byte, so when it is cast in an int it 
gives a negative length. 
Class modified : org.apache.poi.hssf.record.formula.StringPtg
file added : HyperlinkFormula.java a test case
I correct this using an int for the length and a mask to remove all unneeded 
As I'm a newbie tell me if I do something wrong.
Comment 1 Bernard Chesnoy 2004-07-08 14:42:46 UTC
Created attachment 12062 [details]
contains the patch and the test case, format (tar and bz2)
Comment 2 Avik Sengupta 2004-07-08 16:08:41 UTC
thanks in particular for the testcase. I'll check it out. 
Comment 3 Glen Stampoultzis 2004-08-04 01:16:36 UTC
bernard: I'm having trouble untaring your patch.  I'm getting the following errors:

tar: This does not look like a tar archive
tar: Skipping to next header
tar: Archive contains obsolescent base-64 headers
tar: Error exit delayed from previous errors
Comment 4 Bernard Chesnoy 2004-08-04 09:10:42 UTC
Created attachment 12322 [details]
tar and bz2 compression
Comment 5 Bernard Chesnoy 2004-08-04 09:12:36 UTC
The new archive seems to be good, sorry for the inconvenience, I don't what I 
messed up with this file.
Comment 6 Glen Stampoultzis 2004-08-26 03:20:23 UTC
Committed to HEAD