OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

listener - which cell did trigger the listener

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc
View previous topic :: View next topic  
Author Message
lapont
General User
General User


Joined: 07 Nov 2005
Posts: 10
Location: Denmark

PostPosted: Wed Oct 18, 2006 7:48 am    Post subject: listener - which cell did trigger the listener Reply with quote

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
View user's profile Send private message
B Marcelly
Super User
Super User


Joined: 12 May 2004
Posts: 1453
Location: France

PostPosted: Wed Oct 18, 2006 8:28 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group