https://bz.apache.org/bugzilla/show_bug.cgi?id=63463
--- Comment #12 from David Gauntt <[email protected]> --- There are some policy issues to decide before finishing my patch of shiftMergeRegions. My current version passes the test cases that I wrote for merge regions that are unaffected by a shift, merge regions that are entirely overwritten by a shift, and merge regions that are moved but not resized. However, there are some ambiguous cases for which I have a couple of proposed rules: 1) If it is possible to define a merge area after the shift so it contains all cells that have not been overwritten and that were in the original merge area, and it does not contain any cells that were not in the original region, then the new merge area is kept. However, if it is not possible to define a new merge area this way, the merge area is deleted. 2) If the shift has caused the first cell in the merge area to be overwritten, or if the first cell in the merge area after the shift is different than the first cell below the shift, the value in the first cell before the shift is copied to the first cell after the shift. Are there any objections to using these rules while implementing shiftMergeRegions? I have some examples to illustrate these rules (the row indices in these examples are one-based): 1) The merge area is A5:A8, and rows 1 to 4 are shifted downward 2 rows, overwriting A5 and A6. The value in A5 would be copied to A7, and the merge range be shrunk to A7:A8. 2) The merge area is A1:A4, and rows 5 to 7 are shifted upward 2 rows overwriting rows 3 and 4, the merge are would be shrunk to A1:A2. 3) The merge area is A1:A4, and rows 1 to 2 are shifted downward 4 rows, overwriting rows 5 and 6. The merge area is now A3:A6, and the value in the original A1 is copied to A3. 4) The merge area is A1:A3, and rows 1 to 2 are shifted downward 4 rows. The cells in the original merge area are now at locations A3, A5, and A6. Since they are not contiguous, the merge area is deleted. 5) The merge area is A4:A7, and rows 5 and 6 are shifted upward 4 rows, overwriting rows 1 and 2. The cells in the original merge area are now at A1, A2, A4, and A7. The merge area is deleted. -- 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]
