diff options
Diffstat (limited to 'jurt/com/sun/star')
54 files changed, 671 insertions, 671 deletions
diff --git a/jurt/com/sun/star/comp/bridgefactory/BridgeFactory.java b/jurt/com/sun/star/comp/bridgefactory/BridgeFactory.java index a444f1813c3d..89174467af02 100644 --- a/jurt/com/sun/star/comp/bridgefactory/BridgeFactory.java +++ b/jurt/com/sun/star/comp/bridgefactory/BridgeFactory.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -51,13 +51,13 @@ import com.sun.star.uno.UnoRuntime; /** * The BridgeFactory class implements the <code>XBridgeFactory</code> Interface. - * It wrapps the <code>UnoRuntime#getBridgeByName</code>method and delivers a + * It wrapps the <code>UnoRuntime#getBridgeByName</code>method and delivers a * XBridge component. * <p> * This component is only usable for remote bridges. * <p> - * @version $Revision: 1.11 $ $ $Date: 2008-04-11 11:07:51 $ - * @author Kay Ramme + * @version $Revision: 1.11 $ $ $Date: 2008-04-11 11:07:51 $ + * @author Kay Ramme * @see com.sun.star.uno.UnoRuntime * @since UDK1.0 */ @@ -79,20 +79,20 @@ public class BridgeFactory implements XBridgeFactory/*, XEventListener*/ { * @param regKey the registryKey * @see com.sun.star.comp.loader.JavaLoader */ - public static XSingleServiceFactory __getServiceFactory(String implName, - XMultiServiceFactory multiFactory, + public static XSingleServiceFactory __getServiceFactory(String implName, + XMultiServiceFactory multiFactory, XRegistryKey regKey) { XSingleServiceFactory xSingleServiceFactory = null; if (implName.equals(BridgeFactory.class.getName()) ) xSingleServiceFactory = FactoryHelper.getServiceFactory(BridgeFactory.class, - multiFactory, + multiFactory, regKey); - + return xSingleServiceFactory; } - + /** * Writes the service information into the given registry key. * This method is called by the <code>JavaLoader</code> @@ -114,9 +114,9 @@ public class BridgeFactory implements XBridgeFactory/*, XEventListener*/ { * @param anInstanceProvider the instance provider * @see com.sun.star.bridge.XBridgeFactory */ - public XBridge createBridge(String sName, String sProtocol, XConnection aConnection, XInstanceProvider anInstanceProvider) throws - BridgeExistsException, - com.sun.star.lang.IllegalArgumentException, + public XBridge createBridge(String sName, String sProtocol, XConnection aConnection, XInstanceProvider anInstanceProvider) throws + BridgeExistsException, + com.sun.star.lang.IllegalArgumentException, com.sun.star.uno.RuntimeException { boolean hasName = sName.length() != 0; @@ -173,13 +173,13 @@ public class BridgeFactory implements XBridgeFactory/*, XEventListener*/ { if(xBridge != null) { if(xBridge.getName().equals(sName)) break; - + else xBridge = null; } } - + if(DEBUG) System.err.println("##### " + getClass().getName() + ".getBridge:" + sName + " " + xBridge); return xBridge; diff --git a/jurt/com/sun/star/comp/connections/Acceptor.java b/jurt/com/sun/star/comp/connections/Acceptor.java index 3df51e735a1c..2539bb528d25 100644 --- a/jurt/com/sun/star/comp/connections/Acceptor.java +++ b/jurt/com/sun/star/comp/connections/Acceptor.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/jurt/com/sun/star/comp/connections/Connector.java b/jurt/com/sun/star/comp/connections/Connector.java index c02db5c52b8b..6f0f351e2893 100644 --- a/jurt/com/sun/star/comp/connections/Connector.java +++ b/jurt/com/sun/star/comp/connections/Connector.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/jurt/com/sun/star/comp/connections/ConstantInstanceProvider.java b/jurt/com/sun/star/comp/connections/ConstantInstanceProvider.java index f63eeadf10d8..d3e188f3f73d 100644 --- a/jurt/com/sun/star/comp/connections/ConstantInstanceProvider.java +++ b/jurt/com/sun/star/comp/connections/ConstantInstanceProvider.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -38,11 +38,11 @@ import com.sun.star.comp.loader.FactoryHelper; /** - * The <code>ConstantInstanceProvider</code> is a component + * The <code>ConstantInstanceProvider</code> is a component * that implements the <code>XInstanceProvider</code> Interface. * <p> - * @version $Revision: 1.3 $ $ $Date: 2008-04-11 11:08:55 $ - * @author Kay Ramme + * @version $Revision: 1.3 $ $ $Date: 2008-04-11 11:08:55 $ + * @author Kay Ramme * @see com.sun.star.bridge.XBridge * @see com.sun.star.bridge.XBridgeFactory * @see com.sun.star.bridge.XInstanceProvider @@ -70,8 +70,8 @@ public class ConstantInstanceProvider implements XInstanceProvider { * @param regKey the registryKey * @see com.sun.star.comp.loader.JavaLoader */ - public static XSingleServiceFactory __getServiceFactory(String implName, - XMultiServiceFactory multiFactory, + public static XSingleServiceFactory __getServiceFactory(String implName, + XMultiServiceFactory multiFactory, XRegistryKey regKey) { XSingleServiceFactory xSingleServiceFactory = null; @@ -79,12 +79,12 @@ public class ConstantInstanceProvider implements XInstanceProvider { if (implName.equals(ConstantInstanceProvider.class.getName()) ) xSingleServiceFactory = FactoryHelper.getServiceFactory(ConstantInstanceProvider.class, __serviceName, - multiFactory, + multiFactory, regKey); - + return xSingleServiceFactory; } - + /** * Writes the service information into the given registry key. * This method is called by the <code>JavaLoader</code> diff --git a/jurt/com/sun/star/comp/connections/Implementation.java b/jurt/com/sun/star/comp/connections/Implementation.java index 466ea9741766..05fe4c750928 100644 --- a/jurt/com/sun/star/comp/connections/Implementation.java +++ b/jurt/com/sun/star/comp/connections/Implementation.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/jurt/com/sun/star/comp/connections/PipedConnection.java b/jurt/com/sun/star/comp/connections/PipedConnection.java index 630adf4e223b..ee772124e39e 100644 --- a/jurt/com/sun/star/comp/connections/PipedConnection.java +++ b/jurt/com/sun/star/comp/connections/PipedConnection.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -43,8 +43,8 @@ import com.sun.star.registry.XRegistryKey; * It is useful for <code>Thread</code> communication * in one Process. * <p> - * @version $Revision: 1.3 $ $ $Date: 2008-04-11 11:09:30 $ - * @author Kay Ramme + * @version $Revision: 1.3 $ $ $Date: 2008-04-11 11:09:30 $ + * @author Kay Ramme * @see com.sun.star.connections.XConnection * @see com.sun.star.loader.JavaLoader * @since UDK1.0 @@ -70,8 +70,8 @@ public class PipedConnection implements XConnection { * @param regKey the registryKey * @see com.sun.star.comp.loader.JavaLoader */ - public static XSingleServiceFactory __getServiceFactory(String implName, - XMultiServiceFactory multiFactory, + public static XSingleServiceFactory __getServiceFactory(String implName, + XMultiServiceFactory multiFactory, XRegistryKey regKey) { XSingleServiceFactory xSingleServiceFactory = null; @@ -79,12 +79,12 @@ public class PipedConnection implements XConnection { if (implName.equals(PipedConnection.class.getName()) ) xSingleServiceFactory = FactoryHelper.getServiceFactory(PipedConnection.class, __serviceName, - multiFactory, + multiFactory, regKey); - + return xSingleServiceFactory; } - + /** * Writes the service information into the given registry key. * This method is called by the <code>JavaLoader</code> @@ -104,14 +104,14 @@ public class PipedConnection implements XConnection { */ protected static final int __waitTime = 10000; - protected byte _buffer[] = new byte[4096]; - protected int _in, + protected byte _buffer[] = new byte[4096]; + protected int _in, _out; - protected boolean _closed; + protected boolean _closed; protected PipedConnection _otherSide; /** - * Constructs a new <code>PipedConnection</code>, sees if there + * Constructs a new <code>PipedConnection</code>, sees if there * is an other side, which it should be connected to. * <p> * @param args Another side could be in index 0. @@ -121,7 +121,7 @@ public class PipedConnection implements XConnection { _otherSide = (args.length == 1) ? (PipedConnection)args[0] : null; if(_otherSide != null) { - if(_otherSide == this) + if(_otherSide == this) throw new RuntimeException("can not connect to myself"); _otherSide._otherSide = this; @@ -129,7 +129,7 @@ public class PipedConnection implements XConnection { } /** - * This is a private method, used to cummunicate + * This is a private method, used to cummunicate * internal in the pipe. */ private synchronized void receive(byte aData[]) throws com.sun.star.io.IOException { @@ -166,7 +166,7 @@ public class PipedConnection implements XConnection { else { bytes = Math.min(aData.length - bytesWritten, _buffer.length - _out - 1); } - + System.arraycopy(aData, bytesWritten, _buffer, _out, bytes); } @@ -262,7 +262,7 @@ public class PipedConnection implements XConnection { public synchronized void close() throws com.sun.star.io.IOException, com.sun.star.uno.RuntimeException { if(!_closed) { _closed = true; - + _otherSide.close(); notify(); diff --git a/jurt/com/sun/star/comp/loader/FactoryHelper.java b/jurt/com/sun/star/comp/loader/FactoryHelper.java index 29b484631670..4bd6ef595f21 100644 --- a/jurt/com/sun/star/comp/loader/FactoryHelper.java +++ b/jurt/com/sun/star/comp/loader/FactoryHelper.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -51,8 +51,8 @@ import com.sun.star.uno.Type; * This class has default implementations for <code>getServiceFactory</code> * and <code>writeRegistryServiceInfo</code>. * <p> - * @version $Revision: 1.9 $ $ $Date: 2008-04-11 11:10:09 $ - * @author Kay Ramme + * @version $Revision: 1.9 $ $ $Date: 2008-04-11 11:10:09 $ + * @author Kay Ramme * @see com.sun.star.lang.XMultiServiceFactory * @see com.sun.star.lang.XServiceInfo * @see com.sun.star.lang.XSingleServiceFactory @@ -80,19 +80,19 @@ public class FactoryHelper { // private static final boolean DEBUG = false; protected XMultiServiceFactory _xMultiServiceFactory; - protected XRegistryKey _xRegistryKey; + protected XRegistryKey _xRegistryKey; protected int _nCode; - protected Constructor _constructor; + protected Constructor _constructor; protected String _implName; protected String _serviceName; // keeps the Id for XTypeProvider protected static Object _mutex= new Object(); private static byte[] _implementationId; - protected Factory(Class implClass, - String serviceName, - XMultiServiceFactory xMultiServiceFactory, - XRegistryKey xRegistryKey) + protected Factory(Class implClass, + String serviceName, + XMultiServiceFactory xMultiServiceFactory, + XRegistryKey xRegistryKey) { _xMultiServiceFactory = xMultiServiceFactory; _xRegistryKey = xRegistryKey; @@ -109,7 +109,7 @@ public class FactoryHelper { && parameters[2].equals(__objectArray)) { _nCode = 0; _constructor = constructors[i]; - } + } else if(parameters.length == 2 && parameters[0].equals(XComponentContext.class) && parameters[1].equals(XRegistryKey.class)) { @@ -122,7 +122,7 @@ public class FactoryHelper { _nCode = 2; _constructor = constructors[i]; } - else if(parameters.length == 1 + else if(parameters.length == 1 && parameters[0].equals(XComponentContext.class)) { _nCode = 3; _constructor = constructors[i]; @@ -134,7 +134,7 @@ public class FactoryHelper { && parameters[2].equals(__objectArray)) { _nCode = 4; _constructor = constructors[i]; - } + } else if(parameters.length == 2 && parameters[0].equals(XMultiServiceFactory.class) && parameters[1].equals(XRegistryKey.class)) { @@ -147,7 +147,7 @@ public class FactoryHelper { _nCode = 6; _constructor = constructors[i]; } - else if(parameters.length == 1 + else if(parameters.length == 1 && parameters[0].equals(XMultiServiceFactory.class)) { _nCode = 7; _constructor = constructors[i]; @@ -179,7 +179,7 @@ public class FactoryHelper { return _xMultiServiceFactory; } } - + // XComponentContext impl //______________________________________________________________________________________________ public Object createInstanceWithContext( @@ -220,7 +220,7 @@ public class FactoryHelper { args = new Object [ 0 ]; break; } - + try { return _constructor.newInstance( args ); @@ -228,7 +228,7 @@ public class FactoryHelper { catch (InvocationTargetException invocationTargetException) { Throwable targetException = invocationTargetException.getTargetException(); - + if (targetException instanceof java.lang.RuntimeException) throw (java.lang.RuntimeException)targetException; else if (targetException instanceof com.sun.star.uno.Exception) @@ -293,7 +293,7 @@ public class FactoryHelper { args = new Object [ 0 ]; break; } - + try { Object instance = _constructor.newInstance( args ); @@ -311,7 +311,7 @@ public class FactoryHelper { catch (InvocationTargetException invocationTargetException) { Throwable targetException = invocationTargetException.getTargetException(); - + if (targetException instanceof java.lang.RuntimeException) throw (java.lang.RuntimeException)targetException; else if (targetException instanceof com.sun.star.uno.Exception) @@ -330,15 +330,15 @@ public class FactoryHelper { throw new com.sun.star.uno.Exception( instantiationException.toString() ); } } - + /** * Creates an instance of the desired service. * <p> * @return returns an instance of the desired service * @see com.sun.star.lang.XSingleServiceFactory */ - public Object createInstance() - throws com.sun.star.uno.Exception, + public Object createInstance() + throws com.sun.star.uno.Exception, com.sun.star.uno.RuntimeException { return createInstanceWithContext( null ); @@ -348,16 +348,16 @@ public class FactoryHelper { * Creates an instance of the desired service. * <p> * @return returns an instance of the desired service - * @param args the args given to the constructor of the service + * @param args the args given to the constructor of the service * @see com.sun.star.lang.XSingleServiceFactory */ - public Object createInstanceWithArguments(Object[] args) - throws com.sun.star.uno.Exception, - com.sun.star.uno.RuntimeException + public Object createInstanceWithArguments(Object[] args) + throws com.sun.star.uno.Exception, + com.sun.star.uno.RuntimeException { return createInstanceWithArgumentsAndContext( args, null ); } - + /** * Gives the supported services * <p> @@ -394,7 +394,7 @@ public class FactoryHelper { return found; } - + //XTypeProvider public byte[] getImplementationId() { @@ -416,7 +416,7 @@ public class FactoryHelper { for (int i= 0; i < nNameLength; i++) { _implementationId[4 + i]= arName[i]; - } + } } } return _implementationId; @@ -432,7 +432,7 @@ public class FactoryHelper { }; return t; } - + } /** @@ -441,13 +441,13 @@ public class FactoryHelper { * @deprecated as of UDK 1.0 * <p> * @return returns a factory - * @param implClass the implementing class + * @param implClass the implementing class * @param multiFactory the given multi service factory (service manager) * @param regKey the given registry key * @see com.sun.star.lang.XServiceInfo */ - static public XSingleServiceFactory getServiceFactory(Class implClass, - XMultiServiceFactory multiFactory, + static public XSingleServiceFactory getServiceFactory(Class implClass, + XMultiServiceFactory multiFactory, XRegistryKey regKey) { XSingleServiceFactory xSingleServiceFactory = null; @@ -461,7 +461,7 @@ public class FactoryHelper { catch(NoSuchFieldException noSuchFieldExceptio) { serviceName = implClass.getField("serviceName"); // old style } - + xSingleServiceFactory = new Factory(implClass, (String)serviceName.get(null), multiFactory, regKey); } catch(NoSuchFieldException noSuchFieldException) { @@ -470,67 +470,67 @@ public class FactoryHelper { catch(IllegalAccessException illegalAccessException) { System.err.println("##### FactoryHelper.getServiceFactory - exception:" + illegalAccessException); } - + return xSingleServiceFactory; } - + /** * Creates a factory for the given class. * <p> * @return returns a factory - * @param implClass the implementing class + * @param implClass the implementing class * @param serviceName the service name of the implementing class * @param multiFactory the given multi service factory (service manager) * @param regKey the given registry key * @see com.sun.star.lang.XServiceInfo */ - static public XSingleServiceFactory getServiceFactory(Class implClass, + static public XSingleServiceFactory getServiceFactory(Class implClass, String serviceName, - XMultiServiceFactory multiFactory, + XMultiServiceFactory multiFactory, XRegistryKey regKey) { return new Factory(implClass, serviceName, multiFactory, regKey); } - + /** Creates a factory for the given class. - + @return returns a factory object - @param implClass the implementing class + @param implClass the implementing class */ static public Object createComponentFactory( Class implClass, String serviceName ) { return new Factory( implClass, serviceName, null, null ); } - + /** * Writes the registration data into the registry key * <p> * @return success - * @param implName the name of the implementing class + * @param implName the name of the implementing class * @param serviceName the service name * @param regKey the given registry key * @see com.sun.star.lang.XServiceInfo */ static public boolean writeRegistryServiceInfo(String implName, String serviceName, XRegistryKey regKey) { boolean result = false; - + try { XRegistryKey newKey = regKey.createKey("/" + implName + "/UNO/SERVICES"); - + newKey.createKey(serviceName); - + result = true; } catch (Exception ex) { System.err.println(">>>Connection_Impl.writeRegistryServiceInfo " + ex); } - + return result; } /** Writes the registration data into the registry key. * Several services are supported. - * + * * @param impl_name name of implementation * @param supported_services supported services of implementation * @param xKey registry key to write to diff --git a/jurt/com/sun/star/comp/loader/JavaLoader.java b/jurt/com/sun/star/comp/loader/JavaLoader.java index 47723b208497..2fec17bfe6d4 100644 --- a/jurt/com/sun/star/comp/loader/JavaLoader.java +++ b/jurt/com/sun/star/comp/loader/JavaLoader.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -62,30 +62,30 @@ import com.sun.star.uno.AnyConverter; * service. Therefor the <code>JavaLoader</code> activates external UNO components which are implemented in Java. * The loader is used by the <code>ServiceManger</code>. * <p> - * @version $Revision: 1.16 $ $ $Date: 2008-04-11 11:10:31 $ - * @author Markus Herzog + * @version $Revision: 1.16 $ $ $Date: 2008-04-11 11:10:31 $ + * @author Markus Herzog * @see com.sun.star.loader.XImplementationLoader * @see com.sun.star.loader.Java * @see com.sun.star.comp.servicemanager.ServiceManager - * @see com.sun.star.lang.ServiceManager + * @see com.sun.star.lang.ServiceManager * @since UDK1.0 - */ -public class JavaLoader implements XImplementationLoader, + */ +public class JavaLoader implements XImplementationLoader, XServiceInfo, XInitialization { private static final boolean DEBUG = false; - + private static final void DEBUG(String dbg) { if (DEBUG) System.err.println( dbg ); } - + private static String[] supportedServices = { "com.sun.star.loader.Java" }; - + protected XMultiServiceFactory multiServiceFactory = null; - + private XMacroExpander m_xMacroExpander = null; private static final String EXPAND_PROTOCOL_PREFIX = "vnd.sun.star.expand:"; @@ -146,51 +146,51 @@ public class JavaLoader implements XImplementationLoader, } return url; } - + /** default constructor */ - + /** * Creates a new instance of the <code>JavaLoader</code> class. * <p> - * @return new instance + * @return new instance */ public JavaLoader() {} - + /** * Creates a new <code>JavaLoader</code> object. The specified <code>com.sun.star.lang.XMultiServiceFactory</code> * is the <code>ServiceManager</code> service which can be deliviert to all components the <code>JavaLoader</code> is - * loading. + * loading. * To set the <code>MultiServiceFactory</code> you can use the <code>com.sun.star.lang.XInitialization</code> interface, either. * <p> - * @return new instance - * @param factory the <code>ServiceManager</code> - * @see com.sun.star.lang.ServiceManager - * @see com.sun.star.lang.ServiceManager - * @see com.sun.star.lang.XInitialization + * @return new instance + * @param factory the <code>ServiceManager</code> + * @see com.sun.star.lang.ServiceManager + * @see com.sun.star.lang.ServiceManager + * @see com.sun.star.lang.XInitialization */ public JavaLoader(XMultiServiceFactory factory) { multiServiceFactory = factory; } /** - * Unlike the original intention, the method could be called every time a new + * Unlike the original intention, the method could be called every time a new * <code>com.sun.star.lang.XMultiServiceFactory</code> should be set at the loader. * <p> - * @param args - the first parameter (args[0]) specifices the <code>ServiceManager</code> - * @see com.sun.star.lang.XInitialization - * @see com.sun.star.lang.ServiceManager + * @param args - the first parameter (args[0]) specifices the <code>ServiceManager</code> + * @see com.sun.star.lang.XInitialization + * @see com.sun.star.lang.ServiceManager */ - public void initialize( java.lang.Object[] args ) - throws com.sun.star.uno.Exception, + public void initialize( java.lang.Object[] args ) + throws com.sun.star.uno.Exception, com.sun.star.uno.RuntimeException - { + { if (args.length == 0) throw new com.sun.star.lang.IllegalArgumentException("No arguments specified"); - + try { multiServiceFactory = (XMultiServiceFactory) AnyConverter.toObject( new Type(XMultiServiceFactory.class), args[0]); - } + } catch (ClassCastException castEx) { throw new com.sun.star.lang.IllegalArgumentException( "The argument must be an instance of XMultiServiceFactory"); @@ -201,23 +201,23 @@ public class JavaLoader implements XImplementationLoader, * Supplies the implementation name of the component. * <p> * @return the implementation name - here the class name - * @see com.sun.star.lang.XServiceInfo + * @see com.sun.star.lang.XServiceInfo */ - public String getImplementationName() - throws com.sun.star.uno.RuntimeException + public String getImplementationName() + throws com.sun.star.uno.RuntimeException { return getClass().getName(); } - + /** * Verifies if a given service is supported by the component. * <p> - * @return true,if service is suported - otherwise false - * @param serviceName the name of the service that should be checked - * @see com.sun.star.lang.XServiceInfo + * @return true,if service is suported - otherwise false + * @param serviceName the name of the service that should be checked + * @see com.sun.star.lang.XServiceInfo */ - public boolean supportsService(String serviceName) - throws com.sun.star.uno.RuntimeException + public boolean supportsService(String serviceName) + throws com.sun.star.uno.RuntimeException { for ( int i = 0; i < supportedServices.length; i++ ) { if ( supportedServices[i].equals(serviceName) ) @@ -225,50 +225,50 @@ public class JavaLoader implements XImplementationLoader, } return false; } - + /** * Supplies a list of all service names supported by the component * <p> - * @return a String array with all supported services - * @see com.sun.star.lang.XServiceInfo + * @return a String array with all supported services + * @see com.sun.star.lang.XServiceInfo */ - public String[] getSupportedServiceNames() - throws com.sun.star.uno.RuntimeException + public String[] getSupportedServiceNames() + throws com.sun.star.uno.RuntimeException { return supportedServices; } - + /** * Provides a components factory. - * The <code>JavaLoader</code> tries to load the class first. If a loacation URL is given the + * The <code>JavaLoader</code> tries to load the class first. If a loacation URL is given the * RegistrationClassFinder is used to load the class. Otherwise the class is loaded thru the Class.forName * method. - * To get the factory the inspects the class for the optional static member functions __getServiceFactory resp. + * To get the factory the inspects the class for the optional static member functions __getServiceFactory resp. * getServiceFactory (DEPRECATED). * If the function can not be found a default factory @see ComponentFactoryWrapper will be created. * <p> - * @return the factory for the component (@see com.sun.star.lang.XSingleServiceFactory) - * @param implementationName the implementation (class) name of the component - * @param implementationLoaderUrl the URL of the implementation loader. Not used. - * @param locationUrl points to an archive (JAR file) which contains a component - * @param xKey - * @see com.sun.star.lang.XImplementationLoader - * @see com.sun.star.com.loader.RegistrationClassFinder + * @return the factory for the component (@see com.sun.star.lang.XSingleServiceFactory) + * @param implementationName the implementation (class) name of the component + * @param implementationLoaderUrl the URL of the implementation loader. Not used. + * @param locationUrl points to an archive (JAR file) which contains a component + * @param xKey + * @see com.sun.star.lang.XImplementationLoader + * @see com.sun.star.com.loader.RegistrationClassFinder */ - public java.lang.Object activate( String implementationName, - String implementationLoaderUrl, - String locationUrl, - XRegistryKey xKey ) - throws CannotActivateFactoryException, - com.sun.star.uno.RuntimeException + public java.lang.Object activate( String implementationName, + String implementationLoaderUrl, + String locationUrl, + XRegistryKey xKey ) + throws CannotActivateFactoryException, + com.sun.star.uno.RuntimeException { locationUrl = expand_url( locationUrl ); - + Object returnObject = null; Class clazz = null; - + DEBUG("try to get factory for " + implementationName); - + // first we must get the class of the implementation // 1. If a location URL is given it is assumed that this points to a JAR file. // The components class name is stored in the manifest file. @@ -283,7 +283,7 @@ public class JavaLoader implements XImplementationLoader, else { // 2. clazz = Class.forName( implementationName ); - } + } } catch (java.net.MalformedURLException e) { CannotActivateFactoryException cae = new CannotActivateFactoryException( @@ -312,10 +312,10 @@ public class JavaLoader implements XImplementationLoader, cae.fillInStackTrace(); throw cae; } - - Class[] paramTypes = {String.class, XMultiServiceFactory.class, XRegistryKey.class}; + + Class[] paramTypes = {String.class, XMultiServiceFactory.class, XRegistryKey.class}; Object[] params = { implementationName, multiServiceFactory, xKey }; - + // try to get factory from implemetation class // latest style: use the public static method __getComponentFactory // - new style: use the public static method __getServiceFactory @@ -327,23 +327,23 @@ public class JavaLoader implements XImplementationLoader, compfac_method = clazz.getMethod( "__getComponentFactory", new Class [] { String.class } ); } - catch ( NoSuchMethodException noSuchMethodEx) {} + catch ( NoSuchMethodException noSuchMethodEx) {} catch ( SecurityException secEx) {} - + Method method = null; if (null == compfac_method) { try { method = clazz.getMethod("__getServiceFactory", paramTypes); - } + } catch ( NoSuchMethodException noSuchMethodEx) { method = null; - } + } catch ( SecurityException secEx) { method = null; } } - + try { if (null != compfac_method) { @@ -360,35 +360,35 @@ public class JavaLoader implements XImplementationLoader, if ( method == null ) { method = clazz.getMethod("getServiceFactory", paramTypes); } - + Object oRet = method.invoke(clazz, params); - + if ( (oRet != null) && (oRet instanceof XSingleServiceFactory) ) { - returnObject = (XSingleServiceFactory) oRet; + returnObject = (XSingleServiceFactory) oRet; } } } catch ( NoSuchMethodException e) { - throw new CannotActivateFactoryException("Can not activate the factory for " + throw new CannotActivateFactoryException("Can not activate the factory for " + implementationName + " because " + e.toString() ); - } + } catch ( SecurityException e) { - throw new CannotActivateFactoryException("Can not activate the factory for " + throw new CannotActivateFactoryException("Can not activate the factory for " + implementationName + " because " + e.toString() ); } catch ( IllegalAccessException e ) { - throw new CannotActivateFactoryException("Can not activate the factory for " + throw new CannotActivateFactoryException("Can not activate the factory for " + implementationName + " because " + e.toString() ); } catch ( IllegalArgumentException e ) { - throw new CannotActivateFactoryException("Can not activate the factory for " + throw new CannotActivateFactoryException("Can not activate the factory for " + implementationName + " because " + e.toString() ); } catch ( InvocationTargetException e ) { - throw new CannotActivateFactoryException("Can not activate the factory for " + throw new CannotActivateFactoryException("Can not activate the factory for " + implementationName + " because " + e.getTargetException().toString() ); } - + return returnObject; } @@ -397,24 +397,24 @@ public class JavaLoader implements XImplementationLoader, * methods __writeRegistryServiceInfo, writeRegistryServiceInfo (DEPRECATED), the call is delegated to that * method. Otherwise a default registration will be accomplished. * <p> - * @return true if registration is successfully - otherwise false - * @param regKey the root key under that the component should be registred. - * @param implementationLoaderUrl specifies the loader, the component is loaded by. - * @param locationUrl points to an archive (JAR file) which contains a component - * @see ComponentFactoryWrapper + * @return true if registration is successfully - otherwise false + * @param regKey the root key under that the component should be registred. + * @param implementationLoaderUrl specifies the loader, the component is loaded by. + * @param locationUrl points to an archive (JAR file) which contains a component + * @see ComponentFactoryWrapper */ - public boolean writeRegistryInfo( XRegistryKey regKey, - String implementationLoaderUrl, + public boolean writeRegistryInfo( XRegistryKey regKey, + String implementationLoaderUrl, String locationUrl ) - throws CannotRegisterImplementationException, + throws CannotRegisterImplementationException, com.sun.star.uno.RuntimeException { locationUrl = expand_url( locationUrl ); - - boolean success = false; - + + boolean success = false; + try { - + Class clazz = RegistrationClassFinder.find(locationUrl); if (null == clazz) { @@ -426,57 +426,57 @@ public class JavaLoader implements XImplementationLoader, Object[] params = { regKey }; Method method = clazz.getMethod("__writeRegistryServiceInfo", paramTypes); - Object oRet = method.invoke(clazz, params); + Object oRet = method.invoke(clazz, params); if ( (oRet != null) && (oRet instanceof Boolean) ) success = ((Boolean) oRet).booleanValue(); - } + } catch (Exception e) { throw new CannotRegisterImplementationException( e.getMessage()); } - + return success; } - + /** * Supplies the factory for the <code>JavaLoader</code> * <p> - * @return the factory for the <code>JavaLoader</code> - * @param implName the name of the desired component - * @param multiFactory the <code>ServiceManager</code> is delivered to the factory - * @param regKey not used - can be null + * @return the factory for the <code>JavaLoader</code> + * @param implName the name of the desired component + * @param multiFactory the <code>ServiceManager</code> is delivered to the factory + * @param regKey not used - can be null */ - public static XSingleServiceFactory getServiceFactory( String implName, - XMultiServiceFactory multiFactory, + public static XSingleServiceFactory getServiceFactory( String implName, + XMultiServiceFactory multiFactory, XRegistryKey regKey) - { + { if ( implName.equals(JavaLoader.class.getName()) ) return new JavaLoaderFactory( multiFactory ); - + return null; } - + /** * Registers the <code>JavaLoader</code> at the registry. * <p> * @return true if registration succseeded - otherwise false - * @param regKey root key under which the <code>JavaLoader</code> should be regidstered + * @param regKey root key under which the <code>JavaLoader</code> should be regidstered */ public static boolean writeRegistryServiceInfo(XRegistryKey regKey) { boolean result = false; - + try { XRegistryKey newKey = regKey.createKey("/" + JavaLoader.class.getName() + "/UNO/SERVICE"); - + for (int i=0; i<supportedServices.length; i++) newKey.createKey(supportedServices[i]); - + result = true; } catch (Exception ex) { if (DEBUG) System.err.println(">>>JavaLoader.writeRegistryServiceInfo " + ex); } - + return result; } } diff --git a/jurt/com/sun/star/comp/loader/JavaLoaderFactory.java b/jurt/com/sun/star/comp/loader/JavaLoaderFactory.java index 22981f2081e3..f3f6de9e6637 100644 --- a/jurt/com/sun/star/comp/loader/JavaLoaderFactory.java +++ b/jurt/com/sun/star/comp/loader/JavaLoaderFactory.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -40,51 +40,51 @@ public class JavaLoaderFactory implements XSingleServiceFactory, XServiceInfo { }; private static final boolean DEBUG = false; - + private static final void DEBUG(String dbg) { if (DEBUG) System.err.println(" >>> JavaLoaderFactory - " + dbg); } - + protected XMultiServiceFactory multiServiceFactory = null; - + /** default constructor */ -// public JavaLoaderFactory() {} - +// public JavaLoaderFactory() {} + public JavaLoaderFactory(XMultiServiceFactory factory) { multiServiceFactory = factory; } - - public java.lang.Object createInstance() - throws com.sun.star.uno.Exception, + + public java.lang.Object createInstance() + throws com.sun.star.uno.Exception, com.sun.star.uno.RuntimeException { return new JavaLoader(multiServiceFactory); } - public java.lang.Object createInstanceWithArguments( java.lang.Object[] args ) - throws com.sun.star.uno.Exception, + public java.lang.Object createInstanceWithArguments( java.lang.Object[] args ) + throws com.sun.star.uno.Exception, com.sun.star.uno.RuntimeException { JavaLoader loader = new JavaLoader(); loader.initialize(args); - + return loader; } - + /** implements the XServiceInfo interface */ - public String getImplementationName() - throws com.sun.star.uno.RuntimeException + public String getImplementationName() + throws com.sun.star.uno.RuntimeException { return JavaLoader.class.getName(); } - + /** implements the XServiceInfo interface */ - public boolean supportsService(String serviceName) - throws com.sun.star.uno.RuntimeException + public boolean supportsService(String serviceName) + throws com.sun.star.uno.RuntimeException { for ( int i = 0; i < supportedServices.length; i++ ) { if ( supportedServices[i].equals(serviceName) ) @@ -92,11 +92,11 @@ public class JavaLoaderFactory implements XSingleServiceFactory, XServiceInfo { } return false; } - + /** implements the XServiceInfo interface */ - public String[] getSupportedServiceNames() - throws com.sun.star.uno.RuntimeException + public String[] getSupportedServiceNames() + throws com.sun.star.uno.RuntimeException { return supportedServices; } diff --git a/jurt/com/sun/star/comp/loader/RegistrationClassFinder.java b/jurt/com/sun/star/comp/loader/RegistrationClassFinder.java index 3a40daab866b..e3c3190e9139 100644 --- a/jurt/com/sun/star/comp/loader/RegistrationClassFinder.java +++ b/jurt/com/sun/star/comp/loader/RegistrationClassFinder.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/jurt/com/sun/star/comp/servicemanager/ServiceManager.java b/jurt/com/sun/star/comp/servicemanager/ServiceManager.java index 3d672c6dfddf..cb60885443e0 100644 --- a/jurt/com/sun/star/comp/servicemanager/ServiceManager.java +++ b/jurt/com/sun/star/comp/servicemanager/ServiceManager.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -58,8 +58,8 @@ import java.lang.reflect.InvocationTargetException; * calls to the implementing objects and are used instead of casts * and identity comparisons. * <p> - * @version $Revision: 1.10 $ $ $Date: 2008-04-11 11:11:46 $ - * @author Markus Herzog + * @version $Revision: 1.10 $ $ $Date: 2008-04-11 11:11:46 $ + * @author Markus Herzog * @see com.sun.star.lang.XMultiServiceFactory * @see com.sun.star.container.XSet * @see com.sun.star.container.XContentEnumerationAccess @@ -67,21 +67,21 @@ import java.lang.reflect.InvocationTargetException; * @see com.sun.star.lang.XServiceInfo * @see com.sun.star.lang.XInitialization * @since UDK1.0 - */ + */ public class ServiceManager implements XMultiServiceFactory, - XMultiComponentFactory, - XSet, - XContentEnumerationAccess, - XComponent, + XMultiComponentFactory, + XSet, + XContentEnumerationAccess, + XComponent, XServiceInfo, XInitialization { private static final boolean DEBUG = false; - + private static final void DEBUG (String dbg) { if (DEBUG) System.err.println( dbg ); } - + private static com.sun.star.uno.Type UNO_TYPE = null; XImplementationLoader loader = null; @@ -93,10 +93,10 @@ public class ServiceManager implements XMultiServiceFactory, java.util.Vector eventListener; java.util.Hashtable factoriesByImplNames; - java.util.Hashtable factoriesByServiceNames; // keys: - + java.util.Hashtable factoriesByServiceNames; // keys: + private com.sun.star.uno.XComponentContext m_xDefaultContext; - + /** * Creates a new instance of the <code>ServiceManager</code>. */ @@ -115,77 +115,77 @@ public class ServiceManager implements XMultiServiceFactory, factoriesByServiceNames = new java.util.Hashtable(); m_xDefaultContext = xContext; } - + /** - * Returns the service factory for the <code>ServiceManager</code>. If the given implementation name + * Returns the service factory for the <code>ServiceManager</code>. If the given implementation name * does not equal to the <code>ServiceManagers</code> class name null will be returned. * <p> * @return the factory for the <code>ServiceManager</code>. - * @param implName the implementation name of the of the service. + * @param implName the implementation name of the of the service. * Must be equal to <code>com.sun.star.comp.servicemanager.ServicManager</code> - * @param multiFactory refernce of the <code>MultiServiceFactory</code>. This parameter will be ignored. - * @param regKey the root key of the registry. This parameter will be ignored. + * @param multiFactory refernce of the <code>MultiServiceFactory</code>. This parameter will be ignored. + * @param regKey the root key of the registry. This parameter will be ignored. */ - public static XSingleServiceFactory getServiceFactory( String implName, - XMultiServiceFactory multiFactory, + public static XSingleServiceFactory getServiceFactory( String implName, + XMultiServiceFactory multiFactory, XRegistryKey regKey) - { + { if ( implName.equals(ServiceManager.class.getName()) ) return new ServiceManagerFactory(); - + return null; } - + /** * Supplies a Java component loader. The loader component must be enlisted at the <code>ServiceManager</code> before. * <p> - * @return a new instance of the Java component loader - * @see com.sun.star.loader.Java - */ - private XImplementationLoader getLoader() - throws com.sun.star.uno.Exception, + * @return a new instance of the Java component loader + * @see com.sun.star.loader.Java + */ + private XImplementationLoader getLoader() + throws com.sun.star.uno.Exception, com.sun.star.uno.RuntimeException { - Object[] param = { this }; - DEBUG("make loader"); + Object[] param = { this }; + DEBUG("make loader"); Object loaderObj = createInstanceWithArgumentsAndContext( "com.sun.star.loader.Java", param, m_xDefaultContext ); - + if (loaderObj == null) throw new com.sun.star.uno.Exception("Can get an instance of com.sun.star.loader.Java"); - + return UnoRuntime.queryInterface( XImplementationLoader.class, loaderObj ); } /** * Registers a list of components given by their class names. - * <p> - * @param newImpls list of the components that should be registered, given by their class names. - * If any exception occured during the registration, the process will be canceled. - * @see com.sun.star.container.XSet + * <p> + * @param newImpls list of the components that should be registered, given by their class names. + * If any exception occured during the registration, the process will be canceled. + * @see com.sun.star.container.XSet */ - private void xaddFactories( String[] newImpls ) + private void xaddFactories( String[] newImpls ) throws com.sun.star.uno.Exception { - for (int i=0; i<newImpls.length; i++) { + for (int i=0; i<newImpls.length; i++) { DEBUG ("try to add " + newImpls[i] ); Object newFactory = null; - + try { if (loader == null) loader = getLoader(); - + newFactory = loader.activate( newImpls[i], null, null, null ); - } + } catch (com.sun.star.uno.Exception e) { - + //****************************** BEGIN DEPRECATED ****************************************** - + try { // try to get the class of the implementation Class clazz = Class.forName( newImpls[i] ); - + Class[] methodClassParam = { String.class, XMultiServiceFactory.class, XRegistryKey.class }; java.lang.reflect.Method getFactoryMeth = null; try { @@ -197,12 +197,12 @@ public class ServiceManager implements XMultiServiceFactory, catch (SecurityException securityExc) { getFactoryMeth = null; } - + if (getFactoryMeth == null) getFactoryMeth = clazz.getMethod("getServiceFactory", methodClassParam); - - Object[] methodParams = { newImpls[i], this, null }; - newFactory = getFactoryMeth.invoke( clazz, methodParams ); + + Object[] methodParams = { newImpls[i], this, null }; + newFactory = getFactoryMeth.invoke( clazz, methodParams ); } catch (NoSuchMethodException ex) {} catch (SecurityException ex) {} @@ -210,13 +210,13 @@ public class ServiceManager implements XMultiServiceFactory, catch (IllegalAccessException ex) {} catch (IllegalArgumentException ex) {} catch (InvocationTargetException ex) {} - + //****************************** END DEPRECATED ****************************************** } - + if ( newFactory == null ) throw new com.sun.star.loader.CannotActivateFactoryException("Can not get factory for " + newImpls[i]); - + insert( newFactory ); } // end of for ... } @@ -225,13 +225,13 @@ public class ServiceManager implements XMultiServiceFactory, * The method is used to add components to the <code>ServiceManager</code>. The first argument indicates a <code>SimpleRegistry</code>. * The components which should be added will be searched under the <i>Implementations</i> key in the registry. * <p> - * @param args the first argument ( args[0] ) specifices the SimpleRegistry object - * @see com.sun.star.lang.XInitialization - * @see com.sun.star.lang.RegistryServiceManager - * @see com.sun.star.lang.XSimpleRegistry + * @param args the first argument ( args[0] ) specifices the SimpleRegistry object + * @see com.sun.star.lang.XInitialization + * @see com.sun.star.lang.RegistryServiceManager + * @see com.sun.star.lang.XSimpleRegistry */ - public void initialize( Object args[] ) - throws com.sun.star.uno.Exception, + public void initialize( Object args[] ) + throws com.sun.star.uno.Exception, com.sun.star.uno.RuntimeException { XSimpleRegistry xSimpleRegistry = null; try { @@ -239,17 +239,17 @@ public class ServiceManager implements XMultiServiceFactory, if (xSimpleRegistry != null) { XRegistryKey rootkey = xSimpleRegistry.getRootKey(); - + XRegistryKey implkey_xRegistryKey = rootkey.openKey("Implementations"); if(implkey_xRegistryKey != null) { XRegistryKey xRegistryKeys[] = implkey_xRegistryKey.openKeys(); - + for(int i = 0; i < xRegistryKeys.length; ++ i) { xaddFactories(new String[]{xRegistryKeys[i].getStringValue()}); } } } - + if (args.length > 1) { m_xDefaultContext = (XComponentContext)args[ 1 ]; @@ -260,29 +260,29 @@ public class ServiceManager implements XMultiServiceFactory, throw new com.sun.star.lang.IllegalArgumentException("Argument must not be null."); } } - + /** - * Creates a new instance of a specified service. Therefor the associated factory of the service is + * Creates a new instance of a specified service. Therefor the associated factory of the service is * looked up and used to instanciate a new component. * <p> - * @return newly created component - * @param serviceSpecifier indicates the service or component name - * @see com.sun.star.lang.XMultiServiceFactory + * @return newly created component + * @param serviceSpecifier indicates the service or component name + * @see com.sun.star.lang.XMultiServiceFactory */ - public java.lang.Object createInstance( String serviceSpecifier ) - throws com.sun.star.uno.Exception, + public java.lang.Object createInstance( String serviceSpecifier ) + throws com.sun.star.uno.Exception, com.sun.star.uno.RuntimeException { return createInstanceWithContext( serviceSpecifier, m_xDefaultContext ); } - + /** - * Creates a new instance of a specified service with the given parameters. + * Creates a new instance of a specified service with the given parameters. * Therefor the associated factory of the service is looked up and used to instanciate a new component. * <p> - * @return newly created component - * @param serviceSpecifier indicates the service or component name - * @see com.sun.star.lang.XMultiServiceFactory + * @return newly created component + * @param serviceSpecifier indicates the service or component name + * @see com.sun.star.lang.XMultiServiceFactory */ public java.lang.Object createInstanceWithArguments( String serviceSpecifier, Object[] args ) @@ -290,52 +290,52 @@ public class ServiceManager implements XMultiServiceFactory, { if (DEBUG) { System.err.println("createInstanceWithArguments:" ); - + for (int i=0; i<args.length; i++) System.err.print(" "+ args[i]); - + System.err.println(); } - + return createInstanceWithArgumentsAndContext( serviceSpecifier, args, m_xDefaultContext ); } - + /** * Look up the factory for a given service or implementation name. * First the requested service name is search in the list of avaible services. If it can not be found - * the name is looked up in the the implementation list. + * the name is looked up in the the implementation list. * <p> - * @return the factory of the service / implementation - * @param serviceSpecifier indicates the service or implementation name - * @see com.sun.star.lang.XMultiServiceFactory + * @return the factory of the service / implementation + * @param serviceSpecifier indicates the service or implementation name + * @see com.sun.star.lang.XMultiServiceFactory */ private Object queryServiceFactory(String serviceName) - throws com.sun.star.uno.Exception, + throws com.sun.star.uno.Exception, com.sun.star.uno.RuntimeException { DEBUG("queryServiceFactory for name " + serviceName ); Object factory = null; - + if ( factoriesByServiceNames.containsKey( serviceName ) ) { java.util.Vector aviableFact = (java.util.Vector) factoriesByServiceNames.get( serviceName ); - + DEBUG(""); DEBUG("aviable factories for " + serviceName +" "+ aviableFact); DEBUG(""); - + if ( !aviableFact.isEmpty() ) factory = aviableFact.lastElement(); - + } else // not found in list of services - now try the implementations factory = factoriesByImplNames.get( serviceName ); // return null if none is aviable - + if (DEBUG) { if (factory == null) System.err.println("service not registered"); else System.err.println("service found:" + factory + " " + UnoRuntime.queryInterface(XSingleServiceFactory.class, factory)); } - - if (factory == null) + + if (factory == null) throw new com.sun.star.uno.Exception("Query for service factory for " + serviceName + " failed."); return factory; @@ -344,20 +344,20 @@ public class ServiceManager implements XMultiServiceFactory, /** * Supplies a list of all avialable services names. * <p> - * @return list of Strings of all service names - * @see com.sun.star.container.XContentEnumerationAccess - */ - public String[] getAvailableServiceNames() - throws com.sun.star.uno.RuntimeException + * @return list of Strings of all service names + * @see com.sun.star.container.XContentEnumerationAccess + */ + public String[] getAvailableServiceNames() + throws com.sun.star.uno.RuntimeException { int i = 0; String[] availableServiceNames = new String[factoriesByServiceNames.size()]; - + java.util.Enumeration keys = factoriesByServiceNames.keys(); - + while (keys.hasMoreElements()) availableServiceNames[i++] = (String) keys.nextElement(); - + return availableServiceNames; } @@ -446,47 +446,47 @@ public class ServiceManager implements XMultiServiceFactory, return null; } // public String[] getAvailableServiceNames(); - + /** * Removes all listeners from the <code>ServiceManager</code> and clears the list of the services. * <p> - * @see com.sun.star.lang.XComponent + * @see com.sun.star.lang.XComponent */ - public void dispose() + public void dispose() throws com.sun.star.uno.RuntimeException { if (eventListener != null) { java.util.Enumeration enumer = eventListener.elements(); - + while (enumer.hasMoreElements()) { XEventListener listener = (XEventListener) enumer.nextElement(); listener.disposing(new com.sun.star.lang.EventObject(this)); } } - + eventListener.removeAllElements(); - factoriesByServiceNames.clear(); + factoriesByServiceNames.clear(); factoriesByImplNames.clear(); } /** - * 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 + * 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 + * @param xListener the new listener which should been added. + * @see com.sun.star.lang.XComponent */ - public void addEventListener( XEventListener xListener ) + 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."); - + throw new com.sun.star.uno.RuntimeException("Listener already registred."); + eventListener.addElement(xListener); } @@ -495,158 +495,158 @@ public class ServiceManager implements XMultiServiceFactory, * 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 + * @param xListener the new listener which should been removed. + * @see com.sun.star.lang.XComponent */ - public void removeEventListener( XEventListener xListener ) + 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); + throw new com.sun.star.uno.RuntimeException("Listener is not registered."); + + eventListener.removeElement(xListener); } /** * Checks if a component is registered at the <code>ServiceManager</code>. The given object argument must * provide a <code>XServiceInfo</code> interface. * <p> - * @return true if the component is registred otherwise false. - * @param object object which provides a <code>XServiceInfo</code> interface. - * @see com.sun.star.container.XSet - * @see com.sun.star.lang.XServiceInfo + * @return true if the component is registred otherwise false. + * @param object object which provides a <code>XServiceInfo</code> interface. + * @see com.sun.star.container.XSet + * @see com.sun.star.lang.XServiceInfo */ - public boolean has( Object object ) + public boolean has( Object object ) throws com.sun.star.uno.RuntimeException { - if (object == null) + if (object == null) throw new com.sun.star.uno.RuntimeException("The parameter must not been null"); - + XServiceInfo xServiceInfo = UnoRuntime.queryInterface(XServiceInfo.class, object); - + if (xServiceInfo != null) { return UnoRuntime.areSame(factoriesByImplNames.get(xServiceInfo.getImplementationName()), object); - } - + } + return false; } /** * Adds a <code>SingleServiceFactory</code> to the <code>ServiceManager</code>. * <p> - * @param object factory which should be added. + * @param object factory which should be added. * @see com.sun.star.container.XSet - * @see com.sun.star.lang.XSingleServiceFactory + * @see com.sun.star.lang.XSingleServiceFactory */ - public void insert( Object object ) - throws com.sun.star.lang.IllegalArgumentException, - com.sun.star.container.ElementExistException, + public void insert( Object object ) + throws com.sun.star.lang.IllegalArgumentException, + com.sun.star.container.ElementExistException, com.sun.star.uno.RuntimeException { if (object == null) throw new com.sun.star.lang.IllegalArgumentException(); - - XServiceInfo xServiceInfo = + + XServiceInfo xServiceInfo = UnoRuntime.queryInterface(XServiceInfo.class, object); - - if (xServiceInfo == null) + + if (xServiceInfo == null) throw new com.sun.star.lang.IllegalArgumentException( "The given object does not implement the XServiceInfo interface." ); - + if ( factoriesByImplNames.containsKey( xServiceInfo.getImplementationName() ) ) { throw new com.sun.star.container.ElementExistException( xServiceInfo.getImplementationName() + " already registred" ); } - + DEBUG("add factory " + object.toString() + " for " + xServiceInfo.getImplementationName()); factoriesByImplNames.put( xServiceInfo.getImplementationName(), object ); - - + + String[] serviceNames = xServiceInfo.getSupportedServiceNames(); java.util.Vector vec = null; - - for (int i=0; i<serviceNames.length; i++) { + + for (int i=0; i<serviceNames.length; i++) { if ( !factoriesByServiceNames.containsKey( serviceNames[i] ) ) { DEBUG("> no registered services found under " + serviceNames[i] + ": adding..." ); factoriesByServiceNames.put(serviceNames[i], new java.util.Vector()); } - - vec = (java.util.Vector) factoriesByServiceNames.get( serviceNames[i] ); - + + vec = (java.util.Vector) factoriesByServiceNames.get( serviceNames[i] ); + if ( vec.contains( object ) ) System.err.println("The implementation " + xServiceInfo.getImplementationName() + " already registered for the service " + serviceNames[i] + " - ignoring!"); - else - vec.addElement(object); - } + else + vec.addElement(object); + } } /** * Removes a <code>SingleServiceFactory</code> from the <code>ServiceManager</code>. * <p> - * @param object factory which should be removed. + * @param object factory which should be removed. * @see com.sun.star.container.XSet - * @see com.sun.star.lang.XSingleServiceFactory + * @see com.sun.star.lang.XSingleServiceFactory */ - public void remove( Object object ) - throws com.sun.star.lang.IllegalArgumentException, - com.sun.star.container.NoSuchElementException, + public void remove( Object object ) + throws com.sun.star.lang.IllegalArgumentException, + com.sun.star.container.NoSuchElementException, com.sun.star.uno.RuntimeException { - if (object == null) + if (object == null) throw new com.sun.star.lang.IllegalArgumentException( "The given object must not be null." ); - - XServiceInfo xServiceInfo = + + XServiceInfo xServiceInfo = UnoRuntime.queryInterface(XServiceInfo.class, object); - + if (xServiceInfo == null) throw new com.sun.star.lang.IllegalArgumentException( "The given object does not implement the XServiceInfo interface." ); - - XSingleServiceFactory xSingleServiceFactory = + + XSingleServiceFactory xSingleServiceFactory = UnoRuntime.queryInterface(XSingleServiceFactory.class, object); - - if (xSingleServiceFactory == null) + + if (xSingleServiceFactory == null) throw new com.sun.star.lang.IllegalArgumentException( "The given object does not implement the XSingleServiceFactory interface." ); - + if ( factoriesByImplNames.remove( xServiceInfo.getImplementationName() ) == null ) throw new com.sun.star.container.NoSuchElementException( - xServiceInfo.getImplementationName() + + xServiceInfo.getImplementationName() + " is not registered as an implementation." ); - + String[] serviceNames = xServiceInfo.getSupportedServiceNames(); - + for ( int i=0; i<serviceNames.length; i++ ) { if ( factoriesByServiceNames.containsKey( serviceNames[i] ) ) { java.util.Vector vec = (java.util.Vector) factoriesByServiceNames.get(serviceNames[i]); - - if ( !vec.removeElement(object) ) + + if ( !vec.removeElement(object) ) System.err.println("The implementation " + xServiceInfo.getImplementationName() + " is not registered for the service " + serviceNames[i] + " - ignoring!"); - + if ( vec.isEmpty() ) // remove the vector if no implementations aviable for the service - factoriesByServiceNames.remove( serviceNames[i] ); - } + factoriesByServiceNames.remove( serviceNames[i] ); + } } } /** * Provides an enumeration of all registred services. * <p> - * @return an enumeration of all avialable services. - * @see com.sun.star.conatiner.XEnumerationAccess + * @return an enumeration of all avialable services. + * @see com.sun.star.conatiner.XEnumerationAccess */ - public XEnumeration createEnumeration() + public XEnumeration createEnumeration() throws com.sun.star.uno.RuntimeException { return new ServiceEnumerationImpl( factoriesByImplNames.elements() ); @@ -655,9 +655,9 @@ public class ServiceManager implements XMultiServiceFactory, /** * Provides the UNO type of the <code>ServiceManager</code> * <p> - * @return the UNO type of the <code>ServiceManager</code>. - * @see com.sun.star.container.XElementAccess - * @see com.sun.star.uno.TypeClass + * @return the UNO type of the <code>ServiceManager</code>. + * @see com.sun.star.container.XElementAccess + * @see com.sun.star.uno.TypeClass */ public com.sun.star.uno.Type getElementType() throws com.sun.star.uno.RuntimeException @@ -671,8 +671,8 @@ public class ServiceManager implements XMultiServiceFactory, /** * Checks if the any componets are registered. * <p> - * @return true - if the list of the registred components is not empty - otherwise false. - * @see com.sun.star.container.XElementAccess + * @return true - if the list of the registred components is not empty - otherwise false. + * @see com.sun.star.container.XElementAccess */ public boolean hasElements() { return ! factoriesByImplNames.isEmpty(); @@ -681,33 +681,33 @@ public class ServiceManager implements XMultiServiceFactory, /** * Provides an enumeration of of all factorys for a specified service. * <p> - * @return an enumeration for service name. - * @param serviceName name of the requested service - * @see com.sun.star.container.XContentEnumerationAccess + * @return an enumeration for service name. + * @param serviceName name of the requested service + * @see com.sun.star.container.XContentEnumerationAccess */ public XEnumeration createContentEnumeration( String serviceName ) throws com.sun.star.uno.RuntimeException { XEnumeration enumer = null; - + java.util.Vector serviceList = (java.util.Vector) factoriesByServiceNames.get(serviceName); - + if (serviceList != null) enumer = new ServiceEnumerationImpl( serviceList.elements() ); - else + else enumer = new ServiceEnumerationImpl(); - + return enumer; } - + /** * Returns the implementation name of the <code>ServiceManager</code> component. * <p> - * @return the class name of the <code>ServiceManager</code>. - * @see com.sun.star.lang.XServiceInfo + * @return the class name of the <code>ServiceManager</code>. + * @see com.sun.star.lang.XServiceInfo */ - public String getImplementationName() - throws com.sun.star.uno.RuntimeException + public String getImplementationName() + throws com.sun.star.uno.RuntimeException { return getClass().getName(); } @@ -715,132 +715,132 @@ public class ServiceManager implements XMultiServiceFactory, /** * Checks if the <code>ServiceManager</code> supports a service. * <p> - * @return true if the service is supported - otherwise false. - * @param serviceName service name which should be checked. - * @see com.sun.star.lang.XServiceInfo + * @return true if the service is supported - otherwise false. + * @param serviceName service name which should be checked. + * @see com.sun.star.lang.XServiceInfo */ public boolean supportsService( String serviceName ) - throws com.sun.star.uno.RuntimeException + throws com.sun.star.uno.RuntimeException { for (int i=0; i<supportedServiceNames.length; i++) if (supportedServiceNames[i].equals( serviceName )) return true; - + if (getImplementationName().equals( serviceName )) return true; - + return false; } - + /** - * Supplies list of all supported services. + * Supplies list of all supported services. * <p> - * @return a list of all supported service names. - * @see com.sun.star.lang.XServiceInfo + * @return a list of all supported service names. + * @see com.sun.star.lang.XServiceInfo */ public String[] getSupportedServiceNames() - throws com.sun.star.uno.RuntimeException - { + throws com.sun.star.uno.RuntimeException + { return supportedServiceNames; } - + /** - * The <code>ServiceEnumerationImpl</code> class provides an - * implementation of the @see com.sun.star.container.XEnumeration interface. + * The <code>ServiceEnumerationImpl</code> class provides an + * implementation of the @see com.sun.star.container.XEnumeration interface. * It is a inner wrapper for a java.util.Enumeration object. * <p> - * @version $Revision: 1.10 $ $ $Date: 2008-04-11 11:11:46 $ - * @author Markus Herzog + * @version $Revision: 1.10 $ $ $Date: 2008-04-11 11:11:46 $ + * @author Markus Herzog * @see com.sun.star.lang.XSingleServiceFactory * @see com.sun.star.lang.XServiceInfo * @since UDK1.0 */ class ServiceEnumerationImpl implements XEnumeration { java.util.Enumeration enumeration = null; - + /** * Constructs a new empty instance. */ public ServiceEnumerationImpl() { } - + /** * Constructs a new instance with a given enumeration. * <p> - * @param enumer is the enumeration which should been wrapped. - * @see com.sun.star.container.XEnumeration + * @param enumer is the enumeration which should been wrapped. + * @see com.sun.star.container.XEnumeration */ public ServiceEnumerationImpl(java.util.Enumeration enumer) { enumeration = enumer; } - + /** * Checks if the enumeration contains more elements. * <p> - * @return true if more elements are available - otherwise false. - * @see com.sun.star.container.XEnumeration + * @return true if more elements are available - otherwise false. + * @see com.sun.star.container.XEnumeration */ - public boolean hasMoreElements() - throws com.sun.star.uno.RuntimeException + public boolean hasMoreElements() + throws com.sun.star.uno.RuntimeException { if (enumeration != null) return enumeration.hasMoreElements(); - + return false; } - + /** * Returns the next element of the enumeration. If no further elements * available a com.sun.star.container.NoSuchElementException exception will be thrown. * <p> - * @return the next element. - * @see com.sun.star.container.XEnumeration + * @return the next element. + * @see com.sun.star.container.XEnumeration */ - public Object nextElement() - throws com.sun.star.container.NoSuchElementException, - com.sun.star.lang.WrappedTargetException, + public Object nextElement() + throws com.sun.star.container.NoSuchElementException, + com.sun.star.lang.WrappedTargetException, com.sun.star.uno.RuntimeException { if (enumeration == null) throw new com.sun.star.container.NoSuchElementException(); - + try { return enumeration.nextElement(); } catch (java.util.NoSuchElementException e) { - com.sun.star.container.NoSuchElementException ex = + com.sun.star.container.NoSuchElementException ex = new com.sun.star.container.NoSuchElementException(); ex.fillInStackTrace(); - + throw ex; } } } } /** - * The <code>ServiceManagerFactory</code> is the factory class for the - * <code>ServiceManager</code>. As all factories it implments the + * The <code>ServiceManagerFactory</code> is the factory class for the + * <code>ServiceManager</code>. As all factories it implments the * com.sun.star.lang.XSingleServiceFactory and the com.sun.star.lang.XServiceInfo * interfaces. * <p> - * @version $Revision: 1.10 $ $ $Date: 2008-04-11 11:11:46 $ - * @author Markus Herzog + * @version $Revision: 1.10 $ $ $Date: 2008-04-11 11:11:46 $ + * @author Markus Herzog * @see com.sun.star.lang.XSingleServiceFactory * @see com.sun.star.lang.XServiceInfo * @since UDK1.0 */ -class ServiceManagerFactory implements XServiceInfo, XSingleComponentFactory, XSingleServiceFactory +class ServiceManagerFactory implements XServiceInfo, XSingleComponentFactory, XSingleServiceFactory { /** * Creates a new instance of the <code>ServiceManagerFactory</code>. */ public ServiceManagerFactory() { } - + /** * Supplies the implementation name of the <code>ServiceManager</code>. * <p> - * @return <code>ServiceManager</code> class name. + * @return <code>ServiceManager</code> class name. * @see com.sun.star.lang.XServiceInfo */ - public String getImplementationName() + public String getImplementationName() throws com.sun.star.uno.RuntimeException { return ServiceManager.class.getName(); @@ -849,28 +849,28 @@ class ServiceManagerFactory implements XServiceInfo, XSingleComponentFactory, X /** * Checks wether or not a service is supported. * <p> - * @return true - if the service is supported, otherwise false. - * @param serviceName the name of the service that should be checked. + * @return true - if the service is supported, otherwise false. + * @param serviceName the name of the service that should be checked. * @see com.sun.star.lang.XServiceInfo */ - public boolean supportsService( String serviceName ) + public boolean supportsService( String serviceName ) throws com.sun.star.uno.RuntimeException { for ( int i=0; i<ServiceManager.supportedServiceNames.length; i++ ) if ( ServiceManager.supportedServiceNames[i].equals(serviceName) ) return true; - + if ( getImplementationName().equals(serviceName) ) return true; - + return false; } /** * Returns all service names which are supported by <code>ServiceManager</code>. * <p> - * @return a list aof all supported service names. + * @return a list aof all supported service names. * @see com.sun.star.lang.XServiceInfo */ - public String[] getSupportedServiceNames() + public String[] getSupportedServiceNames() throws com.sun.star.uno.RuntimeException { return ServiceManager.supportedServiceNames; @@ -879,11 +879,11 @@ class ServiceManagerFactory implements XServiceInfo, XSingleComponentFactory, X /** * Creates a new instance of the <code>ServiceManager</code>. * <p> - * @return newly created <code>ServiceManager</code> object. + * @return newly created <code>ServiceManager</code> object. * @see com.sun.star.lang.XSingleServiceFactory */ - public java.lang.Object createInstance() - throws com.sun.star.uno.Exception, + public java.lang.Object createInstance() + throws com.sun.star.uno.Exception, com.sun.star.uno.RuntimeException { return new ServiceManager(); @@ -895,17 +895,17 @@ class ServiceManagerFactory implements XServiceInfo, XSingleComponentFactory, X * because there is no the <code>ServiceManager</code> has no constructor with * arguments. * <p> - * @return null - allways throws an exception - * @param aArguments arguments for new instance. + * @return null - allways throws an exception + * @param aArguments arguments for new instance. * @see com.sun.star.lang.XSingleServiceFactory */ - public java.lang.Object createInstanceWithArguments( java.lang.Object[] aArguments ) - throws com.sun.star.uno.Exception, + public java.lang.Object createInstanceWithArguments( java.lang.Object[] aArguments ) + throws com.sun.star.uno.Exception, com.sun.star.uno.RuntimeException { throw new com.sun.star.lang.NoSuchMethodException("Constructor with arguments is not supported."); } - + // XSingleComponentFactory impl //______________________________________________________________________________________________ public Object createInstanceWithContext( XComponentContext xContext ) diff --git a/jurt/com/sun/star/comp/urlresolver/UrlResolver.java b/jurt/com/sun/star/comp/urlresolver/UrlResolver.java index 3509dfb303f2..a73b24098642 100644 --- a/jurt/com/sun/star/comp/urlresolver/UrlResolver.java +++ b/jurt/com/sun/star/comp/urlresolver/UrlResolver.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -51,8 +51,8 @@ import com.sun.star.uno.UnoRuntime; /** * This component gives a factory for an <code>UnoUrlResolver</code> service. * <p> - * @version $Revision: 1.6 $ $ $Date: 2008-04-11 11:12:25 $ - * @author Kay Ramme + * @version $Revision: 1.6 $ $ $Date: 2008-04-11 11:12:25 $ + * @author Kay Ramme * @see com.sun.star.brige.XBrideFactory * @see com.sun.star.connection.Connector * @since UDK1.0 @@ -74,7 +74,7 @@ public class UrlResolver { String conDcp = null; String protDcp = null; String rootOid = null; - + if(dcp.indexOf(';') == -1) {// use old style conDcp = dcp; protDcp = "iiop"; @@ -84,28 +84,28 @@ public class UrlResolver { int index = dcp.indexOf(':'); String url = dcp.substring(0, index).trim(); dcp = dcp.substring(index + 1).trim(); - + index = dcp.indexOf(';'); conDcp = dcp.substring(0, index).trim(); dcp = dcp.substring(index + 1).trim(); - + index = dcp.indexOf(';'); protDcp = dcp.substring(0, index).trim(); dcp = dcp.substring(index + 1).trim(); - + rootOid = dcp.trim().trim(); } Object rootObject = null; XBridgeFactory xBridgeFactory= null; try { - xBridgeFactory = UnoRuntime.queryInterface(XBridgeFactory.class, + xBridgeFactory = UnoRuntime.queryInterface(XBridgeFactory.class, _xMultiServiceFactory.createInstance("com.sun.star.bridge.BridgeFactory")); } catch (com.sun.star.uno.Exception e) { throw new com.sun.star.uno.RuntimeException(e.getMessage()); } XBridge xBridge = xBridgeFactory.getBridge(conDcp + ";" + protDcp); - + if(xBridge == null) { Object connector= null; try { @@ -113,9 +113,9 @@ public class UrlResolver { } catch (com.sun.star.uno.Exception e) { throw new com.sun.star.uno.RuntimeException(e.getMessage()); } - + XConnector connector_xConnector = UnoRuntime.queryInterface(XConnector.class, connector); - + // connect to the server XConnection xConnection = connector_xConnector.connect(conDcp); try { @@ -140,8 +140,8 @@ public class UrlResolver { * @param regKey the registryKey * @see com.sun.star.comp.loader.JavaLoader */ - public static XSingleServiceFactory __getServiceFactory(String implName, - XMultiServiceFactory multiFactory, + public static XSingleServiceFactory __getServiceFactory(String implName, + XMultiServiceFactory multiFactory, XRegistryKey regKey) { XSingleServiceFactory xSingleServiceFactory = null; @@ -149,12 +149,12 @@ public class UrlResolver { if (implName.equals(UrlResolver.class.getName()) ) xSingleServiceFactory = FactoryHelper.getServiceFactory(_UrlResolver.class, _UrlResolver.__serviceName, - multiFactory, + multiFactory, regKey); - + return xSingleServiceFactory; } - + /** * Writes the service information into the given registry key. * This method is called by the <code>JavaLoader</code> diff --git a/jurt/com/sun/star/lib/connections/pipe/PipeConnection.java b/jurt/com/sun/star/lib/connections/pipe/PipeConnection.java index 455e3aab6502..ea5057365377 100644 --- a/jurt/com/sun/star/lib/connections/pipe/PipeConnection.java +++ b/jurt/com/sun/star/lib/connections/pipe/PipeConnection.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -44,8 +44,8 @@ import com.sun.star.connection.XConnectionBroadcaster; * and is uses by the <code>PipeConnector</code> and the <code>PipeAcceptor</code>. * This class is not part of the provided <code>api</code>. * <p> - * @version $Revision: 1.7 $ $ $Date: 2008-04-11 11:13:00 $ - * @author Kay Ramme + * @version $Revision: 1.7 $ $ $Date: 2008-04-11 11:13:00 $ + * @author Kay Ramme * @see com.sun.star.comp.connections.PipeAcceptor * @see com.sun.star.comp.connections.PipeConnector * @see com.sun.star.connections.XConnection @@ -62,10 +62,10 @@ public class PipeConnection implements XConnection, XConnectionBroadcaster { NativeLibraryLoader.loadLibrary(PipeConnection.class.getClassLoader(), "jpipe"); } - protected String _aDescription; - protected long _nPipeHandle; - protected Vector _aListeners; - protected boolean _bFirstRead; + protected String _aDescription; + protected long _nPipeHandle; + protected Vector _aListeners; + protected boolean _bFirstRead; /** * Constructs a new <code>PipeConnection</code>. @@ -73,7 +73,7 @@ public class PipeConnection implements XConnection, XConnectionBroadcaster { * @param description the description of the connection * @param pipe the pipe of the connection */ - public PipeConnection(String description) + public PipeConnection(String description) throws IOException { if (DEBUG) System.err.println("##### " + getClass().getName() + " - instantiated " + description ); @@ -84,7 +84,7 @@ public class PipeConnection implements XConnection, XConnectionBroadcaster { // get pipe name from pipe descriptor String aPipeName = null; StringTokenizer aTokenizer = new StringTokenizer( description, "," ); - if ( aTokenizer.hasMoreTokens() ) + if ( aTokenizer.hasMoreTokens() ) { String aConnType = aTokenizer.nextToken(); if ( !aConnType.equals( "pipe" ) ) @@ -99,7 +99,7 @@ public class PipeConnection implements XConnection, XConnectionBroadcaster { throw new RuntimeException( "invalid or empty pipe descriptor" ); // create the pipe - try + try { createJNI( aPipeName ); } catch ( java.lang.NullPointerException aNPE ) { throw new IOException( aNPE.getMessage() ); } @@ -132,7 +132,7 @@ public class PipeConnection implements XConnection, XConnectionBroadcaster { xStreamListener.closed(); } } - + private void notifyListeners_error(com.sun.star.uno.Exception exception) { Enumeration elements = _aListeners.elements(); while(elements.hasMoreElements()) { @@ -144,21 +144,21 @@ public class PipeConnection implements XConnection, XConnectionBroadcaster { // JNI implementation to create the pipe private native int createJNI( String name ) throws com.sun.star.io.IOException, com.sun.star.uno.RuntimeException; - + // JNI implementation to read from the pipe - private native int readJNI(/*OUT*/byte[][] bytes, int nBytesToRead) + private native int readJNI(/*OUT*/byte[][] bytes, int nBytesToRead) throws com.sun.star.io.IOException, com.sun.star.uno.RuntimeException; - + // JNI implementation to write to the pipe - private native void writeJNI(byte aData[]) + private native void writeJNI(byte aData[]) throws com.sun.star.io.IOException, com.sun.star.uno.RuntimeException; - + // JNI implementation to flush the pipe - private native void flushJNI() + private native void flushJNI() throws com.sun.star.io.IOException, com.sun.star.uno.RuntimeException; // JNI implementation to close the pipe - private native void closeJNI() + private native void closeJNI() throws com.sun.star.io.IOException, com.sun.star.uno.RuntimeException; /** @@ -169,8 +169,8 @@ public class PipeConnection implements XConnection, XConnectionBroadcaster { * @param nBytesToRead the number of bytes to read * @see com.sun.star.connections.XConnection#read */ - public int read(/*OUT*/byte[][] bytes, int nBytesToRead) - throws com.sun.star.io.IOException, com.sun.star.uno.RuntimeException + public int read(/*OUT*/byte[][] bytes, int nBytesToRead) + throws com.sun.star.io.IOException, com.sun.star.uno.RuntimeException { if(_bFirstRead) { _bFirstRead = false; @@ -187,8 +187,8 @@ public class PipeConnection implements XConnection, XConnectionBroadcaster { * @param aData the bytes to write * @see com.sun.star.connections.XConnection#write */ - public void write(byte aData[]) - throws com.sun.star.io.IOException, com.sun.star.uno.RuntimeException + public void write(byte aData[]) + throws com.sun.star.io.IOException, com.sun.star.uno.RuntimeException { writeJNI( aData ); } @@ -198,8 +198,8 @@ public class PipeConnection implements XConnection, XConnectionBroadcaster { * <p> * @see com.sun.star.connections.XConnection#flush */ - public void flush() - throws com.sun.star.io.IOException, com.sun.star.uno.RuntimeException + public void flush() + throws com.sun.star.io.IOException, com.sun.star.uno.RuntimeException { flushJNI(); } @@ -209,8 +209,8 @@ public class PipeConnection implements XConnection, XConnectionBroadcaster { * <p> * @see com.sun.star.connections.XConnection#close */ - public void close() - throws com.sun.star.io.IOException, com.sun.star.uno.RuntimeException + public void close() + throws com.sun.star.io.IOException, com.sun.star.uno.RuntimeException { if (DEBUG) System.out.print( "PipeConnection::close() " ); closeJNI(); diff --git a/jurt/com/sun/star/lib/connections/pipe/pipeAcceptor.java b/jurt/com/sun/star/lib/connections/pipe/pipeAcceptor.java index 4c5bf7f1c979..f9e2a43bcf72 100644 --- a/jurt/com/sun/star/lib/connections/pipe/pipeAcceptor.java +++ b/jurt/com/sun/star/lib/connections/pipe/pipeAcceptor.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/jurt/com/sun/star/lib/connections/pipe/pipeConnector.java b/jurt/com/sun/star/lib/connections/pipe/pipeConnector.java index 9c0c412ec2bc..7128a5b3fce9 100644 --- a/jurt/com/sun/star/lib/connections/pipe/pipeConnector.java +++ b/jurt/com/sun/star/lib/connections/pipe/pipeConnector.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -128,10 +128,10 @@ public final class pipeConnector implements XConnector { if (bConnected) { throw new ConnectionSetupException("alread connected"); } - - try - { - XConnection xConn = new PipeConnection( connectionDescription ); + + try + { + XConnection xConn = new PipeConnection( connectionDescription ); bConnected = true; return xConn; } diff --git a/jurt/com/sun/star/lib/connections/socket/ConnectionDescriptor.java b/jurt/com/sun/star/lib/connections/socket/ConnectionDescriptor.java index c38faed73e41..57e101449b0c 100644 --- a/jurt/com/sun/star/lib/connections/socket/ConnectionDescriptor.java +++ b/jurt/com/sun/star/lib/connections/socket/ConnectionDescriptor.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/jurt/com/sun/star/lib/connections/socket/SocketConnection.java b/jurt/com/sun/star/lib/connections/socket/SocketConnection.java index 8512bdb49fe1..3d766389b15f 100644 --- a/jurt/com/sun/star/lib/connections/socket/SocketConnection.java +++ b/jurt/com/sun/star/lib/connections/socket/SocketConnection.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -49,8 +49,8 @@ import com.sun.star.connection.XConnectionBroadcaster; * and is uses by the <code>SocketConnector</code> and the <code>SocketAcceptor</code>. * This class is not part of the provided <code>api</code>. * <p> - * @version $Revision: 1.6 $ $ $Date: 2008-04-11 11:14:31 $ - * @author Kay Ramme + * @version $Revision: 1.6 $ $ $Date: 2008-04-11 11:14:31 $ + * @author Kay Ramme * @see com.sun.star.comp.connections.SocketAcceptor * @see com.sun.star.comp.connections.SocketConnector * @see com.sun.star.connections.XConnection @@ -118,7 +118,7 @@ public class SocketConnection implements XConnection, XConnectionBroadcaster { xStreamListener.closed(); } } - + private void notifyListeners_error(com.sun.star.uno.Exception exception) { Enumeration elements = _listeners.elements(); while(elements.hasMoreElements()) { diff --git a/jurt/com/sun/star/lib/connections/socket/socketAcceptor.java b/jurt/com/sun/star/lib/connections/socket/socketAcceptor.java index f2119225f029..930eeecf4c60 100644 --- a/jurt/com/sun/star/lib/connections/socket/socketAcceptor.java +++ b/jurt/com/sun/star/lib/connections/socket/socketAcceptor.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/jurt/com/sun/star/lib/connections/socket/socketConnector.java b/jurt/com/sun/star/lib/connections/socket/socketConnector.java index f85a5ac41bd0..2872743565ae 100644 --- a/jurt/com/sun/star/lib/connections/socket/socketConnector.java +++ b/jurt/com/sun/star/lib/connections/socket/socketConnector.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/jurt/com/sun/star/lib/uno/Proxy.java b/jurt/com/sun/star/lib/uno/Proxy.java index f2a7326c81c0..4f0f5db14b8d 100644 --- a/jurt/com/sun/star/lib/uno/Proxy.java +++ b/jurt/com/sun/star/lib/uno/Proxy.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/jurt/com/sun/star/lib/uno/bridges/java_remote/BridgedObject.java b/jurt/com/sun/star/lib/uno/bridges/java_remote/BridgedObject.java index 90f037d5ae42..3fd65cde4842 100644 --- a/jurt/com/sun/star/lib/uno/bridges/java_remote/BridgedObject.java +++ b/jurt/com/sun/star/lib/uno/bridges/java_remote/BridgedObject.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/jurt/com/sun/star/lib/uno/bridges/java_remote/ProxyFactory.java b/jurt/com/sun/star/lib/uno/bridges/java_remote/ProxyFactory.java index b81db391966f..631bda3a19b2 100644 --- a/jurt/com/sun/star/lib/uno/bridges/java_remote/ProxyFactory.java +++ b/jurt/com/sun/star/lib/uno/bridges/java_remote/ProxyFactory.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/jurt/com/sun/star/lib/uno/bridges/java_remote/RequestHandler.java b/jurt/com/sun/star/lib/uno/bridges/java_remote/RequestHandler.java index 5bfe57a95299..ca0e80d4c78d 100644 --- a/jurt/com/sun/star/lib/uno/bridges/java_remote/RequestHandler.java +++ b/jurt/com/sun/star/lib/uno/bridges/java_remote/RequestHandler.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/jurt/com/sun/star/lib/uno/bridges/java_remote/XConnectionInputStream_Adapter.java b/jurt/com/sun/star/lib/uno/bridges/java_remote/XConnectionInputStream_Adapter.java index e663a96d1ea7..9ba019199f69 100644 --- a/jurt/com/sun/star/lib/uno/bridges/java_remote/XConnectionInputStream_Adapter.java +++ b/jurt/com/sun/star/lib/uno/bridges/java_remote/XConnectionInputStream_Adapter.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -41,7 +41,7 @@ class XConnectionInputStream_Adapter extends InputStream { protected byte _bytes[][] = new byte[1][]; XConnectionInputStream_Adapter(XConnection xConnection) { - if(xConnection == null) throw new NullPointerException("the XConnection must not be null"); + if(xConnection == null) throw new NullPointerException("the XConnection must not be null"); if(DEBUG) System.err.println("#### " + getClass().getName() + " - instantiated "); @@ -65,7 +65,7 @@ class XConnectionInputStream_Adapter extends InputStream { } public int read(byte[] b, int off, int len) throws IOException { -// byte bytes[][] = new byte[1][]; +// byte bytes[][] = new byte[1][]; try { len = _xConnection.read(_bytes, len - off); diff --git a/jurt/com/sun/star/lib/uno/bridges/java_remote/XConnectionOutputStream_Adapter.java b/jurt/com/sun/star/lib/uno/bridges/java_remote/XConnectionOutputStream_Adapter.java index 51f3594330ee..388f5bc08630 100644 --- a/jurt/com/sun/star/lib/uno/bridges/java_remote/XConnectionOutputStream_Adapter.java +++ b/jurt/com/sun/star/lib/uno/bridges/java_remote/XConnectionOutputStream_Adapter.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/jurt/com/sun/star/lib/uno/bridges/java_remote/java_remote_bridge.java b/jurt/com/sun/star/lib/uno/bridges/java_remote/java_remote_bridge.java index 267a84d7515f..12ea6bd2e735 100644 --- a/jurt/com/sun/star/lib/uno/bridges/java_remote/java_remote_bridge.java +++ b/jurt/com/sun/star/lib/uno/bridges/java_remote/java_remote_bridge.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -80,8 +80,8 @@ import com.sun.star.uno.Any; * The protocol to used is passed by name, the bridge * then looks for it under <code>com.sun.star.lib.uno.protocols</code>. * <p> - * @version $Revision: 1.45 $ $ $Date: 2008-04-11 11:18:08 $ - * @author Kay Ramme + * @version $Revision: 1.45 $ $ $Date: 2008-04-11 11:18:08 $ + * @author Kay Ramme * @since UDK1.0 */ public class java_remote_bridge @@ -549,7 +549,7 @@ public class java_remote_bridge } _java_environment.list(); } - + // clear members _xConnection = null; _java_environment = null; @@ -640,7 +640,7 @@ public class java_remote_bridge } } finally { _iThreadPool.detach(handle, threadId); - if(operation.equals("release")) + if(operation.equals("release")) release(); // kill this bridge, if this was the last proxy } diff --git a/jurt/com/sun/star/lib/uno/environments/java/java_environment.java b/jurt/com/sun/star/lib/uno/environments/java/java_environment.java index 7be0f9e5366d..e9f6344ce14a 100644 --- a/jurt/com/sun/star/lib/uno/environments/java/java_environment.java +++ b/jurt/com/sun/star/lib/uno/environments/java/java_environment.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/jurt/com/sun/star/lib/uno/environments/remote/IProtocol.java b/jurt/com/sun/star/lib/uno/environments/remote/IProtocol.java index 1fae45e9ca23..afb5fc586104 100644 --- a/jurt/com/sun/star/lib/uno/environments/remote/IProtocol.java +++ b/jurt/com/sun/star/lib/uno/environments/remote/IProtocol.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/jurt/com/sun/star/lib/uno/environments/remote/IReceiver.java b/jurt/com/sun/star/lib/uno/environments/remote/IReceiver.java index be4548e5ebc0..402726188b18 100644 --- a/jurt/com/sun/star/lib/uno/environments/remote/IReceiver.java +++ b/jurt/com/sun/star/lib/uno/environments/remote/IReceiver.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/jurt/com/sun/star/lib/uno/environments/remote/IThreadPool.java b/jurt/com/sun/star/lib/uno/environments/remote/IThreadPool.java index c70ccfa7e934..20017ed247e8 100644 --- a/jurt/com/sun/star/lib/uno/environments/remote/IThreadPool.java +++ b/jurt/com/sun/star/lib/uno/environments/remote/IThreadPool.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -31,9 +31,9 @@ package com.sun.star.lib.uno.environments.remote; * This interface is an abstraction of the various * threadpool implementations. * <p> - * @version $Revision: 1.7 $ $ $Date: 2008-04-11 11:20:01 $ - * @author Joerg Budischewski - * @author Kay Ramme + * @version $Revision: 1.7 $ $ $Date: 2008-04-11 11:20:01 $ + * @author Joerg Budischewski + * @author Kay Ramme * @see com.sun.star.lib.uno.environments.remote.ThreadPoolFactory * @see com.sun.star.lib.uno.environments.remote.IThreadPoolFactory * @since UDK1.0 @@ -101,7 +101,7 @@ public interface IThreadPool { public Object enter( Object handle, ThreadId id ) throws Throwable; /** - * Queues a job into the jobQueue of the thread belonging + * Queues a job into the jobQueue of the thread belonging * to the jobs threadId. * <p> * @param job the job diff --git a/jurt/com/sun/star/lib/uno/environments/remote/JavaThreadPool.java b/jurt/com/sun/star/lib/uno/environments/remote/JavaThreadPool.java index 3b1fee02b87d..4869d216c0c6 100644 --- a/jurt/com/sun/star/lib/uno/environments/remote/JavaThreadPool.java +++ b/jurt/com/sun/star/lib/uno/environments/remote/JavaThreadPool.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -30,8 +30,8 @@ package com.sun.star.lib.uno.environments.remote; /** * This class implements a java thread pool. * <p> - * @version $Revision: 1.13 $ $ $Date: 2008-04-11 11:20:22 $ - * @author Kay Ramme + * @version $Revision: 1.13 $ $ $Date: 2008-04-11 11:20:22 $ + * @author Kay Ramme * @see com.sun.star.uno.UnoRuntime * @see com.sun.star.lib.uno.environments.remote.ThreadPool * @see com.sun.star.lib.uno.environments.remote.IThreadPool @@ -66,7 +66,7 @@ public class JavaThreadPool implements IThreadPool { jobQueue.acquire(); return jobQueue; } - + public void attach() { attach( getThreadId() ); } @@ -75,13 +75,13 @@ public class JavaThreadPool implements IThreadPool { { ((JobQueue)handle).release(); } - + public void detach() { ThreadId threadId = getThreadId(); detach(_javaThreadPoolFactory.getJobQueue(threadId), threadId ); } - + public Object enter( ) throws Throwable { ThreadId threadId = getThreadId(); return enter( _javaThreadPoolFactory.getJobQueue( threadId ), threadId ); @@ -96,7 +96,7 @@ public class JavaThreadPool implements IThreadPool { JobQueue jobQueue = _javaThreadPoolFactory.getJobQueue(job.getThreadId()); // this has not be synchronized, cause - // sync jobs can only come over one bridge + // sync jobs can only come over one bridge // (cause the thread blocks on other side) if(jobQueue == null) jobQueue = new JobQueue(_javaThreadPoolFactory, job.getThreadId(), true); diff --git a/jurt/com/sun/star/lib/uno/environments/remote/JavaThreadPoolFactory.java b/jurt/com/sun/star/lib/uno/environments/remote/JavaThreadPoolFactory.java index 868a4559a577..1ba1fc64179b 100644 --- a/jurt/com/sun/star/lib/uno/environments/remote/JavaThreadPoolFactory.java +++ b/jurt/com/sun/star/lib/uno/environments/remote/JavaThreadPoolFactory.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/jurt/com/sun/star/lib/uno/environments/remote/Job.java b/jurt/com/sun/star/lib/uno/environments/remote/Job.java index 41cf9706f2b6..ef99a187da7f 100644 --- a/jurt/com/sun/star/lib/uno/environments/remote/Job.java +++ b/jurt/com/sun/star/lib/uno/environments/remote/Job.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -45,8 +45,8 @@ import com.sun.star.uno.XCurrentContext; * The Job is an abstraction for tasks which have to be done * remotely because of a method invocation. * <p> - * @version $Revision: 1.17 $ $ $Date: 2008-04-11 11:21:00 $ - * @author Kay Ramme + * @version $Revision: 1.17 $ $ $Date: 2008-04-11 11:21:00 $ + * @author Kay Ramme * @see com.sun.star.lib.uno.environments.remote.ThreadID * @see com.sun.star.lib.uno.environments.remote.IReceiver * @since UDK1.0 @@ -159,15 +159,15 @@ public class Job { } public void dispose() { -// _oId = null; -// _iReceiver = null; -// _threadId = null; -// _object = null; -// _operation = null; -// _param = null; -// _exception = null; -// _zInterface = null; -// _disposeId = null; +// _oId = null; +// _iReceiver = null; +// _threadId = null; +// _object = null; +// _operation = null; +// _param = null; +// _exception = null; +// _zInterface = null; +// _disposeId = null; } // The name of this method is chosen to generate a somewhat self-explanatory diff --git a/jurt/com/sun/star/lib/uno/environments/remote/JobQueue.java b/jurt/com/sun/star/lib/uno/environments/remote/JobQueue.java index f7568a30cef7..b8700b61f5c3 100644 --- a/jurt/com/sun/star/lib/uno/environments/remote/JobQueue.java +++ b/jurt/com/sun/star/lib/uno/environments/remote/JobQueue.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -34,11 +34,11 @@ package com.sun.star.lib.uno.environments.remote; * at the <code>ThreadPool</code>. * A JobQueue is splitted in a sync job queue and an async job queue. * The sync job queue is the registerd queue, it delegates async jobs - * (put by <code>putjob</code>) into the async queue, which is only + * (put by <code>putjob</code>) into the async queue, which is only * known by the sync queue. * <p> - * @version $Revision: 1.19 $ $ $Date: 2008-04-11 11:21:18 $ - * @author Kay Ramme + * @version $Revision: 1.19 $ $ $Date: 2008-04-11 11:21:18 $ + * @author Kay Ramme * @see com.sun.star.lib.uno.environments.remote.ThreadPool * @see com.sun.star.lib.uno.environments.remote.Job * @see com.sun.star.lib.uno.environments.remote.ThreadID @@ -88,7 +88,7 @@ public class JobQueue { public void run() { if(DEBUG) System.err.println("ThreadPool$JobDispatcher.run: " + Thread.currentThread()); - + try { enter(2000, _disposeId); } @@ -104,14 +104,14 @@ public class JobQueue { if(DEBUG) System.err.println("##### " + getClass().getName() + ".run - exit:" + _threadId); -// try { -// Object object = new Object(); -// synchronized(object) { -// object.wait(); -// } -// } -// catch(InterruptedException interruptedException) { -// } +// try { +// Object object = new Object(); +// synchronized(object) { +// object.wait(); +// } +// } +// catch(InterruptedException interruptedException) { +// } } } @@ -151,7 +151,7 @@ public class JobQueue { * @param createThread if true, the queue creates a worker thread if needed * @see com.sun.star.lib.uno.environments.remote.ThreadID */ - JobQueue(JavaThreadPoolFactory javaThreadPoolFactory, ThreadId threadId, boolean createThread){ + JobQueue(JavaThreadPoolFactory javaThreadPoolFactory, ThreadId threadId, boolean createThread){ _javaThreadPoolFactory = javaThreadPoolFactory; _threadId = threadId; _createThread = createThread; @@ -172,7 +172,7 @@ public class JobQueue { synchronized void acquire() { // add only synchronous queues . - if(_ref_count <= 0 && _sync_jobQueue == null ) + if(_ref_count <= 0 && _sync_jobQueue == null ) _javaThreadPoolFactory.addJobQueue(this); ++ _ref_count; @@ -183,7 +183,7 @@ public class JobQueue { if(_ref_count <= 0) { // only synchronous queues needs to be removed . - if( _sync_jobQueue == null ) + if( _sync_jobQueue == null ) _javaThreadPoolFactory.removeJobQueue(this); @@ -198,7 +198,7 @@ public class JobQueue { * Removes a job from the queue. * <p> * @return a job or null if timed out - * @param waitTime the maximum amount of time to wait for a job + * @param waitTime the maximum amount of time to wait for a job */ private Job removeJob(int waitTime) throws Throwable { if(DEBUG) System.err.println("##### " + getClass().getName() + ".removeJob:" + _head + " " + _threadId); @@ -223,7 +223,7 @@ public class JobQueue { catch(InterruptedException interruptedException) { throw new com.sun.star.uno.RuntimeException(getClass().getName() + ".removeJob - unexpected:" + interruptedException); } - + // signal that we have already waited once waited = true; } @@ -232,10 +232,10 @@ public class JobQueue { if(_head != null) { Job current = _head; _head = _head._next; - + if(_head == null) _tail = null; - + job = current; _active = true; } @@ -243,7 +243,7 @@ public class JobQueue { // always wait for asynchron jobqueue to be finished ! if(job != null && _async_jobQueue != null) { - synchronized(_async_jobQueue) { + synchronized(_async_jobQueue) { // wait for async queue to be empty and last job to be done while(_async_jobQueue._active || _async_jobQueue._head != null) { if(DEBUG) System.err.println("waiting for async:" + _async_jobQueue._head + " " + _async_jobQueue._worker_thread); @@ -274,12 +274,12 @@ public class JobQueue { */ synchronized void putJob(Job job, Object disposeId) { if(DEBUG) System.err.println("##### " + getClass().getName() + ".putJob todoes: " + " job:" + job); - - if(_tail != null) + + if(_tail != null) _tail._next = job; else _head = job; - + _tail = job; if(_worker_thread == null && _createThread && _createThread_now) { // if there is no thread, which dispatches and if shall create one, create one @@ -326,10 +326,10 @@ public class JobQueue { while(!quit) { Job job = null; - + try { job = removeJob(waitTime); - + if(job != null) { try { result = job.execute(); @@ -349,7 +349,7 @@ public class JobQueue { else quit = true; - + } finally { // ensure that this queue becomes disposed, if necessary if(DEBUG) System.err.println("##### " + getClass().getName() + ".enter leaving: " + _threadId + " " + _worker_thread + " " + hold_worker_thread + " " + result); @@ -359,7 +359,7 @@ public class JobQueue { _worker_thread = hold_worker_thread; _createThread_now = true; - + _disposeId = hold_disposeId; if(_sync_jobQueue != null) @@ -385,10 +385,10 @@ public class JobQueue { if(_sync_jobQueue == null) { // dispose only sync queues _doDispose = disposeId; _throwable = throwable; - + // get thread out of wait and let it throw the throwable if(DEBUG) System.err.println(getClass().getName() + ".dispose - notifying thread"); - + notifyAll(); } } diff --git a/jurt/com/sun/star/lib/uno/environments/remote/Message.java b/jurt/com/sun/star/lib/uno/environments/remote/Message.java index 918b9b1282ad..310bfc6ce488 100644 --- a/jurt/com/sun/star/lib/uno/environments/remote/Message.java +++ b/jurt/com/sun/star/lib/uno/environments/remote/Message.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/jurt/com/sun/star/lib/uno/environments/remote/NativeThreadPool.java b/jurt/com/sun/star/lib/uno/environments/remote/NativeThreadPool.java index 06afce7f1e5d..91f0bd411ee8 100644 --- a/jurt/com/sun/star/lib/uno/environments/remote/NativeThreadPool.java +++ b/jurt/com/sun/star/lib/uno/environments/remote/NativeThreadPool.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/jurt/com/sun/star/lib/uno/environments/remote/ThreadId.java b/jurt/com/sun/star/lib/uno/environments/remote/ThreadId.java index 0b570991c11f..e194198d8397 100644 --- a/jurt/com/sun/star/lib/uno/environments/remote/ThreadId.java +++ b/jurt/com/sun/star/lib/uno/environments/remote/ThreadId.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/jurt/com/sun/star/lib/uno/environments/remote/ThreadPoolManager.java b/jurt/com/sun/star/lib/uno/environments/remote/ThreadPoolManager.java index 6187eb4b1c4e..c43ec4bad66d 100644 --- a/jurt/com/sun/star/lib/uno/environments/remote/ThreadPoolManager.java +++ b/jurt/com/sun/star/lib/uno/environments/remote/ThreadPoolManager.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/jurt/com/sun/star/lib/uno/environments/remote/remote_environment.java b/jurt/com/sun/star/lib/uno/environments/remote/remote_environment.java index 0a782783c00f..81cbf1bc4622 100644 --- a/jurt/com/sun/star/lib/uno/environments/remote/remote_environment.java +++ b/jurt/com/sun/star/lib/uno/environments/remote/remote_environment.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/jurt/com/sun/star/lib/uno/protocols/urp/Cache.java b/jurt/com/sun/star/lib/uno/protocols/urp/Cache.java index 48268a53a260..437b2006207e 100644 --- a/jurt/com/sun/star/lib/uno/protocols/urp/Cache.java +++ b/jurt/com/sun/star/lib/uno/protocols/urp/Cache.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/jurt/com/sun/star/lib/uno/protocols/urp/Marshal.java b/jurt/com/sun/star/lib/uno/protocols/urp/Marshal.java index 2a43041916ce..a400614bf39c 100644 --- a/jurt/com/sun/star/lib/uno/protocols/urp/Marshal.java +++ b/jurt/com/sun/star/lib/uno/protocols/urp/Marshal.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/jurt/com/sun/star/lib/uno/protocols/urp/PendingRequests.java b/jurt/com/sun/star/lib/uno/protocols/urp/PendingRequests.java index ac3e039224aa..e42a045204fa 100644 --- a/jurt/com/sun/star/lib/uno/protocols/urp/PendingRequests.java +++ b/jurt/com/sun/star/lib/uno/protocols/urp/PendingRequests.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/jurt/com/sun/star/lib/uno/protocols/urp/Unmarshal.java b/jurt/com/sun/star/lib/uno/protocols/urp/Unmarshal.java index 5a500ad3a0c1..36a0720ea83f 100644 --- a/jurt/com/sun/star/lib/uno/protocols/urp/Unmarshal.java +++ b/jurt/com/sun/star/lib/uno/protocols/urp/Unmarshal.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/jurt/com/sun/star/lib/uno/protocols/urp/UrpMessage.java b/jurt/com/sun/star/lib/uno/protocols/urp/UrpMessage.java index 57770dcb0401..2e2c6b96ada9 100644 --- a/jurt/com/sun/star/lib/uno/protocols/urp/UrpMessage.java +++ b/jurt/com/sun/star/lib/uno/protocols/urp/UrpMessage.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/jurt/com/sun/star/lib/uno/protocols/urp/urp.java b/jurt/com/sun/star/lib/uno/protocols/urp/urp.java index da54bc7612a1..3e33a6657b3b 100644 --- a/jurt/com/sun/star/lib/uno/protocols/urp/urp.java +++ b/jurt/com/sun/star/lib/uno/protocols/urp/urp.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/jurt/com/sun/star/lib/util/AsynchronousFinalizer.java b/jurt/com/sun/star/lib/util/AsynchronousFinalizer.java index 32303775b191..9b002a16afb2 100644 --- a/jurt/com/sun/star/lib/util/AsynchronousFinalizer.java +++ b/jurt/com/sun/star/lib/util/AsynchronousFinalizer.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/jurt/com/sun/star/lib/util/NativeLibraryLoader.java b/jurt/com/sun/star/lib/util/NativeLibraryLoader.java index 05455a87814d..da2298066995 100644 --- a/jurt/com/sun/star/lib/util/NativeLibraryLoader.java +++ b/jurt/com/sun/star/lib/util/NativeLibraryLoader.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/jurt/com/sun/star/lib/util/StringHelper.java b/jurt/com/sun/star/lib/util/StringHelper.java index 5962d19e7b14..3ff2abfb78fd 100644 --- a/jurt/com/sun/star/lib/util/StringHelper.java +++ b/jurt/com/sun/star/lib/util/StringHelper.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/jurt/com/sun/star/lib/util/UrlToFileMapper.java b/jurt/com/sun/star/lib/util/UrlToFileMapper.java index 22b6ccf0a745..c356e8410b2c 100644 --- a/jurt/com/sun/star/lib/util/UrlToFileMapper.java +++ b/jurt/com/sun/star/lib/util/UrlToFileMapper.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -40,7 +40,7 @@ import java.net.URLEncoder; * @since UDK 3.2.8 */ public final class UrlToFileMapper { - + // java.net.URLEncoder.encode(String, String) and java.net.URI are only // available since Java 1.4: private static Method urlEncoderEncode; @@ -155,7 +155,7 @@ public final class UrlToFileMapper { } } return buf.toString(); - } + } private UrlToFileMapper() {} } diff --git a/jurt/com/sun/star/uno/AnyConverter.java b/jurt/com/sun/star/uno/AnyConverter.java index cbd13fe8589a..d2d01cc64806 100644 --- a/jurt/com/sun/star/uno/AnyConverter.java +++ b/jurt/com/sun/star/uno/AnyConverter.java @@ -33,7 +33,7 @@ public class AnyConverter } return t; } - + /** checks if the any contains the idl type <code>void</code>. @param object the object to check @return true when the any is void, false otherwise @@ -80,7 +80,7 @@ public class AnyConverter */ static public boolean isInt(Object object){ return containsType(TypeClass.LONG, object); - } + } /** checks if the any contains a value of the idl type <code>hyper</code> (which maps to a java-long). @param object the object to check @@ -104,7 +104,7 @@ public class AnyConverter */ static public boolean isDouble(Object object){ return containsType(TypeClass.DOUBLE, object); - } + } /** checks if the any contains a value of the idl type <code>string</code>. @param object the object to check @@ -113,7 +113,7 @@ public class AnyConverter static public boolean isString(Object object){ return containsType(TypeClass.STRING, object); } - + /** checks if the any contains a value of the idl type <code>enum</code>. @param object the object to check @return true if the any contains an enum, false otherwise @@ -129,7 +129,7 @@ public class AnyConverter */ static public boolean isType(Object object){ return containsType(TypeClass.TYPE, object); - } + } /** checks if the any contains an interface, struct, exception, sequence or enum. If <em>object</em> is an any with an interface type, then true is also returned if @@ -147,7 +147,7 @@ public class AnyConverter TypeClass.SEQUENCE_value == tc || TypeClass.ENUM_value == tc); } - + /** checks if the any contains UNO idl sequence value (meaning a java array containing elements which are values of UNO idl types). @param object the object to check @@ -189,16 +189,16 @@ public class AnyConverter Byte ret= (Byte)convertSimple(TypeClass.BYTE, null, object); return ret.byteValue(); } - + /** converts a number object into a simple short and allows widening conversions. Allowed argument types are Byte, Short or Any containing these types. @param object the object to convert @throws com.sun.star.lang.IllegalArgumentException in case no short or byte is contained within object @return the short contained within the object - */ + */ static public short toShort(Object object) throws com.sun.star.lang.IllegalArgumentException{ Short ret= (Short)convertSimple(TypeClass.SHORT, null, object); - return ret.shortValue(); + return ret.shortValue(); } /** converts a number object into an idl unsigned short and allows widening conversions. Allowed argument types are Anies containing idl unsigned short values. @@ -206,7 +206,7 @@ public class AnyConverter @throws com.sun.star.lang.IllegalArgumentException in case no idl unsigned short is contained within Any @return an (unsigned) short - */ + */ static public short toUnsignedShort(Object object) throws com.sun.star.lang.IllegalArgumentException { @@ -219,7 +219,7 @@ public class AnyConverter @param object the object to convert @throws com.sun.star.lang.IllegalArgumentException in case no short, byte or int is contained within object. @return the int contained within the object - */ + */ static public int toInt(Object object) throws com.sun.star.lang.IllegalArgumentException{ Integer ret= (Integer) convertSimple( TypeClass.LONG, null, object); return ret.intValue(); @@ -230,7 +230,7 @@ public class AnyConverter @throws com.sun.star.lang.IllegalArgumentException in case no idl unsigned short nor unsigned long is contained within Any @return an (unsigned) int - */ + */ static public int toUnsignedInt(Object object) throws com.sun.star.lang.IllegalArgumentException { @@ -244,7 +244,7 @@ public class AnyConverter @throws com.sun.star.lang.IllegalArgumentException in case no short, byte, int or long is contained within object. @return the long contained within the object - */ + */ static public long toLong(Object object) throws com.sun.star.lang.IllegalArgumentException{ Long ret= (Long) convertSimple( TypeClass.HYPER, null, object); return ret.longValue(); @@ -257,7 +257,7 @@ public class AnyConverter in case no idl unsigned short, nor unsigned long nor unsigned hyper is contained within object. @return an (unsigned) long - */ + */ static public long toUnsignedLong(Object object) throws com.sun.star.lang.IllegalArgumentException { @@ -271,7 +271,7 @@ public class AnyConverter @throws com.sun.star.lang.IllegalArgumentException in case no byte, short or float is contained within object. @return the float contained within the object - */ + */ static public float toFloat(Object object) throws com.sun.star.lang.IllegalArgumentException{ Float ret= (Float) convertSimple( TypeClass.FLOAT,null, object); return ret.floatValue(); @@ -283,36 +283,36 @@ public class AnyConverter @throws com.sun.star.lang.IllegalArgumentException in case no byte, short, int, float or double is contained within object. @return the double contained within the object - */ + */ static public double toDouble(Object object) throws com.sun.star.lang.IllegalArgumentException { Double ret= (Double) convertSimple( TypeClass.DOUBLE, null, object); return ret.doubleValue(); } - + /** converts a string or an any containing a string into a string. @param object the object to convert @throws com.sun.star.lang.IllegalArgumentException in case no string is contained within object. @return the string contained within the object - */ + */ static public String toString(Object object) throws com.sun.star.lang.IllegalArgumentException { return (String) convertSimple( TypeClass.STRING, null, object); } - + /** converts a Type or an any containing a Type into a Type. @param object the object to convert @throws com.sun.star.lang.IllegalArgumentException in case no type is contained within object. @return the type contained within the object - */ + */ static public Type toType(Object object) throws com.sun.star.lang.IllegalArgumentException { return (Type) convertSimple( TypeClass.TYPE, null, object); } - + /** converts a UNO object (struct, exception, sequence, enum or interface) or an Any containing * these types into an UNO object of a specified destination type. * For interfaces, the argument <em>object</em> is queried for the interface specified * by the <em>type</em> argument. That query (UnoRuntime.queryInterface) might return null, * if the interface is not implemented or a null-ref or a VOID any is given. - * + * * @param type type of the returned value * @param object the object that is to be converted * @return destination object @@ -329,7 +329,7 @@ public class AnyConverter * For interfaces, the argument <em>object</em> is queried for the interface specified * by the <em>type</em> argument. That query (UnoRuntime.queryInterface) might return null, * if the interface is not implemented or a null-ref or a VOID any is given. - * + * * @param clazz class of the returned value * @param object the object that is to be converted * @return destination object @@ -341,16 +341,16 @@ public class AnyConverter { return toObject( new Type( clazz ), object ); } - + /** converts an array or an any containing an array into an array. @param object the object to convert @throws com.sun.star.lang.IllegalArgumentException in case no array is contained within object. @return the array contained within the object - */ + */ static public Object toArray( Object object) throws com.sun.star.lang.IllegalArgumentException { return convertSimple( TypeClass.SEQUENCE, null, object); } - + /** Examines the argument <em>object</em> if is correspond to the type in argument <em>what</em>. <em>object</em> is either matched directly against the type or if it is an any then the @@ -359,9 +359,9 @@ public class AnyConverter static private boolean containsType( TypeClass what, Object object){ return (getType(object).getTypeClass().getValue() == what.getValue()); } - + static private final Type m_XInterface_type = new Type( XInterface.class ); - + static private Object convertSimple( TypeClass destTClass, Type destType, Object object_ ) throws com.sun.star.lang.IllegalArgumentException { @@ -382,10 +382,10 @@ public class AnyConverter object = object_; type = (null == object ? m_XInterface_type : new Type( object.getClass() )); } - + int tc = type.getTypeClass().getValue(); int dest_tc = destTClass.getValue(); - + if (null == object) { // special for interfaces @@ -423,7 +423,7 @@ public class AnyConverter case TypeClass.UNSIGNED_SHORT_value: return object; } - break; + break; case TypeClass.LONG_value: switch (tc) { diff --git a/jurt/com/sun/star/uno/Ascii.java b/jurt/com/sun/star/uno/Ascii.java index 866bcf3960b3..c9eac0a22569 100644 --- a/jurt/com/sun/star/uno/Ascii.java +++ b/jurt/com/sun/star/uno/Ascii.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -27,16 +27,16 @@ package com.sun.star.uno; -/** +/** * The Ascii class represents the IDL build in type <code>ascii</code>. * <p> - * @version $Revision: 1.5 $ $ $Date: 2008-04-11 11:27:21 $ - * @author Markus Meyer - * @deprecated do not use + * @version $Revision: 1.5 $ $ $Date: 2008-04-11 11:27:21 $ + * @author Markus Meyer + * @deprecated do not use */ public final class Ascii { public final char ascii; - + /** * Constructs a new <code>Ascii</code>. * <p> diff --git a/jurt/com/sun/star/uno/AsciiString.java b/jurt/com/sun/star/uno/AsciiString.java index 245375cf1fab..741f0f8917e5 100644 --- a/jurt/com/sun/star/uno/AsciiString.java +++ b/jurt/com/sun/star/uno/AsciiString.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -27,20 +27,20 @@ package com.sun.star.uno; -/** +/** * The Ascii class represents the IDL build in type <code>asciistring</code>. * <p> - * @version $Revision: 1.5 $ $ $Date: 2008-04-11 11:27:42 $ - * @author Markus Meyer - * @deprecated do not use + * @version $Revision: 1.5 $ $ $Date: 2008-04-11 11:27:42 $ + * @author Markus Meyer + * @deprecated do not use */ public final class AsciiString { - public final String asciistring; + public final String asciistring; /** * Constructs a new <code>AsciiString</code>. * <p> - * @deprecated do not use + * @deprecated do not use * @param s the String value */ public AsciiString(String s) { diff --git a/jurt/com/sun/star/uno/MappingException.java b/jurt/com/sun/star/uno/MappingException.java index dc65676e1181..6f9591cfb491 100644 --- a/jurt/com/sun/star/uno/MappingException.java +++ b/jurt/com/sun/star/uno/MappingException.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -33,7 +33,7 @@ package com.sun.star.uno; * The exception is replaced by the com.sun.star.lang.DisposedException. * @deprecated since UDK 3.0.2 * <p> - * @version $Revision: 1.6 $ $ $Date: 2008-04-11 11:28:00 $ + * @version $Revision: 1.6 $ $ $Date: 2008-04-11 11:28:00 $ * @see com.sun.star.uno.UnoRuntime * @see com.sun.star.uno.IQueryInterface * @see com.sun.star.uno.IBridge diff --git a/jurt/com/sun/star/uno/WeakReference.java b/jurt/com/sun/star/uno/WeakReference.java index 904524d8c049..c9065078ab86 100644 --- a/jurt/com/sun/star/uno/WeakReference.java +++ b/jurt/com/sun/star/uno/WeakReference.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -47,7 +47,7 @@ public class WeakReference // ref would not be notified (XReference.dispose()) because it did not register // itself. Therefore the XAdapter would be kept aliver although this is not // necessary. - + /** Creates an instance of this class. *@param obj - another instance that is to be copied */ @@ -68,7 +68,7 @@ public class WeakReference } } } - + /** Creates an instance of this class. *@param obj XWeak implementation */ @@ -94,14 +94,14 @@ public class WeakReference } /** Implementation of com.sun.star.uno.XReference for use with WeakReference. - * It keeps the XAdapter implementation and registers always with it. Deregistering + * It keeps the XAdapter implementation and registers always with it. Deregistering * occurs on notification by the adapter and the adapter is released. */ class OWeakRefListener implements XReference { private final boolean DEBUG= false; private XAdapter m_adapter; - + /** The constructor registered this object with adapter. *@param adapter the XAdapter implementation. */ @@ -110,7 +110,7 @@ class OWeakRefListener implements XReference m_adapter= adapter; m_adapter.addReference(this); } - /** Method of com.sun.star.uno.XReference. When called, it deregisteres this + /** Method of com.sun.star.uno.XReference. When called, it deregisteres this * object with the adapter and releases the reference to it. */ synchronized public void dispose() @@ -121,8 +121,8 @@ class OWeakRefListener implements XReference m_adapter= null; } } - - /** Obtains a hard reference to the object which is kept weak by the adapter + + /** Obtains a hard reference to the object which is kept weak by the adapter * and returns it. * @return hard reference to the otherwise weakly kept object. */ @@ -136,7 +136,7 @@ class OWeakRefListener implements XReference { // If this object registered as listener with XAdapter while it was notifying // the listeners then this object might not have been notified. If queryAdapted - // returned null then the weak kept object is dead and the listeners have already + // returned null then the weak kept object is dead and the listeners have already // been notified. And we missed it. m_adapter.removeReference(this); m_adapter= null; |