Bug 160003 - Copying a sheet with chart and pasting to other document's sheet with a different name looses chart
Summary: Copying a sheet with chart and pasting to other document's sheet with a diffe...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.6.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:24.8.0 target:7.6.6 target:24.2.2
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Chart Paste
  Show dependency treegraph
 
Reported: 2024-03-02 20:02 UTC by Mike Kaganski
Modified: 2024-03-04 21:04 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Two sheets with charts (18.71 KB, application/vnd.oasis.opendocument.spreadsheet)
2024-03-02 20:02 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2024-03-02 20:02:52 UTC
Created attachment 192917 [details]
Two sheets with charts

1. On a non-default sheet, create a chart (the attachment already has it on Sheet2).
2. Select everything on the sheet (Ctrl+A)
3. Copy to clipboard (Ctrl+C)
4. Create a new spreadsheet document
5. Paste to the default sheet Sheet1 (Ctrl+V)

Since 7.6, the chart is lost on the paste.
Comment 1 m_a_riosv 2024-03-03 02:17:30 UTC
Reproducible. Seems the OLE objects are not selected with [Ctrl+A].
The same issue happens with Math.

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 0daeee1a7d0e530f1cce40f86a26ed01f07ee7da
CPU threads: 16; OS: Windows 10.0 Build 22631; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded

Works with
Version: 7.5.9.2 (X86_64) / LibreOffice Community
Build ID: cdeefe45c17511d326101eed8008ac4092f278a9
CPU threads: 16; OS: Windows 10.0 Build 22631; UI render: default; VCL: win
Locale: es-ES (es_ES); UI: es-ES
Calc: CL threaded
Comment 2 raal 2024-03-03 06:56:39 UTC
This seems to have begun at the below commit in bibisect repository/OS linux-64-7.6.
Adding Cc: to Regina Henschel ; Could you possibly take a look at this one?
Thanks
 e488e9509e327eaf3001ad12d76fd64698593f25 is the first bad commit
commit e488e9509e327eaf3001ad12d76fd64698593f25
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Sun Oct 29 01:54:11 2023 +0200

    source dfb0d118f6b23730bc632885eb4703a37eeaec16

150161: tdf#139083 Only resize if 'resize with cell' is set | https://gerrit.libreoffice.org/c/core/+/150161
Comment 3 Regina Henschel 2024-03-03 13:34:42 UTC
Workaround: Anchor the chart to cell before copying.

The error does not only effect charts but Math objects and shapes as well.
Comment 4 Regina Henschel 2024-03-03 16:25:18 UTC
Proposed fix is in https://gerrit.libreoffice.org/c/core/+/164307
Comment 5 Commit Notification 2024-03-04 13:30:46 UTC
Regina Henschel committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/199523b553957936dc31b8c3556ef2e47c6bc3a1

tdf#160003 use correct sheet in clipboard for test

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 6 Commit Notification 2024-03-04 21:03:48 UTC
Regina Henschel committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/45fb563b6e93833a4dbe31bf0b0cc0a51e83f791

tdf#160003 use correct sheet in clipboard for test

It will be available in 7.6.6.

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 7 Commit Notification 2024-03-04 21:03:51 UTC
Regina Henschel committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

https://git.libreoffice.org/core/commit/5ad993b4167fb93f565dc1bce6eb1057e60f62f3

tdf#160003 use correct sheet in clipboard for test

It will be available in 24.2.2.

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 8 Xisco Faulí 2024-03-04 21:04:49 UTC
Verified in

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 82bfc24c9ceb00a730580ad9338ead2f64437d05
CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: x11
Locale: es-ES (es_ES.UTF-8); UI: en-US
Calc: threaded

@Regina, thanks for fixing this issue!