Bug 60384 - ShiftRows unexpected deletion of mergedRegions (due to 59740)
Summary: ShiftRows unexpected deletion of mergedRegions (due to 59740)
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: SS Common (show other bugs)
Version: 3.15-FINAL
Hardware: PC Linux
: P2 regression (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
: 60709 61163 (view as bug list)
Depends on: 59740
Blocks: 56454
  Show dependency tree
 
Reported: 2016-11-16 16:46 UTC by Fabio
Modified: 2017-08-19 16:38 UTC (History)
2 users (show)



Attachments
Template for use case (6.46 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2016-11-16 16:46 UTC, Fabio
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fabio 2016-11-16 16:46:32 UTC
Created attachment 34455 [details]
Template for use case

Due to https://bz.apache.org/bugzilla/show_bug.cgi?id=59740 merged regions are disappearing even when no overlap was created.

Typical use case:
You have a template like attached with a merged region in row 9.
Row 3 is "template-row":
1. It either gets removed (no prameter)
2. Or it gets filled with just 1 parameter
3. Or it gets duplicated and filled for each parameter

Since I have to add or remove rows with sheet.shiftRows(3, sheet.getLastRowNum(), n), the merged region in row 9 simply gets deleted.

Merged regions that do not create an overlap with another merged region should not be deleted just like that. I expect the merged region to shift just like it did in POI < 3.15
Comment 1 Dominik Stadler 2017-08-19 15:34:27 UTC
*** Bug 60709 has been marked as a duplicate of this bug. ***
Comment 2 Dominik Stadler 2017-08-19 16:34:36 UTC
This should be fixed again via r1805518, we now check differently if the merged reagion is overwritten or moved along by the shifting, this should make these cases work better.

Please note that there is discussion about a more complete implementation of handling of merged regions in bug #56454.
Comment 3 Dominik Stadler 2017-08-19 16:38:27 UTC
*** Bug 61163 has been marked as a duplicate of this bug. ***