Bug 160369 - Group anchored to cell below hidden row moves to next cell at save (+ visual left behind, so seems unselectable)
Summary: Group anchored to cell below hidden row moves to next cell at save (+ visual ...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.1.0.0.alpha1+
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Regina Henschel
URL:
Whiteboard: target:24.8.0 target:24.2.3
Keywords: bibisected, bisected, regression
: 160231 (view as bug list)
Depends on:
Blocks: Anchor-and-Text-Wrap Save Grouped-Objects
  Show dependency treegraph
 
Reported: 2024-03-26 03:52 UTC by Stéphane Guillou (stragu)
Modified: 2024-04-17 01:14 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
minimal reproducer: group anchored in cell below a hidden row (48.67 KB, application/vnd.oasis.opendocument.spreadsheet)
2024-03-26 08:11 UTC, Stéphane Guillou (stragu)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stéphane Guillou (stragu) 2024-03-26 03:52:29 UTC
Steps:
1. Open attachment 193145 [details]
2. Go to C106
3. Click the group of pictures (see that it is anchored to cell C106)
4. Save (don't reload)

Result: the group's handles and the anchor indicator are now in cell C107. If the selection is still active, one can move the object and the view refreshes. If it isn't active, the user has no idea why the visible group in C106 is not selectable (and it even isn't selectable by clicking blindly in its new position).
If the document is reloaded, group is back in correct cell.

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 1344e6261a1d856c71eca1e0cc29215a586bf335
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: CL threaded

Same for gen VCL plugin, same on Windows 11. Started in 7.1.

History:

- linux-64-7.1 bibisect repo, build [14085ca9b4d968e12730ae717ab0232a980eb4cf], commit bba0cd79984875124f8d43d05d4cdb7f63517e77: group moved to cell C107 on save, restored on reload.

commit bba0cd79984875124f8d43d05d4cdb7f63517e77
author	Regina Henschel 	Thu Nov 19 21:16:33 2020 +0100
committer	Regina Henschel 	Fri Nov 20 10:17:17 2020 +0100
Replace matrix translate with object Move
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106189

- linux-64-7.4 bibisect repo, build [52fa65a60081b2bc10aba220778b8daaabf9bdfb], commit 9a850dd9f3c221660b6259bdfd64a77343f2256c: group moved, but the pictures remain visible in cell C106.

commit 9a850dd9f3c221660b6259bdfd64a77343f2256c
author	Noel Grandin 	Wed Jan 12 10:27:38 2022 +0200
committer	Noel Grandin 	Wed Jan 12 14:45:30 2022 +0100
used cache value in ViewObjectContact::getPrimitive2DSequence (2nd attempt)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128319

Regina, can you please have a look?
Noel, thought you might be interested in how your commit ties in.
Comment 1 Stéphane Guillou (stragu) 2024-03-26 03:56:03 UTC
"new" as per bibisect.
Comment 2 Stéphane Guillou (stragu) 2024-03-26 04:32:22 UTC Comment hidden (obsolete)
Comment 3 Stéphane Guillou (stragu) 2024-03-26 04:33:57 UTC
(In reply to Stéphane Guillou (stragu) from comment #0)
> If the document is reloaded, group is back in correct cell.
... but if the document is saved as _second_ time, the wrong position sticks.
See duplicate bug 160231 comment 18, where this started.
Comment 4 Stéphane Guillou (stragu) 2024-03-26 07:49:41 UTC
*** Bug 160231 has been marked as a duplicate of this bug. ***
Comment 5 Stéphane Guillou (stragu) 2024-03-26 07:54:09 UTC
An extra detail: every subsequent save will continue moving the problematic groups one cell down.
Groups in many rows are affected, e.g. 112, 115, 144, 150, 151, etc.
Comment 6 Stéphane Guillou (stragu) 2024-03-26 08:11:57 UTC
Created attachment 193309 [details]
minimal reproducer: group anchored in cell below a hidden row

Minimal reproducer:
1. Open 
2. Save
3. Zoom in and out to refresh the view
4. Repeat save and zoom

Result: group keeps moving down, anchoring changes to whatever cell is below top left corner of group. Reloading only moves it up one step.
Comment 7 Regina Henschel 2024-04-02 11:43:27 UTC
I'll look at it.
Comment 8 Commit Notification 2024-04-08 13:51:11 UTC
Regina Henschel committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/1e1b1d46155163380252093d9d2868351236ce0e

tdf#160369 Do not broadcast temporarily group change

It will be available in 24.8.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.
Comment 9 Commit Notification 2024-04-08 15:32:46 UTC
Regina Henschel committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

https://git.libreoffice.org/core/commit/4e04b442e037a2f679b4cfe26c3e6b1c66ee8642

tdf#160369 Do not broadcast temporarily group change

It will be available in 24.2.3.

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.
Comment 10 MB 2024-04-13 04:43:56 UTC Comment hidden (obsolete)
Comment 11 MB 2024-04-13 04:44:47 UTC Comment hidden (obsolete)
Comment 12 Regina Henschel 2024-04-13 11:12:19 UTC Comment hidden (obsolete)
Comment 13 MB 2024-04-13 17:23:36 UTC Comment hidden (obsolete)
Comment 14 Stéphane Guillou (stragu) 2024-04-15 15:26:18 UTC
(In reply to MB from comment #13)
Thanks for reporting back, and glad it works for you.
If you want to avoid bug 160329, make sure you do any sorting without hidden rows.
Marking as "verified".
Comment 15 MB 2024-04-16 16:36:24 UTC Comment hidden (obsolete)
Comment 16 Stéphane Guillou (stragu) 2024-04-17 01:14:12 UTC Comment hidden (obsolete)