You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2014/10/16 04:25:28 UTC

[Bug 56852] add the comment large than 1024, the excel will only display the last 1024 comments

https://issues.apache.org/bugzilla/show_bug.cgi?id=56852

--- Comment #3 from zhibin fang <si...@gmail.com> ---
(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.

-- 
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