Created attachment 80947 [details] testcase Please see attached file: goal is to copy the content of D and E and insert it before D, while the original D and E are move to the right (so to F and G) reproduce: - mark D1:E14 - copy - mark cell D1 - right click on D1 and "Paste Special" Shift cell is grayed out. Expected behavior: enable the user to shift D and E to the right or even down. If you right click on B1 and click on "Paste Special" Shift cells is available and if you choose "Right" it copies D and E before B, while shifting B:E to the right.
Regression, worked in 3.6.6
*** Bug 65957 has been marked as a duplicate of this bug. ***
(In reply to comment #0) Eike, I think know the cause of this behaviour, my patch for bug 56098. I rewrote the checks to be performed before enabling shift options in the paste special dialog. By doing this I disabled the shift options when source range and destination range intersect, both for cut and for copy mode, on the assumption that the outcome could be unwanted (especially with references and the like). Before my patch, disabling the shift options was for cut mode only. I have a patch ready in which intersection of source and destination range will not disable the shift options (and will still disable in case of cut mode). However, before submitting that patch I would like confirmation that intersection of source and destination range is not a problem when copying.
Created attachment 81386 [details] testcase with problems when shift cells is enabled When shift cells is enabled in paste special for copy-mode, the following problem(s) occur: 1. open attachment 2. select range C2:D4 3. select B2 4. open paste special dialog and select shift right (of course only possible with modified code) 5. paste Result is as expected for rows 3 and 4, but not for row 2. Contents of row 2 are [celladdress, content, result]: [B2, =$B2, Err:522] [C2, =A2, 0] [D2, 1, 1] [E2, =$D2, 1] [F2, =D2, 1] The absolute reference in B2 has not been moved with the shift-cells. The relative reference in C2 has been kept relative to the destination and not kept relative to the source. IMHO this either is another bug or disabling the shift cells in paste special for copy-mode is correct when source and destination overlap. @Eike, Your expert opinion is highly appreciated. The code change is simple: core/sc/source/ui/view/cellsh1.cxx, line 1294 if ( aSource.Intersects( aDest ) ) must be changed to if ( pOwnClip->GetDocument()->IsCutMode() && aSource.Intersects( aDest ) ) to enable shift cells for copy-mode.
(In reply to comment #4) I found out that the described behaviour has nothing to do with overlapping source and destination area; it is a problem as described in bug 44383. I will submit patch for paste special shift cell options in case of copy-mode.
(In reply to comment #5) > (In reply to comment #4) > I found out that the described behaviour has nothing to do with overlapping > source and destination area; it is a problem as described in bug 44383. Note that the original description and testcase says that when special-pasting to B1 instead of D1 or C1 the shift-cells option is not disabled, this actually does depend on whether the destination range overlaps the original range. When copy&pasting one column only (e.g. copy E1:E14) it can't be shift-pasted onto E1 but to all other columns.
The patch indeed fixes the original problem. For the other problem you mentioned (I confused your earlier description with the original submission in my previous comment, sorry) how cell references are updated bug 44383 contains descriptions, especially see https://bugs.freedesktop.org/show_bug.cgi?id=44383#c10
Winfried Donkers committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=e513fffeac1f4a814f644f156d88fc8810af4e46 fdo#65856 allow shift cells in paste special for copy-mode The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Winfried Donkers committed a patch related to this issue. It has been pushed to "libreoffice-4-1": http://cgit.freedesktop.org/libreoffice/core/commit/?id=253052788a9f99af782be3ec30a6812b5922ff28&h=libreoffice-4-1 fdo#65856 allow shift cells in paste special for copy-mode It will be available in LibreOffice 4.1. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Winfried Donkers committed a patch related to this issue. It has been pushed to "libreoffice-4-0": http://cgit.freedesktop.org/libreoffice/core/commit/?id=e51def95b7b2d7627d97ca898846f3d3be791b3d&h=libreoffice-4-0 fdo#65856 allow shift cells in paste special for copy-mode It will be available in LibreOffice 4.0.5. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Zdeněk Crhonek committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=826d9839e0f24631b330737b86fa520d7d8c5dd1 uitest for bug tdf#65856 It will be available in 6.1.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
The test exist, set status to Verified.