Bug 140868 - Libreoffice Calc when a sheet is duplicated with multiple graphs, graphs do not reference the new duplicate correctly.
Summary: Libreoffice Calc when a sheet is duplicated with multiple graphs, graphs do n...
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-08 03:19 UTC by BPH
Modified: 2023-06-02 12:57 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
This spreadsheet exhibits the effects of the bug. (74.41 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2021-03-08 03:28 UTC, BPH
Details
This spreadsheet exhibits the effects of the bug. (282.58 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-03-08 03:30 UTC, BPH
Details
A sample .ods file with a bit of data and one chart (13.81 KB, application/vnd.oasis.opendocument.spreadsheet)
2022-01-17 23:59 UTC, LeroyG
Details

Note You need to log in before you can comment on or make changes to this bug.
Description BPH 2021-03-08 03:19:19 UTC
Description:
I found a question from 2015 that is pretty close to what I am seeing. https://ask.libreoffice.org/en/question/53027/chart-does-not-update-when-cell-content-change/ It lists 3 bug reports (Bug #86321, Bug #136160, Bug#136254.) that when I read them could be related. But none of them are what I'm seeing. Alex Kemp closed that question as not relevant or outdated in 2020. I am using 7.0.4.2 of Libreoffice calc. I created a spreadsheet with 5 graphs on one sheet. These are sigmoid curve fits for an ELISA plate. I got my sheet done and then duplicated it 6 times, once for each of 6 ELISA plates. For each of those 6 duplicates I pasted the tabular data in for the relevant plate.

Everything works correctly except that the graphs don't get duplicated correctly in all cases. When it breaks, the graphs either become references to tables, or the references stay pointed to the original sheet. However, rarely, some of them do get copied over correctly. 

I confirmed the same behavior in Linux and Windows 10. I don't know what version this started in the chain. 

I have a file that shows this behavior. I have tried it saving as XLSX and ODS file types. Both show the behavior. I have also tried it on two different versions of Linux Mint. 

Steps to Reproduce:
1. I have a sheet that has a table referencing another table within the sheet. 
2. For each column of 4 columns, there is a a graph. 
3. Then, copy the sheet 6 times. Look at the Data Ranges for all of the tables in the new sheets. 
(I noticed this because the graphs didn't all change when I replace the data in the source sheet.) 

Actual Results:
The graphs in the duplicated sheets are sometimes converted to data tables that copied the data from the source sheet. Some of them are references to the source sheet, not the new sheet. Some of them copied correctly. 

Expected Results:
The graphs should modify the graphs in the copied sheets so that they reference the cells in the new sheet. 


Reproducible: Sometimes


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
Version: 7.0.4.2
Build ID: dcf040e67528d9187c66b2379df5ea4407429775
CPU threads: 8; OS: Linux 4.10; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 1 BPH 2021-03-08 03:28:18 UTC
Created attachment 170322 [details]
This spreadsheet exhibits the effects of the bug.

Right click on the graphs. You will see that they exhibit a variety of errors in most cases. References broken, references to the source sheet, and conversion to internal data tables.
Comment 2 BPH 2021-03-08 03:30:29 UTC
Created attachment 170323 [details]
This spreadsheet exhibits the effects of the bug.

Right click on graphs and you will see a variety of problems. References to the source sheet, conversion to tables. Etc, as discussed in the bug report. 
This is the ODS version.
Comment 3 LeroyG 2022-01-17 23:59:18 UTC
Created attachment 177625 [details]
A sample .ods file with a bit of data and one chart

In the following examples, Sheet1 name could have any number; Sheet2 name could have any number greater than Sheet1.

I found a faulty method:
- Copy from Sheet1, insert/move Sheet2 (or Sheet3) to the left of Sheet1 tab, and paste.


Workarounds:

If Sheet2 tab would be to the left of Sheet1 tab:
- Copy from Sheet1 after inserting/moving Sheet2

If you already copied from Sheet1, and Sheet2 (or Sheet3) tab is (are) to the left of Sheet1 tab:
- Move Sheet2 (and Sheet3) tab(s) to the right of Sheet1 tab
- Paste
- Reorder the sheet tabs


Version: 7.1.8.1 (x64) / LibreOffice Community
Build ID: e1f30c802c3269a1d052614453f260e49458c82c
CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: default; VCL: win
Locale: es-MX (es_ES); UI: en-US
Calc: CL

Related question: https://ask.libreoffice.org/t/copying-chart-in-calc/72866
Comment 4 Buovjaga 2022-12-02 13:24:28 UTC
(In reply to LeroyG from comment #3)
> Created attachment 177625 [details]
> A sample .ods file with a bit of data and one chart
> 
> In the following examples, Sheet1 name could have any number; Sheet2 name
> could have any number greater than Sheet1.
> 
> I found a faulty method:
> - Copy from Sheet1, insert/move Sheet2 (or Sheet3) to the left of Sheet1
> tab, and paste.

Testing with attachment 177625 [details]. If I select A1:J21, copy, insert new sheet, paste into it, everything is pasted just fine.

Of the related reports you mentioned in Ask, bug 142635 is fixed and bug 99969 is still reproduced.

BPH and Leroy: is there still a problem?

Set to NEEDINFO.
Change back to UNCONFIRMED, if the problem persists. Change to RESOLVED WORKSFORME, if the problem went away.

Arch Linux 64-bit
Version: 7.5.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 2b093d27b7e6f231512920f20089fcac291b021f
CPU threads: 8; OS: Linux 6.0; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 2 December 2022
Comment 5 QA Administrators 2023-06-02 03:17:00 UTC Comment hidden (obsolete)
Comment 6 LeroyG 2023-06-02 12:57:32 UTC
Reproducible with:

Version: 7.4.7.2 (x86) / LibreOffice Community
Build ID: 723314e595e8007d3cf785c16538505a1c878ca5
CPU threads: 4; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: Skia/Raster; VCL: win
Locale: es-MX (es_MX); UI: en-US
Calc: threaded


Version: 7.5.3.2 (x86) / LibreOffice Community
Build ID: 9f56dff12ba03b9acd7730a5a481eea045e468f3
CPU threads: 4; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: Skia/Raster; VCL: win
Locale: es-MX (es_MX); UI: fr-FR
Calc: threaded

Note that you must Copy before moving Sheet2 to the left of Sheet1, and then Paste.