/** * Retrieve the office service identifier. * * @return The identifier of the office service. */ public String getIdentifier() { String identifier = null; try { identifier = ( mPipe == null) ? getPipeName() : mPipe; } catch (UnsupportedEncodingException e) { throw new com.sun.star.uno.RuntimeException(e); } return identifier; }
System.out.println( e.getMessage() ); e.printStackTrace(); System.out.println( "--- end." ); throw e; e.printStackTrace(); System.out.println( "--- end." ); throw new com.sun.star.uno.RuntimeException(e);
public void removeEventListener( XEventListener xListener ) { if (xListener == null) throw new com.sun.star.uno.RuntimeException( "Listener must not be null" ); if (! m_eventListener.contains( xListener )) throw new com.sun.star.uno.RuntimeException( "Listener is not registered." ); m_eventListener.removeElement( xListener ); } }
public void removeEventListener( XEventListener xListener ) { if (xListener == null) throw new com.sun.star.uno.RuntimeException( "Listener must not be null" ); if (! m_eventListener.contains( xListener )) throw new com.sun.star.uno.RuntimeException( "Listener is not registered." ); m_eventListener.remove( xListener ); } }
public void addEventListener( XEventListener xListener ) { if (xListener == null) throw new com.sun.star.uno.RuntimeException( "Listener must not be null" ); if (m_eventListener.contains( xListener )) throw new com.sun.star.uno.RuntimeException( "Listener already registred." ); m_eventListener.add( xListener ); }
public void addEventListener( XEventListener xListener ) { if (xListener == null) throw new com.sun.star.uno.RuntimeException( "Listener must not be null" ); if (m_eventListener.contains( xListener )) throw new com.sun.star.uno.RuntimeException( "Listener already registred." ); m_eventListener.addElement( xListener ); } //______________________________________________________________________________________________
public void stopAccepting() { ServerSocket serv; synchronized (this) { serv = server; } try { serv.close(); } catch (IOException e) { throw new com.sun.star.uno.RuntimeException(e.toString()); } }
/** * * @see com.sun.star.connection.XAcceptor#stopAccepting */ public void stopAccepting() { ServerSocket serv; synchronized (this) { serv = server; } try { serv.close(); } catch (IOException e) { throw new com.sun.star.uno.RuntimeException(e); } }
/** * Adds a new <code>EventListener</code>. The listener is notified when a * service is added (removed) to (from) the <code>ServiceManager</code>. * If the listener is already registred a * <code>com.sun.star.uno.RuntimeException</code> will be thrown. * <p> * @param xListener the new listener which should been added. * @see com.sun.star.lang.XComponent */ public void addEventListener( XEventListener xListener ) throws com.sun.star.uno.RuntimeException { if (xListener == null) throw new com.sun.star.uno.RuntimeException("Listener must not be null"); if ( eventListener.contains(xListener) ) throw new com.sun.star.uno.RuntimeException("Listener already registred."); eventListener.addElement(xListener); }
/** * Removes a <code>EventListener</code> from the <code>ServiceManager</code>. * If the listener is not registered a <code>com.sun.star.uno.RuntimeException</code> * will be thrown. * <p> * @param xListener the new listener which should been removed. * @see com.sun.star.lang.XComponent */ public void removeEventListener( XEventListener xListener ) throws com.sun.star.uno.RuntimeException { if (xListener == null) throw new com.sun.star.uno.RuntimeException("Listener must not be null"); if ( !eventListener.contains(xListener) ) throw new com.sun.star.uno.RuntimeException("Listener is not registered."); eventListener.removeElement(xListener); }
/** * Removes a <code>EventListener</code> from the <code>ServiceManager</code>. * * <p>If the listener is not registered a <code>com.sun.star.uno.RuntimeException</code> * will be thrown.</p> * * @param xListener the new listener which should been removed. * @see com.sun.star.lang.XComponent */ public void removeEventListener( XEventListener xListener ) throws com.sun.star.uno.RuntimeException { if (xListener == null) throw new com.sun.star.uno.RuntimeException("Listener must not be null"); if ( !eventListener.contains(xListener) ) throw new com.sun.star.uno.RuntimeException("Listener is not registered."); eventListener.remove(xListener); }
/** * Adds a new <code>EventListener</code>. * * <p>The listener is notified when a service is added (removed) to (from) * the <code>ServiceManager</code>.</p> * * <p>If the listener is already registred a * <code>com.sun.star.uno.RuntimeException</code> will be thrown.</p> * * @param xListener the new listener which should been added. * @see com.sun.star.lang.XComponent */ public void addEventListener( XEventListener xListener ) throws com.sun.star.uno.RuntimeException { if (xListener == null) throw new com.sun.star.uno.RuntimeException("Listener must not be null"); if ( eventListener.contains(xListener) ) throw new com.sun.star.uno.RuntimeException("Listener already registred."); eventListener.add(xListener); }
/** * Supplies a list of all avialable services names. * * @return list of Strings of all service names. * @see com.sun.star.container.XContentEnumerationAccess */ public String[] getAvailableServiceNames() throws com.sun.star.uno.RuntimeException { try{ return factoriesByServiceNames.keySet().toArray( new String[ factoriesByServiceNames.size() ] ); } catch(Exception ex) { throw new com.sun.star.uno.RuntimeException(ex); } }
/** * Constructor. * Sets up paths to the office application and native libraries if * values are available in <code>OFFICE_PROP_FILE</code> in the user * home directory.<br> * "com.sun.star.beans.path" - the office application directory;<br> * "com.sun.star.beans.libpath" - native libraries directory. */ public LocalOfficeConnection() { // init member vars try { setUnoUrl( "uno:pipe,name=" + getPipeName() + ";urp;StarOffice.ServiceManager" ); } catch ( java.net.MalformedURLException e ) { throw new com.sun.star.uno.RuntimeException(e); } catch ( UnsupportedEncodingException e) { throw new com.sun.star.uno.RuntimeException(e); } }
throw new com.sun.star.uno.RuntimeException( exc, exc.getMessage(), this); throw new com.sun.star.uno.RuntimeException( exc, exc.getMessage(), this);
/** * Constructs a new <code>Type</code> with the given type name. * * @param typeName the name of this type; must not be <code>null</code>. */ public Type(String typeName) { if (typeName.startsWith("[]")) { _typeName = typeName; _typeClass = TypeClass.SEQUENCE; return; } for (int i = 0; i < __typeClassToTypeName.length; ++i) { if (__typeClassToTypeName[i].equals(typeName)) { _typeName = typeName; _typeClass = TypeClass.fromInt(i); return; } } int i = typeName.indexOf('<'); try { init( typeName, Class.forName(i < 0 ? typeName : typeName.substring(0, i)), false, i >= 0); } catch (ClassNotFoundException e) { throw new RuntimeException(e.toString()); } }
throw new com.sun.star.uno.RuntimeException( exc.toString(), this ); throw new com.sun.star.uno.RuntimeException( exc.toString(), this );
/** * Constructs a new <code>Type</code> with the given type name. * * @param typeName the name of this type; must not be <code>null</code>. */ public Type(String typeName) { if (typeName.startsWith("[]")) { _typeName = typeName; _typeClass = TypeClass.SEQUENCE; return; } for (int i = 0; i < __typeClassToTypeName.length; ++i) { if (__typeClassToTypeName[i].equals(typeName)) { _typeName = typeName; _typeClass = TypeClass.fromInt(i); return; } } int i = typeName.indexOf('<'); try { init( typeName, Class.forName(i < 0 ? typeName : typeName.substring(0, i)), false, i >= 0, false); } catch (ClassNotFoundException e) { throw new RuntimeException(e); } }
throw new com.sun.star.uno.RuntimeException(getClass().getName() + " can not find a useable constructor");
throw new com.sun.star.uno.RuntimeException(getClass().getName() + " can not find a useable constructor");