S Sridhar wrote:
> Hi, I am just started looking into open office to add some international
> text processing  capabilities.
> 
> Could you please let me know a tutorial or a small document on how to write
> the "hello World" add-on.
> 
> 
> I looked into dev guide
> (DevelopersGuide/Components/Components.htm#1+7+3+Add-Ons) but it hasnt given
> the way to write the handlers for these menu and toolbar actions...

I'm not sure wether I understood your question completely, but I assume
you want to know how you have to write your code to get it called from
the Add-On menu and toolbar entries.

When GUI elements in OOo are used to execute a function they look for so
called Dispatch objects that implement the UNO interface
com.sun.star.frame.XDispatch. Such objects are provided by so called
Dispatch Provider objects implementing (usually amongst others) the
interface com.sun.star.frame.XDispatchProvider. Dispatch Providers
decide wether they can handle a command or not.

In the case of Add-Ons the Dispatch Providers are called Protocol
Handlers because they are responsible for a set of commands identified
by their "protocol". It's called "protocol" because it is syntactically
identical with the protocol part of a URL. The Protocol Handler is
registered at the OOo framework through a configuration file that tells
the framework which handler is responsible for which protocol. To avoid
name clashes the protocol(s) of each project should have a unique name
usually enabled by a proper "name space".

So more or less you have to implement a Protocol Handler and its
Dispatch objects. This is described in the DevGuide to a suitable extent
IMHO.

We are currently working on ways to ease this process. The idea is to
have a code generator that automatically creates the Protocol Handler
code an large parts of the Dispatch objects. But it will still take some
weeks or months to deliver this in the necessary quality.

Best regards,
Mathias

-- 
Mathias Bauer - OpenOffice.org Application Framework Project Lead
Please reply to the list only, [EMAIL PROTECTED] is a spam sink.


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

Reply via email to