<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi Stephan, *<br>
<br>
<div class="moz-cite-prefix"></div>
<blockquote cite="mid:e942afaa-5fe3-46ee-b83b-ba3defb309e1@redhat.com" type="cite">
<blockquote type="cite">
<pre wrap="">We have the following case:
You have an application conntected to LO via UNO. The user then
separately starts a (Start center) window. When he closes it, LO gets
terminated and the external application loses the connection. We want to
prevent thatso that the external application keeps working.
</pre>
</blockquote>
<pre wrap="">
The usual pragmatic solution is to use an explicit UserInstallation for
the external application.</pre>
</blockquote>
That doesn't work in our case since we want the same user settings in both scenarios (embedded vs. standalone).
<blockquote cite="mid:e942afaa-5fe3-46ee-b83b-ba3defb309e1@redhat.com" type="cite">
<blockquote type="cite">
<pre wrap="">We could use a TerminationVetoException
<a class="moz-txt-link-rfc2396E" href="https://www.openoffice.org/api/docs/common/ref/com/sun/star/frame/TerminationVetoException.html"><https://www.openoffice.org/api/docs/common/ref/com/sun/star/frame/TerminationVetoException.html></a>
in the external application to prevent LO from terminating. But this has
the side effect that the user can no longer close the Start center.
Basically we have two options how to fix this:
1. Change the behavior of LO such that the TerminationVetoException
allows closing the last window, but still prevents terminating the
soffice process
</pre>
</blockquote>
<pre wrap="">
At least for desktop environments that do not clearly indicate that an
app is still running when its last window is closed, one downside of
this could be that users might not be aware of LO still running when
they intended to close it.
</pre>
<blockquote type="cite">
<pre wrap=""> 2. Change the behavior of LO such that an open UNO connection counts as
an open window, and the process doesn't get terminated until all
connections are closed.
This option would not need a TerminationVetoException.
Both options do change existing behavior and will possible break
existing applications/workflows out there. So the decision should be
made carefully.
I probably would go for the first one, since the
TerminationVetoException suggests that it will prevent termination. It
shouldn't affect closing a window.
Although I would also consider it as a bug that LO terminates (when
closing a window) while it still has active connections.
Any input on this?
</pre>
</blockquote>
<pre wrap="">
I think I'd be fine with improvements in either direction.</pre>
</blockquote>
Thanks for your comment.<br>
<br>
I went with the first option and created this patch: <a href="https://gerrit.libreoffice.org/#/c/29018">
https://gerrit.libreoffice.org/#/c/29018</a><br>
Review appreciated.<br>
<br>
Regards<br>
Samuel<br>
</body>
</html>