diff options
Diffstat (limited to 'javaunohelper/com/sun/star/comp')
12 files changed, 0 insertions, 1613 deletions
diff --git a/javaunohelper/com/sun/star/comp/JavaUNOHelperServices.java b/javaunohelper/com/sun/star/comp/JavaUNOHelperServices.java deleted file mode 100644 index 7df6497a1..000000000 --- a/javaunohelper/com/sun/star/comp/JavaUNOHelperServices.java +++ /dev/null @@ -1,64 +0,0 @@ -/************************************************************************* - * - * 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 - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -package com.sun.star.comp; - -import com.sun.star.lib.uno.helper.Factory; -import com.sun.star.lang.XSingleComponentFactory; -import com.sun.star.comp.juhtest.SmoketestCommandEnvironment; - - -/** This class is the registration class for all services in this module. - * - * Note that not all files which can be used as service need to be registered - * by this class. - */ -public class JavaUNOHelperServices { - - static private final String __service_smoketestCommandEnv = - "com.sun.star.deployment.test.SmoketestCommandEnvironment"; - - /** - * Gives a factory for creating the service. - * This method is called by the <code>JavaLoader</code> - * <p> - * @return returns a <code>XSingleComponentFactory</code> for creating - * the component - * @param sImplName the name of the implementation for which a - * service is desired - * @see com.sun.star.comp.loader.JavaLoader - */ - public static XSingleComponentFactory __getComponentFactory(String sImplName) - { - XSingleComponentFactory xFactory = null; - - if ( sImplName.equals( SmoketestCommandEnvironment.class.getName() ) ) - xFactory = Factory.createComponentFactory(SmoketestCommandEnvironment.class, - SmoketestCommandEnvironment.getServiceNames()); - - return xFactory; - } -} diff --git a/javaunohelper/com/sun/star/comp/helper/Bootstrap.java b/javaunohelper/com/sun/star/comp/helper/Bootstrap.java deleted file mode 100644 index 3156bbabb..000000000 --- a/javaunohelper/com/sun/star/comp/helper/Bootstrap.java +++ /dev/null @@ -1,329 +0,0 @@ -/************************************************************************* - * - * 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 - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -package com.sun.star.comp.helper; - -import com.sun.star.bridge.UnoUrlResolver; -import com.sun.star.bridge.XUnoUrlResolver; -import com.sun.star.comp.loader.JavaLoader; -import com.sun.star.container.XSet; -import com.sun.star.lang.XInitialization; -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.lang.XMultiComponentFactory; -import com.sun.star.lang.XSingleComponentFactory; -import com.sun.star.lib.util.NativeLibraryLoader; -import com.sun.star.loader.XImplementationLoader; -import com.sun.star.uno.UnoRuntime; -import com.sun.star.uno.XComponentContext; - -import java.io.BufferedReader; -import java.io.File; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.PrintStream; -import java.util.Enumeration; -import java.util.Hashtable; -import java.util.Random; - -/** Bootstrap offers functionality to obtain a context or simply - a service manager. - The service manager can create a few basic services, whose implementations are: - <ul> - <li>com.sun.star.comp.loader.JavaLoader</li> - <li>com.sun.star.comp.urlresolver.UrlResolver</li> - <li>com.sun.star.comp.bridgefactory.BridgeFactory</li> - <li>com.sun.star.comp.connections.Connector</li> - <li>com.sun.star.comp.connections.Acceptor</li> - <li>com.sun.star.comp.servicemanager.ServiceManager</li> - </ul> - - Other services can be inserted into the service manager by - using its XSet interface: - <pre> - XSet xSet = UnoRuntime.queryInterface( XSet.class, aMultiComponentFactory ); - // insert the service manager - xSet.insert( aSingleComponentFactory ); - </pre> -*/ -public class Bootstrap { - - private static void insertBasicFactories( - XSet xSet, XImplementationLoader xImpLoader ) - throws Exception - { - // insert the factory of the loader - xSet.insert( xImpLoader.activate( - "com.sun.star.comp.loader.JavaLoader", null, null, null ) ); - - // insert the factory of the URLResolver - xSet.insert( xImpLoader.activate( - "com.sun.star.comp.urlresolver.UrlResolver", null, null, null ) ); - - // insert the bridgefactory - xSet.insert( xImpLoader.activate( - "com.sun.star.comp.bridgefactory.BridgeFactory", null, null, null ) ); - - // insert the connector - xSet.insert( xImpLoader.activate( - "com.sun.star.comp.connections.Connector", null, null, null ) ); - - // insert the acceptor - xSet.insert( xImpLoader.activate( - "com.sun.star.comp.connections.Acceptor", null, null, null ) ); - } - - /** Bootstraps an initial component context with service manager and basic - jurt components inserted. - @param context_entries the hash table contains mappings of entry names (type string) to - context entries (type class ComponentContextEntry). - @return a new context. - */ - static public XComponentContext createInitialComponentContext( Hashtable context_entries ) - throws Exception - { - XImplementationLoader xImpLoader = UnoRuntime.queryInterface( - XImplementationLoader.class, new JavaLoader() ); - - // Get the factory of the ServiceManager - XSingleComponentFactory smgr_fac = UnoRuntime.queryInterface( - XSingleComponentFactory.class, xImpLoader.activate( - "com.sun.star.comp.servicemanager.ServiceManager", null, null, null ) ); - - // Create an instance of the ServiceManager - XMultiComponentFactory xSMgr = UnoRuntime.queryInterface( - XMultiComponentFactory.class, smgr_fac.createInstanceWithContext( null ) ); - - // post init loader - XInitialization xInit = UnoRuntime.queryInterface( - XInitialization.class, xImpLoader ); - Object[] args = new Object [] { xSMgr }; - xInit.initialize( args ); - - // initial component context - if (context_entries == null) - context_entries = new Hashtable( 1 ); - // add smgr - context_entries.put( - "/singletons/com.sun.star.lang.theServiceManager", - new ComponentContextEntry( null, xSMgr ) ); - // ... xxx todo: add standard entries - XComponentContext xContext = new ComponentContext( context_entries, null ); - - // post init smgr - xInit = UnoRuntime.queryInterface( - XInitialization.class, xSMgr ); - args = new Object [] { null, xContext }; // no registry, default context - xInit.initialize( args ); - - XSet xSet = UnoRuntime.queryInterface( XSet.class, xSMgr ); - // insert the service manager - xSet.insert( smgr_fac ); - // and basic jurt factories - insertBasicFactories( xSet, xImpLoader ); - - return xContext; - } - - /** - * Bootstraps a servicemanager with the jurt base components registered. - * <p> - * @return a freshly boostrapped service manager - * @see com.sun.star.lang.ServiceManager - */ - static public XMultiServiceFactory createSimpleServiceManager() throws Exception - { - return UnoRuntime.queryInterface( - XMultiServiceFactory.class, createInitialComponentContext( null ).getServiceManager() ); - } - - - /** Bootstraps the initial component context from a native UNO installation. - - @see "cppuhelper/defaultBootstrap_InitialComponentContext()" - */ - static public final XComponentContext defaultBootstrap_InitialComponentContext() - throws Exception - { - return defaultBootstrap_InitialComponentContext( null, null ); - } - /** Bootstraps the initial component context from a native UNO installation. - - @param ini_file - ini_file (may be null: uno.rc besides cppuhelper lib) - @param bootstrap_parameters - bootstrap parameters (maybe null) - - @see "cppuhelper/defaultBootstrap_InitialComponentContext()" - */ - static public final XComponentContext defaultBootstrap_InitialComponentContext( - String ini_file, Hashtable bootstrap_parameters ) - throws Exception - { - // jni convenience: easier to iterate over array than calling Hashtable - String pairs [] = null; - if (null != bootstrap_parameters) - { - pairs = new String [ 2 * bootstrap_parameters.size() ]; - Enumeration keys = bootstrap_parameters.keys(); - int n = 0; - while (keys.hasMoreElements()) - { - String name = (String)keys.nextElement(); - pairs[ n++ ] = name; - pairs[ n++ ] = (String)bootstrap_parameters.get( name ); - } - } - - if (! m_loaded_juh) - { - NativeLibraryLoader.loadLibrary( Bootstrap.class.getClassLoader(), "juh" ); - m_loaded_juh = true; - } - return UnoRuntime.queryInterface( - XComponentContext.class, - cppuhelper_bootstrap( - ini_file, pairs, Bootstrap.class.getClassLoader() ) ); - } - - static private boolean m_loaded_juh = false; - static private native Object cppuhelper_bootstrap( - String ini_file, String bootstrap_parameters [], ClassLoader loader ) - throws Exception; - - /** - * Bootstraps the component context from a UNO installation. - * - * @return a bootstrapped component context. - * - * @since UDK 3.1.0 - */ - public static final XComponentContext bootstrap() - throws BootstrapException { - - XComponentContext xContext = null; - - try { - // create default local component context - XComponentContext xLocalContext = - createInitialComponentContext( null ); - if ( xLocalContext == null ) - throw new BootstrapException( "no local component context!" ); - - // find office executable relative to this class's class loader - String sOffice = - System.getProperty( "os.name" ).startsWith( "Windows" ) ? - "soffice.exe" : "soffice"; - File fOffice = NativeLibraryLoader.getResource( - Bootstrap.class.getClassLoader(), sOffice ); - if ( fOffice == null ) - throw new BootstrapException( "no office executable found!" ); - - // create random pipe name - String sPipeName = "uno" + - Long.toString( (new Random()).nextLong() & 0x7fffffffffffffffL ); - - // create call with arguments - String[] cmdArray = new String[7]; - cmdArray[0] = fOffice.getPath(); - cmdArray[1] = "-nologo"; - cmdArray[2] = "-nodefault"; - cmdArray[3] = "-norestore"; - cmdArray[4] = "-nocrashreport"; - cmdArray[5] = "-nolockcheck"; - cmdArray[6] = "-accept=pipe,name=" + sPipeName + ";urp;"; - - // start office process - Process p = Runtime.getRuntime().exec( cmdArray ); - pipe( p.getInputStream(), System.out, "CO> " ); - pipe( p.getErrorStream(), System.err, "CE> " ); - - // initial service manager - XMultiComponentFactory xLocalServiceManager = - xLocalContext.getServiceManager(); - if ( xLocalServiceManager == null ) - throw new BootstrapException( "no initial service manager!" ); - - // create a URL resolver - XUnoUrlResolver xUrlResolver = - UnoUrlResolver.create( xLocalContext ); - - // connection string - String sConnect = "uno:pipe,name=" + sPipeName + - ";urp;StarOffice.ComponentContext"; - - // wait until office is started - for (int i = 0;; ++i) { - try { - // try to connect to office - Object context = xUrlResolver.resolve( sConnect ); - xContext = UnoRuntime.queryInterface( - XComponentContext.class, context); - if ( xContext == null ) - throw new BootstrapException( "no component context!" ); - break; - } catch ( com.sun.star.connection.NoConnectException ex ) { - // Wait 500 ms, then try to connect again, but do not wait - // longer than 5 min (= 600 * 500 ms) total: - if (i == 600) { - throw new BootstrapException(ex.toString()); - } - Thread.currentThread().sleep( 500 ); - } - } - } catch ( BootstrapException e ) { - throw e; - } catch ( java.lang.RuntimeException e ) { - throw e; - } catch ( java.lang.Exception e ) { - throw new BootstrapException( e ); - } - - return xContext; - } - - private static void pipe( - final InputStream in, final PrintStream out, final String prefix ) { - - new Thread( "Pipe: " + prefix) { - public void run() { - BufferedReader r = new BufferedReader( - new InputStreamReader( in ) ); - try { - for ( ; ; ) { - String s = r.readLine(); - if ( s == null ) { - break; - } - out.println( prefix + s ); - } - } catch ( java.io.IOException e ) { - e.printStackTrace( System.err ); - } - } - }.start(); - } -} diff --git a/javaunohelper/com/sun/star/comp/helper/BootstrapException.java b/javaunohelper/com/sun/star/comp/helper/BootstrapException.java deleted file mode 100644 index 3136358c2..000000000 --- a/javaunohelper/com/sun/star/comp/helper/BootstrapException.java +++ /dev/null @@ -1,91 +0,0 @@ -/************************************************************************* - * - * 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 - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -package com.sun.star.comp.helper; - -/** - * BootstrapException is a checked exception that wraps an exception - * thrown by the original target. - * - * @since UDK 3.1.0 - */ -public class BootstrapException extends java.lang.Exception { - - /** - * This field holds the target exception. - */ - private Exception m_target = null; - - /** - * Constructs a <code>BootstrapException</code> with <code>null</code> as - * the target exception. - */ - public BootstrapException() { - super(); - } - - /** - * Constructs a <code>BootstrapException</code> with the specified - * detail message. - * - * @param message the detail message - */ - public BootstrapException( String message ) { - super( message ); - } - - /** - * Constructs a <code>BootstrapException</code> with the specified - * detail message and a target exception. - * - * @param message the detail message - * @param target the target exception - */ - public BootstrapException( String message, Exception target ) { - super( message ); - m_target = target; - } - - /** - * Constructs a <code>BootstrapException</code> with a target exception. - * - * @param target the target exception - */ - public BootstrapException( Exception target ) { - super(); - m_target = target; - } - - /** - * Get the thrown target exception. - * - * @return the target exception - */ - public Exception getTargetException() { - return m_target; - } -} diff --git a/javaunohelper/com/sun/star/comp/helper/ComponentContext.java b/javaunohelper/com/sun/star/comp/helper/ComponentContext.java deleted file mode 100644 index 27c57adc5..000000000 --- a/javaunohelper/com/sun/star/comp/helper/ComponentContext.java +++ /dev/null @@ -1,310 +0,0 @@ -/************************************************************************* - * - * 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 - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -package com.sun.star.comp.helper; - -import com.sun.star.uno.UnoRuntime; -import com.sun.star.uno.Any; - -import com.sun.star.uno.XComponentContext; -import com.sun.star.lang.XMultiComponentFactory; -import com.sun.star.lang.XSingleComponentFactory; -import com.sun.star.lang.XComponent; -import com.sun.star.lang.XEventListener; -import com.sun.star.lang.EventObject; - -import java.util.Hashtable; -import java.util.Enumeration; -import java.util.Vector; - - -//================================================================================================== -class Disposer implements XEventListener -{ - private XComponent m_xComp; - - //---------------------------------------------------------------------------------------------- - Disposer( XComponent xComp ) - { - m_xComp = xComp; - } - //______________________________________________________________________________________________ - public void disposing( EventObject Source ) - { - m_xComp.dispose(); - } -} - -/** Component context implementation. -*/ -public class ComponentContext implements XComponentContext, XComponent -{ - private static final boolean DEBUG = false; - private static final String SMGR_NAME = "/singletons/com.sun.star.lang.theServiceManager"; - private static final String TDMGR_NAME = "/singletons/com.sun.star.reflection.theTypeDescriptionManager"; - - private Hashtable m_table; - private XComponentContext m_xDelegate; - - private XMultiComponentFactory m_xSMgr; - private boolean m_bDisposeSMgr; - - private Vector m_eventListener; - - /** Ctor to create a component context passing a hashtable for values and a delegator - reference. Entries of the passed hashtable are either direct values or - ComponentContextEntry objects. - - @param table - entries - @param xDelegate - if values are not found, request is delegated to this object - */ - public ComponentContext( Hashtable table, XComponentContext xDelegate ) - { - m_eventListener = new Vector(); - m_table = table; - m_xDelegate = xDelegate; - m_xSMgr = null; - m_bDisposeSMgr = false; - - Object o = table.get( SMGR_NAME ); - if (o != null) - { - if (o instanceof ComponentContextEntry) - { - o = ((ComponentContextEntry)o).m_value; - } - m_xSMgr = UnoRuntime.queryInterface( - XMultiComponentFactory.class, o ); - } - if (m_xSMgr != null) - { - m_bDisposeSMgr = true; - } - else if (m_xDelegate != null) - { - m_xSMgr = m_xDelegate.getServiceManager(); - } - - // listen for delegate - XComponent xComp = UnoRuntime.queryInterface( - XComponent.class, m_xDelegate ); - if (xComp != null) - { - xComp.addEventListener( new Disposer( this ) ); - } - } - - // XComponentContext impl - //______________________________________________________________________________________________ - public Object getValueByName( String rName ) - { - Object o = m_table.get( rName ); - if (o != null) - { - if (o instanceof ComponentContextEntry) - { - ComponentContextEntry entry = (ComponentContextEntry)o; - if (entry.m_lateInit != null) - { - Object xInstance = null; - - try - { - String serviceName = (String)entry.m_lateInit; - if (serviceName != null) - { - if (m_xSMgr != null) - { - xInstance = m_xSMgr.createInstanceWithContext( serviceName, this ); - } - else - { - if (DEBUG) - System.err.println( "### no service manager instance for late init of singleton instance \"" + rName + "\"!" ); - } - } - else - { - XSingleComponentFactory xCompFac = - UnoRuntime.queryInterface( - XSingleComponentFactory.class, entry.m_lateInit ); - if (xCompFac != null) - { - xInstance = xCompFac.createInstanceWithContext( this ); - } - else - { - if (DEBUG) - System.err.println( "### neither service name nor service factory given for late init of singleton instance \"" + rName + "\"!" ); - } - } - } - catch (com.sun.star.uno.Exception exc) - { - if (DEBUG) - System.err.println( "### exception occurred on late init of singleton instance \"" + rName + "\": " + exc.getMessage() ); - } - - if (xInstance != null) - { - synchronized (entry) - { - if (entry.m_lateInit != null) - { - entry.m_value = xInstance; - entry.m_lateInit = null; - } - else // inited in the meantime - { - // dispose fresh service instance - XComponent xComp = UnoRuntime.queryInterface( - XComponent.class, xInstance ); - if (xComp != null) - { - xComp.dispose(); - } - } - } - } - else - { - if (DEBUG) - System.err.println( "### failed late init of singleton instance \"" + rName + "\"!" ); - } - } - return entry.m_value; - } - else // direct value in map - { - return o; - } - } - else if (m_xDelegate != null) - { - return m_xDelegate.getValueByName( rName ); - } - else - { - return Any.VOID; - } - } - //______________________________________________________________________________________________ - public XMultiComponentFactory getServiceManager() - { - return m_xSMgr; - } - - // XComponent impl - //______________________________________________________________________________________________ - public void dispose() - { - if (DEBUG) - System.err.print( "> disposing context " + this ); - - // fire events - EventObject evt = new EventObject( this ); - Enumeration eventListener = m_eventListener.elements(); - while (eventListener.hasMoreElements()) - { - XEventListener listener = (XEventListener)eventListener.nextElement(); - listener.disposing( evt ); - } - m_eventListener.removeAllElements(); - - XComponent tdmgr = null; - // dispose values, then service manager, then typdescription manager - Enumeration keys = m_table.keys(); - while (keys.hasMoreElements()) - { - String name = (String)keys.nextElement(); - if (! name.equals( SMGR_NAME )) - { - Object o = m_table.get( name ); - if (o instanceof ComponentContextEntry) - { - o = ((ComponentContextEntry)o).m_value; - } - - XComponent xComp = UnoRuntime.queryInterface( XComponent.class, o ); - if (xComp != null) - { - if (name.equals( TDMGR_NAME )) - { - tdmgr = xComp; - } - else - { - xComp.dispose(); - } - } - } - } - m_table.clear(); - - // smgr - if (m_bDisposeSMgr) - { - XComponent xComp = UnoRuntime.queryInterface( - XComponent.class, m_xSMgr ); - if (xComp != null) - { - xComp.dispose(); - } - } - m_xSMgr = null; - - // tdmgr - if (tdmgr != null) - { - tdmgr.dispose(); - } - - if (DEBUG) - System.err.println( "... finished" ); - } - //______________________________________________________________________________________________ - public void addEventListener( XEventListener xListener ) - { - if (xListener == null) - throw new com.sun.star.uno.RuntimeException( "Listener must not be null" ); - if (m_eventListener.contains( xListener )) - throw new com.sun.star.uno.RuntimeException( "Listener already registred." ); - - m_eventListener.addElement( xListener ); - } - //______________________________________________________________________________________________ - public void removeEventListener( XEventListener xListener ) - { - if (xListener == null) - throw new com.sun.star.uno.RuntimeException( "Listener must not be null" ); - if (! m_eventListener.contains( xListener )) - throw new com.sun.star.uno.RuntimeException( "Listener is not registered." ); - - m_eventListener.removeElement( xListener ); - } -} diff --git a/javaunohelper/com/sun/star/comp/helper/ComponentContextEntry.java b/javaunohelper/com/sun/star/comp/helper/ComponentContextEntry.java deleted file mode 100644 index 48e999d57..000000000 --- a/javaunohelper/com/sun/star/comp/helper/ComponentContextEntry.java +++ /dev/null @@ -1,73 +0,0 @@ -/************************************************************************* - * - * 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 - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -package com.sun.star.comp.helper; - -/** Component context entry for constructing ComponentContext objects. - <p> - A ComponentContextEntry is separated into a late-init and direct-value - purpose. - The first one is commonly used for singleton objects of the component - context, that are raised on first-time retrieval of the key. - You have to pass a com.sun.star.lang.XSingleComponentFactory - or string (=> service name) object for this. - </p> -*/ -public class ComponentContextEntry -{ - /** if late init of service instance, set service name (String) or - component factory (XSingleComponentFactory), null otherwise - */ - public Object m_lateInit; - /** set entry value - */ - public Object m_value; - - /** Creating a late-init singleton entry component context entry. - The second parameter will be ignored and overwritten during - instanciation of the singleton instance. - - @param lateInit - object factory or service string - @param value - pass null (dummy separating from second ctor signature) - */ - public ComponentContextEntry( Object lateInit, Object value ) - { - this.m_lateInit = lateInit; - this.m_value = value; - } - /** Creating a direct value component context entry. - - @param value - pass null - */ - public ComponentContextEntry( Object value ) - { - this.m_lateInit = null; - this.m_value = value; - } -} diff --git a/javaunohelper/com/sun/star/comp/helper/RegistryServiceFactory.java b/javaunohelper/com/sun/star/comp/helper/RegistryServiceFactory.java deleted file mode 100644 index c748187ba..000000000 --- a/javaunohelper/com/sun/star/comp/helper/RegistryServiceFactory.java +++ /dev/null @@ -1,168 +0,0 @@ -/************************************************************************* - * - * 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 - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - - -package com.sun.star.comp.helper; - - -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.uno.UnoRuntime; -import com.sun.star.uno.RuntimeException; - -/** The class provides a set of methods which create instances of the - com.sun.star.lang.RegistryServiceManager service. - - @deprecated use class Bootstrap instead -*/ -public class RegistryServiceFactory { - static { - System.loadLibrary("juh"); - } - - private static native Object createRegistryServiceFactory( - String writeRegistryFile, - String readRegistryFile, - boolean readOnly, - ClassLoader loader); - - /** - * This bootstraps an initial service factory working on a registry. If the first or both - * parameters contain a value then the service factory is initialized with a simple registry - * or a nested registry. Otherwise the service factory must be initialized later with a valid - * registry. - *<BR> - * @param writeRegistryFile file name of the simple registry or the first registry file of - * the nested registry which will be opened with read/write rights. This - * file will be created if necessary. - * @param readRegistryFile file name of the second registry file of the nested registry - * which will be opened with readonly rights. - * @return a new RegistryServiceFactory. - */ - public static XMultiServiceFactory create(String writeRegistryFile, String readRegistryFile) - throws com.sun.star.uno.Exception - { - return create(writeRegistryFile, readRegistryFile, false); - } - - /** - * This bootstraps an initial service factory working on a registry. If the first or both - * parameters contain a value then the service factory is initialized with a simple registry - * or a nested registry. Otherwise the service factory must be initialized later with a valid - * registry. - *<BR> - * @param writeRegistryFile file name of the simple registry or the first registry file of - * the nested registry which will be opened with read/write rights. This - * file will be created if necessary. - * @param readRegistryFile file name of the second registry file of the nested registry - * which will be opened with readonly rights. - * @param readOnly flag which specify that the first registry file will be opened with - * readonly rights. Default is FALSE. If this flag is used the registry - * will not be created if not exist. - * - * @return a new RegistryServiceFactory - */ - public static XMultiServiceFactory create(String writeRegistryFile, String readRegistryFile, boolean readOnly) - throws com.sun.star.uno.Exception - { - // Ensure that we are on a native threads vm - // (binary UNO does use native threads). - String vm_info = System.getProperty("java.vm.info"); - if(vm_info != null && vm_info.indexOf("green") != -1) - throw new RuntimeException(RegistryServiceFactory.class.toString() + ".create - can't use binary UNO with green threads"); - - - if (writeRegistryFile == null && readRegistryFile == null) - throw new com.sun.star.uno.Exception("No registry is specified!"); - -// if (writeRegistryFile != null) { -// java.io.File file = new java.io.File(writeRegistryFile); - -// if (file.exists()) { -// if (!file.isFile()) -// throw new com.sun.star.uno.Exception(writeRegistryFile + " is not a file!"); -// } else -// throw new com.sun.star.uno.Exception(writeRegistryFile + " doese not exist!"); -// } - -// if (readRegistryFile != null) { -// java.io.File file = new java.io.File(readRegistryFile); - -// if (file.exists()) { -// if (!file.isFile()) -// throw new com.sun.star.uno.Exception(readRegistryFile + " is not a file!"); -// } else -// throw new com.sun.star.uno.Exception(readRegistryFile + " doese not exist!"); -// } - - Object obj = createRegistryServiceFactory( - writeRegistryFile, readRegistryFile, readOnly, - RegistryServiceFactory.class.getClassLoader() ); - return UnoRuntime.queryInterface( - XMultiServiceFactory.class, obj ); - } - - /** - * This bootstraps an initial service factory working on a registry file. - *<BR> - * @param registryFile file name of the registry to use/ create; if this is an empty - * string, the default registry is used instead - * - * @return a new RegistryServiceFactory. - */ - public static XMultiServiceFactory create(String registryFile) - throws com.sun.star.uno.Exception - { - return create(registryFile, null, false); - } - - /** - * This bootstraps an initial service factory working on a registry file. - *<BR> - * @param registryFile file name of the registry to use/ create; if this is an empty - * string, the default registry is used instead - * @param readOnly flag which specify that the registry file will be opened with - * readonly rights. Default is FALSE. If this flag is used the registry - * will not be created if not exist. - * - * @return a new RegistryServiceFactory. - */ - public static XMultiServiceFactory create(String registryFile, boolean readOnly) - throws com.sun.star.uno.Exception - { - return create(registryFile, null, readOnly); - } - - /** - * This bootstraps a service factory without initialize a registry. - *<BR> - * @return a new RegistryServiceFactory. - */ - public static XMultiServiceFactory create() throws com.sun.star.uno.Exception { - return create( null, null, false ); - } -} - diff --git a/javaunohelper/com/sun/star/comp/helper/SharedLibraryLoader.java b/javaunohelper/com/sun/star/comp/helper/SharedLibraryLoader.java deleted file mode 100644 index 590c6251f..000000000 --- a/javaunohelper/com/sun/star/comp/helper/SharedLibraryLoader.java +++ /dev/null @@ -1,159 +0,0 @@ -/************************************************************************* - * - * 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 - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -package com.sun.star.comp.helper; - -import com.sun.star.uno.UnoRuntime; -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.lang.XSingleServiceFactory; -import com.sun.star.registry.XRegistryKey; - -/** - * @deprecated use class Bootstrap bootstrapping a native UNO installation - * and use the shared library loader service. - * - * The <code>SharedLibraryLoader</code> class provides the functionality of the <code>com.sun.star.loader.SharedLibrary</code> - * service. - * <p> - * @see com.sun.star.loader.SharedLibrary - * @see "com.sun.star.comp.servicemanager.ServiceManager" - * @see com.sun.star.lang.ServiceManager - */ -public class SharedLibraryLoader { - /** - * The default library which contains the SharedLibraryLoader component - */ - public static final String DEFAULT_LIBRARY = "shlibloader.uno"; - - /** - * The default implementation name - */ - public static final String DEFAULT_IMPLEMENTATION = "com.sun.star.comp.stoc.DLLComponentLoader"; - - static { - System.loadLibrary("juh"); - } - - private static native boolean component_writeInfo( - String libName, XMultiServiceFactory smgr, XRegistryKey regKey, - ClassLoader loader ); - - private static native Object component_getFactory( - String libName, String implName, XMultiServiceFactory smgr, - XRegistryKey regKey, ClassLoader loader ); - - /** - * Supplies the ServiceFactory of the default SharedLibraryLoader. - * The defaults are "shlibloader.uno" - * for the library and "com.sun.star.comp.stoc.DLLComponentLoader" - * for the component name. - * <p> - * @return the factory for the "com.sun.star.comp.stoc.DLLComponentLoader" component. - * @param smgr the ServiceManager - * @param regKey the root registry key - * @see com.sun.star.loader.SharedLibrary - * @see com.sun.star.lang.ServiceManager - * @see com.sun.star.registry.RegistryKey - */ - public static XSingleServiceFactory getServiceFactory( - XMultiServiceFactory smgr, - XRegistryKey regKey ) - { - return UnoRuntime.queryInterface( - XSingleServiceFactory.class, - component_getFactory( - DEFAULT_LIBRARY, DEFAULT_IMPLEMENTATION, smgr, regKey, - SharedLibraryLoader.class.getClassLoader() ) ); - } - - /** - * Loads and returns a specific factory for a given library and implementation name. - * <p> - * @return the factory of the component - * @param libName the name of the shared library - * @param impName the implementation name of the component - * @param smgr the ServiceManager - * @param regKey the root registry key - * @see com.sun.star.loader.SharedLibrary - * @see com.sun.star.lang.ServiceManager - * @see com.sun.star.registry.RegistryKey - */ - public static XSingleServiceFactory getServiceFactory( - String libName, - String impName, - XMultiServiceFactory smgr, - XRegistryKey regKey ) - { - return UnoRuntime.queryInterface( - XSingleServiceFactory.class, - component_getFactory( - libName, impName, smgr, regKey, - SharedLibraryLoader.class.getClassLoader() ) ); - } - - /** - * Registers the SharedLibraryLoader under a RegistryKey. - * <p> - * @return true if the registration was successfull - otherwise false - * @param smgr the ServiceManager - * @param regKey the root key under that the component should be registered - * @see com.sun.star.loader.SharedLibrary - * @see com.sun.star.lang.ServiceManager - * @see com.sun.star.registry.RegistryKey - */ - public static boolean writeRegistryServiceInfo( - com.sun.star.lang.XMultiServiceFactory smgr, - com.sun.star.registry.XRegistryKey regKey ) - { - return component_writeInfo( - DEFAULT_LIBRARY, smgr, regKey, - SharedLibraryLoader.class.getClassLoader() ); - } - - /** - * Registers the SharedLibraryLoader under a RegistryKey. - * <p> - * @return true if the registration was successfull - otherwise false - * @param libName name of the shared library - * @param smgr the ServiceManager - * @param regKey the root key under that the component should be registered - * @see com.sun.star.loader.SharedLibrary - * @see com.sun.star.lang.ServiceManager - * @see com.sun.star.registry.RegistryKey - */ - public static boolean writeRegistryServiceInfo( - String libName, - com.sun.star.lang.XMultiServiceFactory smgr, - com.sun.star.registry.XRegistryKey regKey ) - - throws com.sun.star.registry.InvalidRegistryException, - com.sun.star.uno.RuntimeException - { - return component_writeInfo( - libName, smgr, regKey, SharedLibraryLoader.class.getClassLoader() ); - } -} - diff --git a/javaunohelper/com/sun/star/comp/helper/UnoInfo.java b/javaunohelper/com/sun/star/comp/helper/UnoInfo.java deleted file mode 100644 index 896974b9e..000000000 --- a/javaunohelper/com/sun/star/comp/helper/UnoInfo.java +++ /dev/null @@ -1,115 +0,0 @@ -/************************************************************************* - * - * 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 - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -package com.sun.star.comp.helper; - -import java.net.MalformedURLException; -import java.net.URL; -import java.net.URLClassLoader; - -/** - * UnoInfo offers functionality to obtain the UNO jar files. - */ -public final class UnoInfo { - - /** - * do not instantiate - */ - private UnoInfo() {} - - /** - * Gets the URL base. - * - * @return the URL base - */ - private static String getBase() { - - final String JUHJAR = "/juh.jar"; - - String base = null; - - URLClassLoader cl = (URLClassLoader) UnoInfo.class.getClassLoader(); - URL[] urls = cl.getURLs(); - for ( int i = 0; i < urls.length; i++ ) { - String url = urls[i].toString(); - if ( url.endsWith( JUHJAR ) ) - { - int index = url.lastIndexOf( JUHJAR ); - if ( index >= 0 ) { - base = url.substring( 0, index + 1 ); - break; - } - } - } - - return base; - } - - /** - * Gets a list of URLs for the given jar files. - * - * @return the list of URLs - */ - private static URL[] getURLs( String[] jarFileNames ) { - - URL[] jars = new URL[jarFileNames.length]; - String base = getBase(); - for ( int i = 0; i < jarFileNames.length; i++ ) { - try { - jars[i] = new URL( base + jarFileNames[i] ); - } catch ( MalformedURLException e ) { - return null; - } - } - - return jars; - } - - /** - * Gets the UNO jar files. - * - * @return the UNO jar files - */ - public static URL[] getJars() { - - String[] jarFileNames = new String[] { - "jurt.jar", - "ridl.jar", - "juh.jar" }; - - return getURLs( jarFileNames ); - } - - /** - * Gets the extra UNO types. - * - * @return the extra UNO types - */ - public static URL[] getExtraTypes() { - return new URL[0]; - } -} diff --git a/javaunohelper/com/sun/star/comp/helper/makefile.mk b/javaunohelper/com/sun/star/comp/helper/makefile.mk deleted file mode 100644 index 3752abc7d..000000000 --- a/javaunohelper/com/sun/star/comp/helper/makefile.mk +++ /dev/null @@ -1,54 +0,0 @@ -#************************************************************************* -# -# 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 -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/..$/..$/.. - -PRJNAME = juhelper -PACKAGE = com$/sun$/star$/comp$/helper -TARGET = com_sun_star_comp_helper - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE: $(PRJ)$/util$/settings.pmk - -# --- Files -------------------------------------------------------- - -JAVAFILES= \ - ComponentContextEntry.java \ - ComponentContext.java \ - Bootstrap.java \ - SharedLibraryLoader.java \ - RegistryServiceFactory.java \ - BootstrapException.java \ - UnoInfo.java - -JAVACLASSFILES= $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class) - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/javaunohelper/com/sun/star/comp/juhtest/SmoketestCommandEnvironment.java b/javaunohelper/com/sun/star/comp/juhtest/SmoketestCommandEnvironment.java deleted file mode 100644 index a28d3a145..000000000 --- a/javaunohelper/com/sun/star/comp/juhtest/SmoketestCommandEnvironment.java +++ /dev/null @@ -1,151 +0,0 @@ -/************************************************************************* - * - * 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 - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -package com.sun.star.comp.juhtest; - -import com.sun.star.lang.XMultiComponentFactory; -import com.sun.star.lib.uno.helper.WeakBase; -import com.sun.star.uno.UnoRuntime; -import com.sun.star.uno.XComponentContext; -import com.sun.star.lang.XServiceInfo; -import com.sun.star.ucb.XCommandEnvironment; - -/** This service is for use by the smoketest which checks the installation of - * extensions. The service provides the XCommandEnvironment interface, which - * is needed for adding extensions. - */ -public class SmoketestCommandEnvironment extends WeakBase - implements XServiceInfo, XCommandEnvironment { - - static private final String __serviceName = - "com.sun.star.deployment.test.SmoketestCommandEnvironment"; - - private XComponentContext m_cmpCtx; - private XMultiComponentFactory m_xMCF; - - - public SmoketestCommandEnvironment(XComponentContext xCompContext) { - try { - m_cmpCtx = xCompContext; - m_xMCF = m_cmpCtx.getServiceManager(); - } - catch( Exception e ) { - e.printStackTrace(); - } - } - - public static String[] getServiceNames() { - String[] sSupportedServiceNames = { __serviceName}; - return sSupportedServiceNames; - } - - //XServiceInfo ------------------------------------------------------------- - public String[] getSupportedServiceNames() { - return getServiceNames(); - } - - - public boolean supportsService( String sServiceName ) { - boolean bSupported = false; - if (sServiceName.equals(__serviceName)) - bSupported = true; - return bSupported; - } - - public String getImplementationName() { - return SmoketestCommandEnvironment.class.getName(); - } - - //XCommandEnvironment ================================================ - public com.sun.star.task.XInteractionHandler getInteractionHandler() - { - return new InteractionImpl(); - } - - public com.sun.star.ucb.XProgressHandler getProgressHandler() - { - return new ProgressImpl(); - } -} - - - - -class InteractionImpl implements com.sun.star.task.XInteractionHandler -{ - public void handle( com.sun.star.task.XInteractionRequest xRequest ) - { - Object request = xRequest.getRequest(); - - boolean approve = true; - boolean abort = false; -// Object install_Exception = -// AnyConverter.toObject( -// com.sun.star.deployment.InstallException.class, request); -// if (install_Exception != null) -// { -// approve = true; -// } - - com.sun.star.task.XInteractionContinuation[] conts = xRequest.getContinuations(); - for (int i = 0; i < conts.length; i++) - { - if (approve) - { - com.sun.star.task.XInteractionApprove xApprove = - UnoRuntime.queryInterface(com.sun.star.task.XInteractionApprove.class, conts[i]); - if (xApprove != null) - xApprove.select(); - //don't query again for ongoing extensions - approve = false; - } - else if (abort) - { - com.sun.star.task.XInteractionAbort xAbort = - UnoRuntime.queryInterface(com.sun.star.task.XInteractionAbort.class, conts[i]); - if (xAbort != null) - xAbort.select(); - //don't query again for ongoing extensions - abort = false; - } - } - } -} - -class ProgressImpl implements com.sun.star.ucb.XProgressHandler -{ - public void push(Object status) - { - } - - public void update(Object status) - { - } - - public void pop() - { - } -} diff --git a/javaunohelper/com/sun/star/comp/juhtest/makefile.mk b/javaunohelper/com/sun/star/comp/juhtest/makefile.mk deleted file mode 100644 index 0d65b961a..000000000 --- a/javaunohelper/com/sun/star/comp/juhtest/makefile.mk +++ /dev/null @@ -1,50 +0,0 @@ -#************************************************************************* -# -# 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 -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/..$/..$/.. - -PRJNAME = juhelper -PACKAGE = com$/sun$/star$/comp$/juhtest -TARGET = com_sun_star_comp_juhtest - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE: $(PRJ)$/util$/settings.pmk - -# --- Files -------------------------------------------------------- -#todo: we do not want include juh.jar here but use the output tree. -JARFILES = unoil.jar ridl.jar jurt.jar - -JAVAFILES= \ - SmoketestCommandEnvironment.java - -JAVACLASSFILES= $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class) - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/javaunohelper/com/sun/star/comp/makefile.mk b/javaunohelper/com/sun/star/comp/makefile.mk deleted file mode 100644 index bde016b47..000000000 --- a/javaunohelper/com/sun/star/comp/makefile.mk +++ /dev/null @@ -1,49 +0,0 @@ -#************************************************************************* -# -# 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 -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/..$/.. - -PRJNAME = juhelper -PACKAGE = com$/sun$/star$/comp -TARGET = com_sun_star_comp - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE: $(PRJ)$/util$/settings.pmk - -# --- Files -------------------------------------------------------- -JARFILES = ridl.jar jurt.jar unoil.jar -JAVAFILES= \ - JavaUNOHelperServices.java - - -JAVACLASSFILES= $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class) - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk |