This is a follow-up of bug 123714 that I found testing the bug. Steps to reproduce: 1. Open attachment 149604 [details] from bug 123714 2. Select A2:A3 with the mouse 3. Drag & Drop it to Column B 4. Column E is updated -> bug 123714 5. Undo -> Column E updates the formula from =$C3*B3*E$1 to =$C3*A3*E$1 Reproduced in Version: 6.3.0.0.alpha0+ Build ID: 82463bdde75447d45e0cd6ed9ab579e0e51ea912 CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: x11; Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US Calc: threaded
Regression introduced in range https://cgit.freedesktop.org/libreoffice/core/log/?qt=range&q=a12de5aab0c2f1553086de13a7bdb92fac81ee70..364ac5acf491ce4654ff9ca85fc416343b55b685
repro in Version: 6.3.0.0.alpha0+ (x64) Build ID: 5a907fe76bc628629fddb5501727642468d38dae CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; TinderBox: Win-x86_64@42, Branch:master, Time: 2019-03-22_00:18:04 Locale: ru-RU (ru_RU); UI-Language: en-US Calc: threaded
in ver.: 2019-03-30_02:16:1, unthreaded, win x64, with similar sheet after drag and drop and undo formula is ok, but calculation not refreshed - 'repaint problem'? - ctrl-shift-F9 works, and autocalculate works on further changes ...
sorry, i was wrong, pls. ignore comment #3, in ver.: 2019-03-30_02:16:1 after drag and drop the formula in col. E is 'wrong' - deviating from previous state - , it is right after an undo of copy and paste, drag and drop behaves like a new move?, i wonder whether it's possible to do adequate changes in formulae and references with any combination of nested formulae and referenced ranges? and to keep that intuitive to users expectations, but that's another question. undo should restore the previous state.
@Dennis, I thought you might be interested in this issue...
boiling down: it's quite a special problem, xisco showed fine detective skills finding it, it depends on moving more than one cell, and on moving it with the mouse, it depends on moving inside the same row, it doesn't depend on complex formulae or '$'-absolute references, simpler sample: '2' in A1, A2 '=B1' in C1 copy C1 to C2 drag and drop A1:A2 to B1:B2 undo by ctrl-z formula in C1 and C2 is not 'restored', but 'adapted' to the 'new move' moving single cells (e.g. A1 to B1) or 'diagonal moves' in similar longer columns (e.g. three lines as above and move A1:A2 to B2:B3) can be undone correctly, assumption: the code area around 'shared formulae' doesn't consist of one clean concept but of plenty patches just not covering this special action, assumption II: there might be more special cases not yet covered, proof that it's 'related' to 'SFP' (shared formulae problem): place empty lines between the rows and watch the bug being 'fixed', i may be totally wrong with the above, not with the following, evident truth: it's impossible to check the correctness of a complex program by testing and verifying all possible actions (you can't check unlimited possibilities in limited time), thus 'bug hunting' can only give hints towards weaknesses, validation of the code requires analytic check of the structures tests done with ver: Version: 6.3.0.0.alpha0+ (x64) Build ID: 9956cf0692058414ef3efdb0e8058fbb0b39f6bc CPU threads: 8; OS: Windows 6.1; UI render: default; VCL: win; TinderBox: Win-x86_64@42, Branch:master, Time: 2019-04-04_02:20:31 Locale: de-DE (de_DE); UI-Language: en-US Calc: (identical behaviour with 'threaded' on) reg. b.
Dennis Francis committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/+/9079da7f62febaf4cef0b77320c31b4e8bb6b5a5%5E%21 tdf#124326 : ScUndoDragDrop : don't do update references... It will be available in 6.3.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Dennis Francis committed a patch related to this issue. It has been pushed to "libreoffice-6-2": https://git.libreoffice.org/core/+/559dadd0d6eaa61dab7e0bc2a510b87b7109be22%5E%21 tdf#124326 : ScUndoDragDrop : don't do update references... It will be available in 6.2.4. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Verified in Version: 6.3.0.0.alpha0+ Build ID: 31ac398cfa30694b18240d31df17a58d699b5bf6 CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US Calc: threaded @Dennis Francis, thanks for fixing this issue!
Dennis Francis committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/+/22f4ad10ff9caef430ede01dc3acfe5fdf512d9b%5E%21 unit-test for tdf#124326 It will be available in 6.3.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.