Bug 141337 - Python doc.Sheets.copyByName(existingname, newname, position) does not update references in chart when copying sheets
Summary: Python doc.Sheets.copyByName(existingname, newname, position) does not update...
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: sdk (show other bugs)
Version:
(earliest affected)
7.0.5.2 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Macro-Python
  Show dependency treegraph
 
Reported: 2021-03-30 09:26 UTC by nib70776
Modified: 2022-12-17 03:19 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
calc document with sample charts (33.77 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-03-30 09:26 UTC, nib70776
Details

Note You need to log in before you can comment on or make changes to this bug.
Description nib70776 2021-03-30 09:26:58 UTC
Created attachment 170821 [details]
calc document with sample charts

Libreoffice calc:
Python doc.Sheets.copyByName(existingname, newname, position) does not update references in chart when copying sheets.

def copysheet(*args):
    # chart refernces not updated
    doc = XSCRIPTCONTEXT.getDocument()
    sheetstocopy = doc.Sheets['Sheet1']
    for case in range (5,0,-1):
        nameBGx = 'd1-' + str(case)
        if nameBGx in doc.Sheets:
            doc.Sheets.removeByName(nameBGx)
    for case in range (5,0,-1):
        nameBGx = 'd1-' + str(case)
        nosheets = doc.Sheets.Count
        doc.Sheets.copyByName(sheetstocopy.Name, nameBGx, nosheets)
    return None

Reference of all chart data remains at Sheet1.
Comment 1 Eleonora Govallo 2021-08-26 16:09:35 UTC
Hello!
No repro in Version: 7.3.0.0.alpha0+ / LibreOffice Community
Build ID: 008f28c9e01114e731f785e9e238236a1ed069d2
CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: ru-RU (ru_RU.UTF-8); UI: en-US
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2021-08-22_15:17:36
Calc: threaded

In provided document i copied first sheet and checked the data in the chart and the data was from copied sheet not from the first sheet.
Please update to the latest version ant try to reproduce the bug.
Also please add your version information (Help - About Libre office).
Comment 2 Buovjaga 2022-05-19 12:49:00 UTC
(In reply to Eleonora Govallo from comment #1)
> Hello!
> No repro in Version: 7.3.0.0.alpha0+ / LibreOffice Community
> Build ID: 008f28c9e01114e731f785e9e238236a1ed069d2
> CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: gtk3
> Locale: ru-RU (ru_RU.UTF-8); UI: en-US
> TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time:
> 2021-08-22_15:17:36
> Calc: threaded
> 
> In provided document i copied first sheet and checked the data in the chart
> and the data was from copied sheet not from the first sheet.
> Please update to the latest version ant try to reproduce the bug.
> Also please add your version information (Help - About Libre office).

nib70776: waiting for your response
Comment 3 QA Administrators 2022-11-16 03:46:56 UTC Comment hidden (obsolete)
Comment 4 QA Administrators 2022-12-17 03:19:34 UTC
Dear nib70776,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INSUFFICIENTDATA due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email 

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

Warm Regards,
QA Team

MassPing-NeedInfo-FollowUp