Summary: | add the comment large than 1024, the excel will only display the last 1024 comments | ||
---|---|---|---|
Product: | POI | Reporter: | ZhibinFang <silencon> |
Component: | HSSF | Assignee: | POI Developers List <dev> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | 3.10-FINAL | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | All |
Description
ZhibinFang
2014-08-14 07:21:06 UTC
i fixed this problem. Would you mind creating a patch or sharing how you fixed the problem please? This issue has come up a few times and since I also need more than 1024 comments in my project it would be good for it to be fixed once and for all. (In reply to Darren Roberts from comment #2) > Would you mind creating a patch or sharing how you fixed the problem please? > > This issue has come up a few times and since I also need more than 1024 > comments in my project it would be good for it to be fixed once and for all. the class HSSFShape HSSFShapeGroup HSSFComment will set the shape id through the setSharpId method, the setSharpId value is sharpId % 1024, this is the problem. HSSFPatriarch's createCellComment method will call the class EscherAggregate's addTailRecord method finally. the addTailRecord is: tailRec.put(note.getShapeId(), note); the tailRec is the LinkedHashMap<Integer, NoteRecord> object. the type of map key is Integer. the key's value is note.getShapeId(). the key --> sharpId % 1024 --> the value of key will be repeated. the size of the tailRec is 1024 forever. this is the point of the problem. |