Any help here would be appreciated. xCloseable.close(true) does not kill the soffice process off. Also, I am using version 3.3 versus 3.2 as stated below.
Thanks! From: Steele, Raymond Sent: Monday, January 28, 2013 3:44 PM To: 'ooo-...@incubator.apache.org'; 'ooo-...@incubator.apache.org'; 'ooo-...@incubator.apache.org' Subject: soffice process still running After implementing the below code, the soffice process continues to run. I check this using ps -ef| grep soffice on Solaris 10 x86 OpenOffice 3.2. Can anyone explain how to get this process to stop? I do not want to use the kill command because I do not want to kill any other instances of open office. Thanks! // Conditions: xDocument = m_xLoadedDocument // Check supported functionality of the document (model or controller). com.sun.star.frame.XModel xModel = (com.sun.star.frame.XModel)UnoRuntime.queryInterface( com.sun.star.frame.XModel.class,xDocument); if(xModel!=null) { // It is a full featured office document. // Try to use close mechanism instead of a hard dispose(). // But maybe such service is not available on this model. com.sun.star.util.XCloseable xCloseable = (com.sun.star.util.XCloseable)UnoRuntime.queryInterface( com.sun.star.util.XCloseable.class,xModel); if(xCloseable!=null) { try { // use close(boolean DeliverOwnership) // The boolean parameter DeliverOwnership tells objects vetoing the close process that they may // assume ownership if they object the closure by throwing a CloseVetoException // Here we give up ownership. To be on the safe side, catch possible veto exception anyway. xCloseable.close(true); } catch(com.sun.star.util.CloseVetoException exCloseVeto) { } } // If close is not supported by this model - try to dispose it. // But if the model disagree with a reset request for the modify state // we shouldn't do so. Otherwhise some strange things can happen. else { com.sun.star.lang.XComponent xDisposeable = (com.sun.star.lang.XComponent)UnoRuntime.queryInterface( com.sun.star.lang.XComponent.class,xModel); xDisposeable.dispose(); } catch(com.sun.star.beans.PropertyVetoException exModifyVeto) { } } } } Raymond Steele