-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Gautham,
> I am trying to write a component that will be invoked
> automatically when OOo initializes, and hence I expected some way to invoke
> yours from the OOo writer, after loading.
you should have a look at the job execution environment ...
it's possible to start job's while oo is starting ... you're component can
install an GlobalEventBroadcaster an listen for global/document events:
try {
XMultiComponentFactory xMultiComponentFactory = xComponentContext
.getServiceManager();
Object objBroadCast = xMultiComponentFactory
.createInstanceWithContext(
"com.sun.star.frame.GlobalEventBroadcaster",
xComponentContext);
xEvtBroadcast = (XEventBroadcaster) UnoRuntime.queryInterface(
XEventBroadcaster.class, objBroadCast);
xEvtBroadcast.addEventListener(MyListener);
} catch (Exception e) {
e.printStackTrace();
}
If you want to have access to your component via ui (toolsbar/menu), you can
install a ProtocolHandler (i will send you an example project ...)
> Please advice if such a thing is possible. At the moment I am reading
> through the dev guide about debugging in a hope that I can see your
> component working w/o having to write a remote client.
I am able to remote debug oo components using the eclipse debugger...
to do so, add the following statments to the jre oo uses ...
(Tools -> Options ... -> OpenOffice.org -> Java)
jre 1.4.2:
-Xdebug
-Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=n
jre 1.5.0:
agentlib:jdwp=transport=dt_socket,server=y,address=localhost:8000,suspend=n
if you want to start a component remote, start oo using:
soffice.exe
-accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager
you can verifiy the connection with: netstat -a
regards
Oliver
- --
GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFDv79hTiyrQM/QSkURAj/5AJ9I+qhYZosMWrsxc+iUYhjDbwnUCwCfTpk1
F50Ka2x3uhmmah9yCsPTiks=
=hHk+
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]