D'accord, merci d'avance
-----Message d'origine-----
De : Laurent Godard [mailto:[EMAIL PROTECTED]
Envoyé : mardi 7 février 2006 17:29
À : [email protected]
Objet : Re: [prog] Comment intercepter un évenement onclose à la fermeture
d'un document OoWriter
Re
je reposte sur la liste francophine la reponse que je t'ai faite qsue la
liste anglaise
exemple de code pour OnNew et OnLoad
a toi d'adpter
HTH
Laurent
'----------------------------------------
sub ConfigureDemarre(SetOrNot)
dim monEvent(0 to 1) as new com.sun.star.beans.PropertyValue
monEvent(0).name = "EventType"
monEvent(0).value="Basic"
monEvent(1).name = "Script"
if SetOrNot = 1 then
monEvent(1).value="macro:///myLib.myModule.mySub()"
else
monEvent(1).value=""
endif
'for only bind to the document
'lesEvents = thisComponent.events
'lesEvents.replaceByName("OnStartApp", monEvent())
GlobalEvent = createUnoservice("com.sun.star.frame.GlobalEventBroadcaster")
GlobalEvent.Events.ReplaceByName("OnNew", monEvent())
GlobalEvent.Events.ReplaceByName("OnLoad", monEvent())
end sub
--
Laurent Godard <[EMAIL PROTECTED]> - Ingénierie OpenOffice.org
Indesko >> http://www.indesko.com
Nuxeo CPS >> http://www.nuxeo.com - http://www.cps-project.org
Livre "Programmation OpenOffice.org", Eyrolles 2004
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]