Hi,

I'm currently trying to get OO Documents embedded into a JFrame. Mainly working with examples from the developers Guide such as OOoBeanViewer.java . I encountered the problem, that I'm not able to correctly terminate my OO process through the XDesktop interface. Neither with the example given in OOoBeanViewer.java nor with self-made closing routines.
The source code for terminating in the example looks like this:

   private void terminate()
   {
       setVisible(false);
       com.sun.star.frame.XDesktop xDesktop = null;
       try
       {
           xDesktop = aBean.getOOoDesktop();
       }
       catch (com.sun.star.comp.beans.NoConnectionException aExc)
       {
       } // ignore
       aBean.stopOOoConnection();
       stop();
       if (xDesktop != null)
           xDesktop.terminate();
       System.exit(0);
   }

I'm always getting a DisposedException Error. If I move aBean.stopOOoConnection() down further, after xDesktop.terminate(), no exception arises anymore. But the processes soffice.bin and soffice.exe are still running. By searching the web I found several approaches to this problem. (Killing the office process programatically, trying to close with XComponent::dispose() -- didn't work, starting in headless mode etc. etc.)

Most of them were ugly workarounds and they were from 2.x .

On this mailing list was once the same question but it was back in 2004 ( http://markmail.org/message/ostlb4xtc6axzqah ) and the answer was to use XDesktop::terminate(). But as already stated it's not working for me at the moment. Am I'm doing sth. wrong here or is it a bug that appeared in 3.x?

I'm using OOo 3.1.1(OOO310m19 Build9420), Java 1.5_017 and Windows XP.

Any advice/info would be great.

Regards,
Steffen Börsig

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to