Apache OpenOffice (AOO) Bugzilla – Issue 91212
XTableChart::getRanges() returns wrong range
Last modified: 2013-02-24 21:20:38 UTC
The API method XTableChart::getRanges() does not ensure that the chart is loaded and therefor fails sometimes. To reproduce load the attached example document and press on the 'GetRanges' Button. A message box shows an empty range, what is wrong. Double click on the chart and press the Button afterwards will show a range, as the chart is loaded now. But it should not be necessary to double click on the chart to get a range via API.
Created attachment 54839 [details] doc with example macro
As a workaround one can call ChartModel = Chart.EmbeddedObject just before Chart.getRanges() as this triggers the loading of the chart object.
Created attachment 54840 [details] Patch fixing the problem
In addition the returned range was wrong when labels for columns and rows were selected. Both problems are fixed now in CWS chart29.
@Thomas, please verify in CWS chart29. To check, load the attached bugdoc and make sure that the macro security allows to run macros. After opening the document click on the button 'GetRanges'. A message box should appear with content 'Chart ranges: Columns:2-5 Rows:9-14.
TO adobt a autotest reassign to JSI.
work started
changes to ch2_flexible_source_range_selection.inc where instead of three ranges now one range is being displayed.
scripts running without any error or warning on Solaris
@kla
Seen ok in cws chart29 -> verified
Seen ok in current master -> closed