Summary: | [PATCH] XSSFSheet.validateArrayFormulas incorrect and incomplete range intersection check | ||
---|---|---|---|
Product: | POI | Reporter: | Yaniv Kunda <yaniv> |
Component: | XSSF | Assignee: | POI Developers List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | normal | Keywords: | PatchAvailable |
Priority: | P2 | ||
Version: | 3.11-dev | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All | ||
Attachments: |
fixes incorrect intersection check
fixes incorrect and incomplete intersection check |
Description
Yaniv Kunda
2014-09-11 10:09:44 UTC
Created attachment 32001 [details]
fixes incorrect intersection check
Any chance of a small junit unit test which shows the problem? That'll help us verify the fix, and ensure it stays correct in the future Created attachment 32003 [details]
fixes incorrect and incomplete intersection check
I realized the intersection check is flawed, as it only detected if one of two corners of the region are in the arrayRange, where there are many cases where two rectangles can intersect.
- Modified BaseTestSheetUpdateArrayFormulas.testModifyArrayCells_mergeCells to test a few more cases (including positive testing)
- Added CellRangeAddressBase.intersects(CellRangeAddressBase other) to correctly check intersection
- Fixed both XSSFSheet and HSSFSheet to use the new method
|