Bug 155093 - Pasted objects copied with cells are not accessible in Navigator because they are not assigned new names
Summary: Pasted objects copied with cells are not accessible in Navigator because they...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.6.0
Keywords:
Depends on:
Blocks: Navigator Shapes
  Show dependency treegraph
 
Reported: 2023-04-30 17:21 UTC by Regina Henschel
Modified: 2023-12-06 10:04 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Source for copy and paste (14.46 KB, application/vnd.oasis.opendocument.spreadsheet)
2023-04-30 17:21 UTC, Regina Henschel
Details
Before and after (152.83 KB, image/png)
2023-05-07 18:38 UTC, BogdanB
Details
the right screenshot (146.34 KB, image/png)
2023-05-07 18:41 UTC, BogdanB
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2023-04-30 17:21:49 UTC
Created attachment 187015 [details]
Source for copy and paste

Open attached document. Open the Navigator and make sure you can access each of the three shapes.
Mark the yellow area and copy it to clipboard.
Go to a cell below, e.g. B7.
Paste the clipboard.
Look at Navigator. It lists three additional shapes as expected. But double-click on one of the new ones selects the shape of the source area. The reason is, that the new shapes have the same name as the original ones.

Expected: The new shapes get individual new names, so that they can be accessed with the Navigator.
Comment 1 Telesto 2023-05-01 07:18:20 UTC
Confirm
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 066b23115c2a360507e306a88da572554daefab7
CPU threads: 8; OS: Mac OS X 12.6.3; UI render: Skia/Raster; VCL: osx
Locale: nl-NL (nl_NL.UTF-8); UI: en-US
Calc: threaded
Comment 2 Stéphane Guillou (stragu) 2023-05-03 14:22:45 UTC
Also affects Linux, repro on recent master build:

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

Same in OOo 3.3, so issue is inherited.

If the shapes are copied and pasted without the cells, they get assigned new names as expected.

Jim, you fixed the naming of copy-pasted objects back in 6.4 with commit 9f86b320a997c77069cf93dcb32fb71f09ad1348 for bug 125191. Do you think you could have a look at this corner case?
Comment 3 Jim Raykowski 2023-05-05 07:54:05 UTC
Proposed patch is ready for review here:
https://gerrit.libreoffice.org/c/core/+/151416
Comment 4 Regina Henschel 2023-05-05 14:05:57 UTC
I'm working in that area for bug 139083, see https://gerrit.libreoffice.org/c/core/+/150161
The patch contains a larger change in the way objects which are included in a cell range are pasted. It should fix this problem here too.
Comment 6 BogdanB 2023-05-07 18:38:46 UTC
Created attachment 187131 [details]
Before and after

Thanks Regina, now they are well numbered.

Verified in
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 4f93995f2262cde0b16bacc83f4ba3c6161ada7f
CPU threads: 16; OS: Linux 5.19; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded

Bad in
Version: 7.5.3.2 (X86_64) / LibreOffice Community
Build ID: 9f56dff12ba03b9acd7730a5a481eea045e468f3
CPU threads: 16; OS: Linux 5.19; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded
Comment 7 BogdanB 2023-05-07 18:41:08 UTC
Created attachment 187132 [details]
the right screenshot

In fact this is the right screenshot showing the wrong selection when clicked on the first element after paste.