| View previous topic :: View next topic |
| Author |
Message |
lapont General User

Joined: 07 Nov 2005 Posts: 10 Location: Denmark
|
Posted: Wed Oct 18, 2006 7:48 am Post subject: listener - which cell did trigger the listener |
|
|
With this code I put a listener on a group of cells:
| Code: | Sub EventListenerOn
Dim oSheet As Object
oSheet = ThisComponent.Sheets.getByName("Ark1")
oGroup=oSheet.getCellRangeByName("A1:B2")
oListener = createUnoListener("LAPONT_","com.sun.star.chart.XChartDataChangeEventListener")
oGroup.addChartDataChangeEventListener(oListener)
End Sub |
When one of the four cells in A1:B2 changes value this subroutine is executed:
| Code: | Sub LAPONT_chartDataChanged
Dim oSheet As Object
oSheet=ThisComponent.Sheets.getByName("Ark1")
..
some code
..
End Sub |
In this subroutine I need to know, which one of the cells in the group A1:B2 changed its value and triggered the listener.
How do I check for that?
lapont |
|
| Back to top |
|
 |
B Marcelly Super User

Joined: 12 May 2004 Posts: 1414 Location: France
|
Posted: Wed Oct 18, 2006 8:28 am Post subject: |
|
|
| Quote: | | In this subroutine I need to know, which one of the cells in the group A1:B2 changed its value and triggered the listener. |
Your event subroutine has an event argument. It is a ChartDataChangeEvent. | Code: | | Sub LAPONT_chartDataChanged(anEvent As Object) |
See IDL documentation of com.sun.star.chart.XChartDataChangeEventListener
Here is the page. Follow the link to ChartDataChangeEvent. |
|
| Back to top |
|
 |
|