Issue 117633 - ChartDataChangeEvent object does not provide Row and Column information
Summary: ChartDataChangeEvent object does not provide Row and Column information
Status: UNCONFIRMED
Alias: None
Product: Calc
Classification: Application
Component: programming (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: PC All
: P3 Normal (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-31 18:53 UTC by ccapon
Modified: 2014-04-01 09:00 UTC (History)
6 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this issue.
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:
http://api.openoffice.org/docs/common/ref/com/sun/star/chart/ChartDataChangeEvent.html

--------------------------
option explicit

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

	s         = "com.sun.star.chart.XChartDataChangeEventListener"
	oSheet    = ThisComponent.Sheets.getByIndex(0)
	oRange    = oSheet.getCellRangeByName( "B1:B9")
	oListener = CreateUnoListener("Listener_", s)
	oSheet.addChartDataChangeEventListener(oListener)
	oRange.addChartDataChangeEventListener(oListener)
end sub

private sub Listener_chartDataChanged(oEvent as object)
	dim s as string
	'GlobalScope.BasicLibraries.LoadLibrary("XrayTool")
	'Xray oEvent
	s = "Source:" & oEvent.Source.AbsoluteName
	s = s & "  Event:" & oEvent.Type
	s = s & "  " & oEvent.StartColumn & "," & oEvent.EndColumn
	s = s & "  " & oEvent.StartRow    & "," & oEvent.EndRow
	MsgBox(s)
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
Debian
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. 

@Bernard:
Can you help with a comment?