Hi Andrew,

> I'd like it to be attached automatically when the office is started in
> order to capture events throughout the session.

I assume from this part that you would like to listen for events from
all documents. My recommendation is ...

 - write Job [1] and assign it to event OnAppStart [2]
 - register your listener in GlobalEventBroadcaster [3]

... GlobalEventBroadcaster includes XEventBroadcaster as
OfficeDocument. The only difference is that XEventBroadcaster in
OfficeDocument broadcasts events for one document and
XEventBroadcaster in GlobalEventBroadcaster broadcasts events for all
documents. AFAIK you can use protocol handler instead of job with
OnAppStart event too.

[1] 
http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/WritingUNO/Jobs/Jobs
[2] 
http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/WritingUNO/Jobs/List_of_Supported_Events
[3] 
http://api.openoffice.org/docs/common/ref/com/sun/star/frame/GlobalEventBroadcaster.html

You can find examples in OpenOffice.org SDK directory tree ...

Job - [SDK]/examples/DevelopersGuide/Components/Addons/JobsAddon
ProtocolHandler -
[SDK]/xamples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java

Protocol handler in Java can be generated by the OpenOffice.org
plug-in in the NetBeans for you. Create new project OpenOffice.org
Addon ...

HTH,
-- 
Robert Vojta

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

Reply via email to