Issue 117633

Summary: ChartDataChangeEvent object does not provide Row and Column information
Product: Calc Reporter: ccapon <ttabyss>
Component: programmingAssignee: AOO issues mailing list <issues>
Status: UNCONFIRMED --- QA Contact:
Severity: Normal    
Priority: P3 CC: arielch, elish, issues, marcelly.bernard, oliver.brinzing, rainerbielefeld_ooo_qa
Version: 3.3.0 or older (OOo)   
Target Milestone: ---   
Hardware: PC   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---

Description ccapon 2011-03-31 18:53:53 UTC
For spreadsheet cell ranges which register for XChartDataChangeEventListener events, when the event is triggered, the event object provided does not have any values for properties: Type, StartColumn, EndColumn, StartRow and EndRow.

To reproduce: Open a new empty spreadsheet.  Create a new macro and paste in the following code.  Run the RegisterChartDataChangeEvent() macro, then change the contents of any cell on Sheet1 in the range B1 to B9.

What happens:  The event is triggered but all the event properties are zero.  This code registers an event for both the spreadsheet and a cell range so the MsgBox appears twice.

Expected behaviour:  Event properties should contain the column and row indexes of the cell which changed.  Also, the Type property should probably contain one of the ChartDataChangeType values.

This has been tested and reproduced on OO 3.2.1 under Linux and OO 3.3 under Windows.

Documentation link:

option explicit

private sub RegisterChartDataChangeEvent
	dim oSheet    as object
	dim oListener as object
	dim oRange    as object
	dim s         as string

	s         = ""
	oSheet    = ThisComponent.Sheets.getByIndex(0)
	oRange    = oSheet.getCellRangeByName( "B1:B9")
	oListener = CreateUnoListener("Listener_", s)
end sub

private sub Listener_chartDataChanged(oEvent as object)
	dim s as string
	'Xray oEvent
	s = "Source:" & oEvent.Source.AbsoluteName
	s = s & "  Event:" & oEvent.Type
	s = s & "  " & oEvent.StartColumn & "," & oEvent.EndColumn
	s = s & "  " & oEvent.StartRow    & "," & oEvent.EndRow
end sub
Comment 1 Oliver Brinzing 2011-04-01 05:37:24 UTC
Comment 2 Oliver-Rainer Wittmann 2012-06-13 12:31:30 UTC
getting rid of value "enhancement" for field "severity".
For enhancement the field "issue type" shall be used.
Comment 3 Edwin Sharp 2013-12-02 20:31:12 UTC
As given in description.

AOO410m1(Build:9750)  -  Rev. 1539999
2013-11-09_04:08:11 - Rev. 1540252
Comment 4 Rainer Bielefeld 2014-04-01 09:00:14 UTC
Version has been modified erroneous, so back to most early version

Effect is reproducible with "AOO 4.0.1 Release – German UI / German locale [AOO401m5(Build:9714)  -  Rev. 1524958 2013-09-20 11:40:29]" on German WIN7 Home Premium (64bit)", “historic” 4.0 User Profile used for all predecessor versions	.

But I can't tell what observations might mean. 

Can you help with a comment?