Bug 61727 - [PATCH] CellRangeUtil Merge cell ranges broken
Summary: [PATCH] CellRangeUtil Merge cell ranges broken
Alias: None
Product: POI
Classification: Unclassified
Component: SS Common (show other bugs)
Version: 3.16-FINAL
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2017-11-06 13:01 UTC by Sven Rieckhoff
Modified: 2017-12-27 21:20 UTC (History)
0 users

patch created using "ant -f patch.xml" (1.31 KB, application/x-gzip)
2017-11-06 13:01 UTC, Sven Rieckhoff

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Rieckhoff 2017-11-06 13:01:24 UTC
Created attachment 35496 [details]
patch created using "ant -f patch.xml"

The merge functionality of cell ranges in org.apache.poi.ss.util.CellRangeUtil.mergeCellRanges(CellRangeAddress[]) is broken: some of the provided input cell ranges get lost during merge under circumstances.

Example: Merge of cell ranges (A1), (B1) and (A2) results in cell ranges (A1:A2). (B1) gets lost.

The Patch provides test cases revealing the broken merge functionality and testing its fix in CellRangeUtil. The patch was created using "ant -f patch.xml".
Comment 1 Javen O'Neal 2017-11-06 19:52:11 UTC
Applied in r1814432. Thanks for the patch.
Comment 2 Dominik Stadler 2017-12-27 21:20:48 UTC
This seems to be applied already, so setting to resolved.