Apache OpenOffice (AOO) Bugzilla – Issue 75058
New Chart: crash changing the data range manually
Last modified: 2013-08-07 14:42:39 UTC
take attached sample, activate the Chart, in Format.Data Ranges.Data Series change the range for Col1 in Categories field from e.g. Table1.A2:A5 to Table1.A2:A6 via keyboard input -> crash
The crash happens, whenever you enter an invalid range in a text field. What happens is that the validity of the range is checked via the sheet::XCellRangeAccess interface. If this interface is not available (as in Writer) it is assumed that the range is correct. 1. in chart we need to change the check so that it finds out reliably if a range is correct in Writer. 2. in SwChartDataProvider::createDataSequenceByRangeRepresentation() show always throw an IllegalArgumentException when an invalid range is entered, and no RuntimeException.
Created attachment 43484 [details] document to reproduce
Accepting.
Type changed, keyword added.
Fixed in sw, sc and chart2.
->MRU: Please verify in CWS chart2mst3. Note, that unless Issue 75179 is fixed, an invalid text in the edit field has white text on white background on Linux, i.e. you don't see the text in that case. (You get invalid text when you delete the "5" in your example to replace it by a "6"., that's what causes the crash)
Verified in latest build.
Reopening issue. Crash re-occurs in build mst12.
MRU->BM: in latest build (installed March 27th), crash occurs again. When having e.g. a table with size A1:E6, and then changing the data range in the according chart to A1:E7 e.g. OOo will crash.
In XDataProvider::createDataSource of the Writer data provider an array was accessed unchecked. Fixed by throwing an IllegalArgumentException when the range entered was too large for the table.
The crash is fixed. Note, however, that an invalid range is not shown with a red box. An invalid input is ignored and the last valid one is used as data. The fix for the latter problem seems too risky at the moment. Please verify in CWS chart2mst3.
As this task came back from testing with an error it is now a defect
Verified in CWS chart2mst3.
Checked in 680m222.