Hallo Erich,

Erich Neuwirth schrieb:
Are there any plans to create more events which can used
as triggers for macros?

[...]

Will anything like that be possible in OpenOffice in the near future?
Currently only events connected to opening or activating (and closing, of course) whole documents seem to be supported.

Definitely, there are aleady more events usable for triggering a macro. Here is an example how one can start a macro depending on changes in a certain cell:

REM  *****  BASIC  *****

global oCell
global oListener

Sub AddListener
        ' add listener for cell C3

        oDoc = ThisComponent
        oSheet = oDoc.Sheets(0)
        oCell = oSheet.getCellByPosition(2,2)

oListener = CreateUnoListener( "Change_", "com.sun.star.util.XModifyListener" )

        oCell.addModifyListener( oListener )
End Sub

Sub RemoveListener
        oCell.removeModifyListener( oListener )
End Sub

Sub Change_modified( aEvent )
        MsgBox "modified"
End Sub

Do not ask me for more details or further documentation, because I am not a specialist in those things. ;-)

Stefan



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to