Hello Gautham,

Hey Andreas,

On the other side ... a dispatch interceptor must not deal with a types/filter configuration at all ...
"
- So do I need a TypeDetection.xml for a dispatch interceptor or nor?

You dont need such TypeDetection.xml.

The idea behind addons is the following one:

- implement any uno component you want
(that can be e.g. a filter, a dispatch interceptor, a dialog or anything else)
- combine it with the right set of configuration files
(if your component require a configuration at all)
- pack it into a zip file
(describing it's entries inside a Manifest file)

An addon requires some additional configuration files only (packed into the same zip file). Those configuration entries makes it possible for you to find a place inside our menu/toolbars.

But the same zip file (independend from the fact that it contains a filter without the need for an extra menu/toolbar entry or it contains any other uno component, which wish to be placed into our menu/toolbars) can
be installed using the "Tools->PackageManager".
[/quote]

- What config files exactly are we talking about? In the usecase that I
described before, that the component logs all files read into Ooo 2.0, to be
copied, what config files do you reckon I need?

One possible solution would be:

a)
Implement an UNO Service supporting the service com.sun.star.task.Job
Such job can be registered to be called everytimes a document event is broadcasted. Such document events are notified in case:
- documents will be created as new ones
- documents will be loaded from disc
- documents will be modified by the user
- documents will be stored
etcpp.

b)
Against the implementation of this service you have to install a configuration file too. The corresponding configuration package is "org.openoffice.Office.Jobs" (The name of the file is Jobs.xcu)
The needed event registrations are "OnNew" and "OnLoad".


c)
If you wish to be present inside our menu/toolbar) you have to install a configuration package "org.openoffice.Office.Addons" (Addons.xcu) too.
If you make your job "non visible" ... you can ignore this step.

=>
Pack all (implementation and configuration files) into a zip file.
Add a suitable Manifest.
Install it using "Tools->Package Manager".

Now you will be called for every loaded document, get the XModel reference of a document; there you can query for the interface XStorable ... and call storeToURL() to get a copy on disc.

More informations about implementing Addons and Jobs you can find on:
"http://api.openoffice.org/docs/DevelopersGuide/Components/Components.xhtml";
chapter "4.7  Integrating Components into OpenOffice.org"
and especialy for Jobs "4.7.2 Jobs".
Chapter "4.7.3 Add-Ons" describe part c).

Regards
Andreas

Sorry. But after thinking about your problem ... I would say that Jobs are more usefull the DispatchInterception.
There exists many ways doing the same ... .-)

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

Reply via email to