Bug 63902 - Cloned chart has reference to field with original sheet. Problem with method Workbook.cloneSheet(int sheetNum)
Summary: Cloned chart has reference to field with original sheet. Problem with method ...
Status: NEW
Alias: None
Product: POI
Classification: Unclassified
Component: XSSF (show other bugs)
Version: 4.1.1-FINAL
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2019-11-03 21:14 UTC by Martin
Modified: 2020-02-10 10:56 UTC (History)
0 users

Test case (1.74 KB, text/x-java)
2020-02-10 10:52 UTC, bschuhmacher

Note You need to log in before you can comment on or make changes to this bug.
Description Martin 2019-11-03 21:14:57 UTC
I think I found a bug related with method Workbook.cloneSheet(int sheetNum). When I cloned original sheet(sheetA) with chart(chartA) in cloned sheet(sheetB) in chart(chartB) I have reference to original sheet(sheetA) but not to new(sheetB) . That doesn't works as expected and I think new chart(chartB) in the new sheet(sheetB) should have reference to fields from new(sheetB).  I tried change references manual by CTNumRef.setF(String var1) and CTStrRef.setF(String var1) but when I did that I change reference also in original(chartA). That is only with cloned chart(chartB). I think they can be related with something together.

I want to cloned chart(chartB) has reference to new cloned sheet (sheetB) not to original. 
Comment 1 bschuhmacher 2020-02-10 10:52:01 UTC
Created attachment 36996 [details]
Test case
Comment 2 bschuhmacher 2020-02-10 10:56:50 UTC
Comment on attachment 36996 [details]
Test case

Sorry, this was for another ticket, no idea how it got attached here...