Issue 103984 - XChartDataArray / setDataArray broken
Summary: XChartDataArray / setDataArray broken
Status: CLOSED FIXED
Alias: None
Product: General
Classification: Code
Component: chart (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: PC Windows XP
: P2 Trivial with 4 votes (vote)
Target Milestone: ---
Assignee: kla
QA Contact: issues@graphics
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2009-08-03 22:19 UTC by ms7777
Modified: 2013-02-24 21:19 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
example showing the problem (9.14 KB, application/vnd.oasis.opendocument.spreadsheet)
2009-08-04 09:30 UTC, IngridvdM
no flags Details
patch_20090901 (2.70 KB, patch)
2009-09-01 02:16 UTC, weiz
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description ms7777 2009-08-03 22:19:10 UTC
In charts generated by code, the setDataArray function kills OO:

Sub GetAndSetChartData
 Dim aRect as new com.sun.star.awt.Rectangle 
 Dim oX

 oCharts = ThisComponent.Sheets.getByIndex(0).Charts 

 oCharts.addNewByName("chart11", aRect, Array(), False, True) 
 oChartDoc = oCharts.getByName( "chart11" ).EmbeddedObject 

 oX = oChartDoc.Data.getData() 
 oChartDoc.Data.setData(oX) '<- this line kills OO
End Sub

The same behavior occurs if I create oX by code as a sequence of sequences with 
exactly the same structure as getData returns.

Prio P2 because it looks like regression: According to 
http://www.oooforum.org/forum/viewtopic.phtml?t=86884 , this has worked in OO 
2.2
Comment 1 IngridvdM 2009-08-04 09:30:22 UTC
Created attachment 63943 [details]
example showing the problem
Comment 2 IngridvdM 2009-08-04 09:47:51 UTC
@weiz, please have a look at this one. Thanks!
Comment 3 weiz 2009-09-01 02:16:50 UTC
Created attachment 64468 [details]
patch_20090901
Comment 4 weiz 2009-09-01 02:17:23 UTC
@iha, the patch is submitted, please let me know your suggestions. Thank you!
Comment 5 IngridvdM 2009-09-02 16:17:49 UTC
@weiz, the patch looks quite good already. thanks! :-)
Regarding the sc change - the number format supplier should be attached in all
cases. Regarding the chart2 change - the column label vector should be resized
instead of skipping labels if the size is not sufficient. But the assertion is
right there. It should not happen that the size is not sufficient. The root
cause for this error was in method InternalData::enlargeData.
I made that additional changes and commited all to CWS chart41. Thanks for the
patch! - Ingrid
Comment 6 IngridvdM 2009-09-07 18:27:02 UTC
@Thomas, please verify in CWS chart41. Load the attached example while macros
are enabled and press the button within the document. a chart should be created
and there be no crash anymore.
Comment 7 kla 2009-09-09 10:15:08 UTC
Seen ok in cws chart41 -> verified
Comment 8 rebelxt 2009-09-15 15:39:14 UTC
When is this issue scheduled to be integrated into the master code line? 
DEV300m?.  Is this information on this web site where I can find it?
Comment 10 rebelxt 2009-09-15 17:35:51 UTC
@ cornouws:  Thanks
Comment 11 kla 2009-12-22 13:32:16 UTC
Seen ok in current master -> closed