Hello ianmcr,

I need a reliable means of terminating OOo (used as a server in our
application). I'm using the c++ SDK. I use  XComponent loader to load an
XComponent and then process the document and attempt to terminate OOo.

I call the following to terminate.

//dispose the local service manager
Reference<XComponent>::query(xComponent)->dispose();

The interface XComponent can be implemented by every UNO component ...
and it will "terminate" those components only. But that does not imply
terminating the whole office process.

Termination of the office process itself has to be done by calling XDesktop.terminate().


However, the sOffice.bin remains after closing my application. I attempted
using the call to desktop.terminate() suggested in the following:

http://www.oooforum.org/forum/viewtopic.phtml?t=5019&highlight=terminate

However, it does not terminate soffice.bin. Is there a recommmended solution
to reliably terminating OOo?

The problem of Desktop.terminate() ... it supports listener, which throw veto exceptions against a shutdown request. E.g. the quickstart module (the small symbol of your task tray) uses this mechanism to hold the office process in memory.


As a possible alternative/workaround I was considering terminating OOo by
killing the soffice.bin process. Does the OOo SDK API provide any
information on the OOo process such as the process ID?

There is a nother possible solution:

- Start your office manually using the following parameter:
  "soffice -env:UserInstallation=<any path you like>"
This will create a different configuration layer for your office
using the path <any path you like>. Any changes on settings will be made
here and not in the normal configuration layer used by any other office instance.

- Go to the options pane "Tools->Options->OpenOffice->Memory"
and deselect the optione "Load OpenOffice during system start-up."
Now you have an office without a quickstart module.

- If your UNO client application starts an office it should use the "-env:..." parameter to make sure it uses this "special prepared office". No quickstarter will hinder Desktop.terminate() on doing it's job (expecting you or any other script register a terminate listener there.

- BTW: Another nice feature of this "second configuration layer".
Any change on any configuration setting for this office wont affect the normal office instance used by the desktop user .-)

Regards
Andreas

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

Reply via email to