https://bz.apache.org/bugzilla/show_bug.cgi?id=59186
Bug ID: 59186
Summary: Wrong validation check in
XSSFDrawing.createCellComment()
Product: POI
Version: 3.13-FINAL
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: XSSF
Assignee: [email protected]
Reporter: [email protected]
The XSSFDrawing.createCellComment contains this validation check:
if(comments.findCellComment(ref) != null) {
throw new IllegalArgumentException("Multiple cell comments in one
cell are not allowed, cell: " + ref);
}
This is wrong because this assumes the comment is added to the col1 and row1.
But this is the anchor only and does not necessarily mean that this comment is
added to this cell. Real life sample from Excel 2010:
<x:ClientData ObjectType="Note">
<x:MoveWithCells/>
<x:SizeWithCells/>
<x:Anchor>
2, 15, 1, 14, 3, 55, 5, 21</x:Anchor>
<x:AutoFill>False</x:AutoFill>
<x:Row>2</x:Row>
<x:Column>1</x:Column>
<x:Visible/>
</x:ClientData>
In this the anchor is cell C2 (col 2, row 1) but the comment is set for cell B3
(col 1, row 2).
So this validation check has to be removed.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]