--- On Fri, 6/21/13, Vieri <rentor...@yahoo.com> wrote:

> Hi,
> 
> When I close my document/application with a java macro such
> as:
>  
> XModel xDocModel = xScriptContext.getDocument();
> xDocModel.dispose();
> 
> then the doc and application close but I notice that the
> soffice.bin and .exe (Windows 7) are still running as
> processes. The bad thing is that if I try to open another
> .odt file then it won't show up on screen (I will end up
> having several soffice.bin/.exe processes running but no
> GUI).
> 
> I've read somewhere that I should use .close(true) instead
> of .dispose() but I can't seem to find the .close method in
> Java. Any hints?
> 
> Anyway, is there anything wrong with .dispose()? 

I found the way to do it with Java:

XCloseable xcloseable = (XCloseable) UnoRuntime.queryInterface(
    XCloseable.class, xDocModel);
try {
  xcloseable.close(true);
} catch (Exception e) {
  e.printStackTrace();
}

and it closes the doc/app BUT soffice.bin and .exe are still running when the 
GUI closes....

Weird.

Vieri


-- 
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Reply via email to