diff options
-rw-r--r-- | javaunohelper/com/sun/star/comp/helper/RegistryServiceFactory.java | 190 | ||||
-rw-r--r-- | javaunohelper/com/sun/star/comp/helper/SharedLibraryLoader.java | 183 | ||||
-rw-r--r-- | javaunohelper/com/sun/star/comp/helper/makefile.mk | 85 | ||||
-rw-r--r-- | javaunohelper/prj/d.lst | 3 | ||||
-rw-r--r-- | javaunohelper/source/javaunohelper.cxx | 432 | ||||
-rw-r--r-- | javaunohelper/source/makefile.mk | 126 | ||||
-rw-r--r-- | javaunohelper/test/com/sun/star/comp/helper/RegistryServiceFactory_Test.java | 134 | ||||
-rw-r--r-- | javaunohelper/test/com/sun/star/comp/helper/SharedLibraryLoader_Test.java | 228 | ||||
-rw-r--r-- | javaunohelper/test/com/sun/star/comp/helper/makefile.mk | 84 | ||||
-rw-r--r-- | javaunohelper/util/makefile.mk | 80 | ||||
-rw-r--r-- | offuh/prj/d.lst | 151 | ||||
-rw-r--r-- | offuh/source/makefile.mk | 82 |
12 files changed, 1778 insertions, 0 deletions
diff --git a/javaunohelper/com/sun/star/comp/helper/RegistryServiceFactory.java b/javaunohelper/com/sun/star/comp/helper/RegistryServiceFactory.java new file mode 100644 index 000000000000..48f60490dc8a --- /dev/null +++ b/javaunohelper/com/sun/star/comp/helper/RegistryServiceFactory.java @@ -0,0 +1,190 @@ +/************************************************************************* + * + * $RCSfile: RegistryServiceFactory.java,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:31:32 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + + +package com.sun.star.comp.helper; + +import com.sun.star.lang.XMultiServiceFactory; +import com.sun.star.uno.UnoRuntime; + +public class RegistryServiceFactory { + static { + System.loadLibrary("juh"); + } + + private static native Object createRegistryServiceFactory( + String writeRegistryFile, + String readRegistryFile, + boolean readOnly ); + + /** + * 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. + * + * @author Markus Herzog + */ + 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. + * + * @author Markus Herzog + */ + public static XMultiServiceFactory create( + String writeRegistryFile, String readRegistryFile, boolean readOnly ) + throws com.sun.star.uno.Exception + { + 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 ); + return (XMultiServiceFactory) 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 + * + * @author Markus Herzog + */ + 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. + * + * @author Markus Herzog + */ + 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 initilaize a registry. + *<BR> + * @author Markus Herzog + */ + 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 new file mode 100644 index 000000000000..20c0c5be78cd --- /dev/null +++ b/javaunohelper/com/sun/star/comp/helper/SharedLibraryLoader.java @@ -0,0 +1,183 @@ +/************************************************************************* + * + * $RCSfile: SharedLibraryLoader.java,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:31:32 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +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; + +/** + * The <code>SharedLibraryLoader</code> class provides the functionality of the <code>com.sun.star.loader.SharedLibrary</code> + * service. + * <p> + * @version $Revision: 1.1.1.1 $ $ $Date: 2000-09-18 16:31:32 $ + * @author Markus Herzog + * @see com.sun.star.loader.SharedLibrary + * @see com.sun.star.comp.servicemanager.ServiceManager + * @see com.sun.star.lang.ServiceManager + * @since UDK1.0 + */ +public class SharedLibraryLoader { + /** + * The default library which contains the SharedLibraryLoader component + */ + public static final String DEFAULT_LIBRARY = "cpld"; + + /** + * 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 ); + + private static native Object component_getFactory( + String libName, String implName, XMultiServiceFactory smgr, XRegistryKey regKey ); + + /** + * Supplies the ServiceFactory of the default SharedLibraryLoader. + * The defaults are "cpld" 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 (XSingleServiceFactory) UnoRuntime.queryInterface( + XSingleServiceFactory.class, + component_getFactory( DEFAULT_LIBRARY, DEFAULT_IMPLEMENTATION, smgr, regKey ) ); + } + + /** + * 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 (XSingleServiceFactory) UnoRuntime.queryInterface( + XSingleServiceFactory.class, + component_getFactory( libName, impName, smgr, regKey ) ); + } + + /** + * 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 ); + } + + /** + * 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 ); + } +} + diff --git a/javaunohelper/com/sun/star/comp/helper/makefile.mk b/javaunohelper/com/sun/star/comp/helper/makefile.mk new file mode 100644 index 000000000000..c4a9616a5c28 --- /dev/null +++ b/javaunohelper/com/sun/star/comp/helper/makefile.mk @@ -0,0 +1,85 @@ +#************************************************************************* +# +# $RCSfile: makefile.mk,v $ +# +# $Revision: 1.1.1.1 $ +# +# last change: $Author: hr $ $Date: 2000-09-18 16:31:32 $ +# +# The Contents of this file are made available subject to the terms of +# either of the following licenses +# +# - GNU Lesser General Public License Version 2.1 +# - Sun Industry Standards Source License Version 1.1 +# +# Sun Microsystems Inc., October, 2000 +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2000 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library 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 for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +# +# Sun Industry Standards Source License Version 1.1 +# ================================================= +# The contents of this file are subject to the Sun Industry Standards +# Source License Version 1.1 (the "License"); You may not use this file +# except in compliance with the License. You may obtain a copy of the +# License at http://www.openoffice.org/license.html. +# +# Software provided under this License is provided on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, +# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. +# See the License for the specific provisions governing your rights and +# obligations concerning the Software. +# +# The Initial Developer of the Original Code is: Sun Microsystems, Inc. +# +# Copyright: 2000 by Sun Microsystems, Inc. +# +# All Rights Reserved. +# +# Contributor(s): _______________________________________ +# +# +# +#************************************************************************* + +PRJ=..$/..$/..$/..$/.. + +PRJNAME = juhelper +PACKAGE = com$/sun$/star$/comp$/helper +TARGET = com_sun_star_comp_helper + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk + +# --- Files -------------------------------------------------------- + +JARFILES = sandbox.jar jurt.jar unoil.jar + +JAVAFILES= \ + SharedLibraryLoader.java \ + RegistryServiceFactory.java + +JAVACLASSFILES= $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class) + +# --- Targets ------------------------------------------------------ + +.INCLUDE : target.mk diff --git a/javaunohelper/prj/d.lst b/javaunohelper/prj/d.lst new file mode 100644 index 000000000000..4f58e3b99357 --- /dev/null +++ b/javaunohelper/prj/d.lst @@ -0,0 +1,3 @@ +..\%__SRC%\class\juh.jar %_DEST%\bin%_EXT%\juh.jar +..\%__SRC%\bin\juh.dll %_DEST%\bin%_EXT%\juh.dll +..\%__SRC%\lib\libjuh.so %_DEST%\lib%_EXT%\libjuh.so diff --git a/javaunohelper/source/javaunohelper.cxx b/javaunohelper/source/javaunohelper.cxx new file mode 100644 index 000000000000..7b3996586100 --- /dev/null +++ b/javaunohelper/source/javaunohelper.cxx @@ -0,0 +1,432 @@ +/************************************************************************* + * + * $RCSfile: javaunohelper.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:31:32 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#ifndef _OSL_DIAGNOSE_H_ +#include <osl/diagnose.h> +#endif +#ifndef _OSL_MODULE_H_ +#include <osl/module.h> +#endif +#ifndef _OSL_THREAD_H_ +#include <osl/thread.h> +#endif +#ifndef _RTL_USTRING_HXX_ +#include <rtl/ustring.hxx> +#endif +#ifndef _RTL_STRBUF_HXX_ +#include <rtl/strbuf.hxx> +#endif + +#ifndef _UNO_ENVIRONMENT_H_ +#include <uno/environment.h> +#endif +#ifndef _UNO_MAPPING_HXX_ +#include <uno/mapping.hxx> +#endif + +#ifndef _CPPUHELPER_QUERYINTERFACE_HXX_ +#include <cppuhelper/queryinterface.hxx> +#endif +#ifndef _CPPUHELPER_WEAK_HXX_ +#include <cppuhelper/weak.hxx> +#endif +#ifndef _CPPUHELPER_FACTORY_HXX_ +#include <cppuhelper/factory.hxx> +#endif +#ifndef _CPPUHELPER_IMPLBASE3_HXX_ +#include <cppuhelper/implbase3.hxx> +#endif + +#include <cppuhelper/servicefactory.hxx> + +#include <com/sun/star/loader/XImplementationLoader.hpp> +#include <com/sun/star/lang/IllegalArgumentException.hpp> +#include <com/sun/star/lang/XMultiServiceFactory.hpp> +#include <com/sun/star/lang/XServiceInfo.hpp> +#include <com/sun/star/lang/XInitialization.hpp> +#include <com/sun/star/registry/XRegistryKey.hpp> + +#include <jni.h> + +//#include <com_sun_star_comp_helper_RegistryServiceFactory.h> +//#include <com_sun_star_comp_helper_SharedLibraryLoader.h> + +using namespace com::sun::star::uno; +using namespace com::sun::star::loader; +using namespace com::sun::star::lang; +using namespace com::sun::star::registry; +using namespace cppu; +using namespace rtl; + +#define JAVA_ENV_NAME "java" + +/* + * Class: com_sun_star_comp_helper_SharedLibraryLoader + * Method: component_writeInfo + * Signature: (Ljava/lang/String;Lcom/sun/star/lang/XMultiServiceFactory;Lcom/sun/star/registry/XRegistryKey;)Z + */ +extern "C" JNIEXPORT jboolean JNICALL Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1writeInfo + (JNIEnv * pJEnv, jclass jClass, jstring jLibName, jobject jSMgr, jobject jRegKey) +{ + OUString sMessage; + sal_Bool bRet = sal_False; + + const jchar* pJLibName = pJEnv->GetStringChars( jLibName, NULL ); + OUString aLibName( pJLibName ); + pJEnv->ReleaseStringChars( jLibName, pJLibName); + + oslModule lib = osl_loadModule( aLibName.pData, SAL_LOADMODULE_LAZY | SAL_LOADMODULE_GLOBAL ); + + if (lib) + { + void * pSym; + + // ========================= LATEST VERSION ========================= + OUString aGetEnvName( RTL_CONSTASCII_USTRINGPARAM(COMPONENT_GETENV) ); + if (pSym = osl_getSymbol( lib, aGetEnvName.pData )) + { + uno_Environment * pJavaEnv = 0; + uno_Environment * pLoaderEnv = 0; + const sal_Char * pEnvTypeName = 0; + + (*((component_getImplementationEnvironmentFunc)pSym))( &pEnvTypeName, &pLoaderEnv ); + OUString aEnvTypeName( OUString::createFromAscii( pEnvTypeName ) ); + + if (! pLoaderEnv) + uno_getEnvironment( &pLoaderEnv, aEnvTypeName.pData, 0 ); + + JavaVM * pJVM; + pJEnv->GetJavaVM( &pJVM ); + + uno_getEnvironment(&pJavaEnv, OUString::createFromAscii("java").pData, pJVM); + + OUString aWriteInfoName( RTL_CONSTASCII_USTRINGPARAM(COMPONENT_WRITEINFO) ); + if (pSym = osl_getSymbol( lib, aWriteInfoName.pData )) + { + if (pJavaEnv && pLoaderEnv) + { + Mapping java2dest(pJavaEnv, pLoaderEnv); + + if ( java2dest.is() ) + { + typelib_InterfaceTypeDescription * pType = 0; + + getCppuType((Reference< XMultiServiceFactory > *) 0).getDescription((typelib_TypeDescription **) & pType); + void * pSMgr = java2dest.mapInterface(jSMgr, pType); + + getCppuType((Reference< XRegistryKey > *) 0).getDescription((typelib_TypeDescription **) & pType); + void * pKey = java2dest.mapInterface(jRegKey, pType); + + if (pKey) + { + bRet = (*((component_writeInfoFunc)pSym))( pSMgr, pKey ); + + if (pLoaderEnv->pExtEnv) + (*pLoaderEnv->pExtEnv->releaseInterface)( pLoaderEnv->pExtEnv, pKey ); + } + + if (pSMgr && pLoaderEnv->pExtEnv) + (*pLoaderEnv->pExtEnv->releaseInterface)( pLoaderEnv->pExtEnv, pSMgr ); + } + } + } else + { + sMessage = OUString::createFromAscii("symbol \""); + sMessage += aWriteInfoName; + sMessage += OUString::createFromAscii("\" could not be found in \""); + sMessage += aLibName; + sMessage += OUString::createFromAscii("\""); + } + + if (pLoaderEnv) + (*pLoaderEnv->release)( pLoaderEnv ); + if (pJavaEnv) + (*pJavaEnv->release)( pJavaEnv ); + } + } + + return bRet == sal_False? JNI_FALSE : JNI_TRUE; +} + +/* + * Class: com_sun_star_comp_helper_SharedLibraryLoader + * Method: component_getFactory + * Signature: (Ljava/lang/String;Ljava/lang/String;Lcom/sun/star/lang/XMultiServiceFactory;Lcom/sun/star/registry/XRegistryKey;)Ljava/lang/Object; + */ +extern "C" JNIEXPORT jobject JNICALL Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1getFactory + (JNIEnv * pJEnv, jclass jClass, jstring jLibName, jstring jImplName, jobject jSMgr, jobject jRegKey) +{ OUString sMessage; + + const jchar* pJLibName = pJEnv->GetStringChars(jLibName, NULL); + OUString aLibName( pJLibName ); + pJEnv->ReleaseStringChars( jLibName, pJLibName); + + //OUString aLibName = OUString::createFromAscii("cpld"); + + + oslModule lib = osl_loadModule( aLibName.pData, SAL_LOADMODULE_LAZY | SAL_LOADMODULE_GLOBAL ); + + jobject joSLL_cpp; + + if (lib) + { + void * pSym; + + // ========================= LATEST VERSION ========================= + OUString aGetEnvName( RTL_CONSTASCII_USTRINGPARAM(COMPONENT_GETENV) ); + if (pSym = osl_getSymbol( lib, aGetEnvName.pData )) + { + uno_Environment * pJavaEnv = 0; + uno_Environment * pLoaderEnv = 0; + const sal_Char * pEnvTypeName = 0; + + (*((component_getImplementationEnvironmentFunc)pSym))( &pEnvTypeName, &pLoaderEnv ); + OUString aEnvTypeName( OUString::createFromAscii( pEnvTypeName ) ); + + if (! pLoaderEnv) + uno_getEnvironment( &pLoaderEnv, aEnvTypeName.pData, 0 ); + + JavaVM * pJVM; + + pJEnv->GetJavaVM( &pJVM ); + + uno_getEnvironment(&pJavaEnv, OUString::createFromAscii("java").pData, pJVM); + + OUString aGetFactoryName( RTL_CONSTASCII_USTRINGPARAM(COMPONENT_GETFACTORY) ); + + if (pSym = osl_getSymbol( lib, aGetFactoryName.pData )) + { + if (pJavaEnv && pLoaderEnv) + { + Mapping java2dest( pJavaEnv, pLoaderEnv ); + Mapping dest2java( pLoaderEnv, pJavaEnv ); + + if (dest2java.is() && java2dest.is()) + { + typelib_InterfaceTypeDescription * pType = 0; + + getCppuType((Reference< XMultiServiceFactory > *) 0).getDescription((typelib_TypeDescription **) & pType); + void * pSMgr = java2dest.mapInterface(jSMgr, pType); + + getCppuType((Reference< XRegistryKey > *) 0).getDescription((typelib_TypeDescription **) & pType); + void * pKey = java2dest.mapInterface(jRegKey, pType); + + const char* pImplName = pJEnv->GetStringUTFChars( jImplName, NULL ); + + //com.sun.star.comp.stoc.DLLComponentLoader + //void * pSSF = (*((component_getFactoryFunc)pSym))( "com.sun.star.comp.stoc.DLLComponentLoader", pSMgr, pKey ); + void * pSSF = (*((component_getFactoryFunc)pSym))( pImplName, pSMgr, pKey ); + + pJEnv->ReleaseStringUTFChars( jImplName, pImplName ); + + if (pKey && pLoaderEnv->pExtEnv) + (*pLoaderEnv->pExtEnv->releaseInterface)( pLoaderEnv->pExtEnv, pKey ); + if (pSMgr && pLoaderEnv->pExtEnv) + (*pLoaderEnv->pExtEnv->releaseInterface)( pLoaderEnv->pExtEnv, pSMgr ); + + if (pSSF) + { + typelib_InterfaceTypeDescription * pXSharedLibraryLoader_Type = 0; + getCppuType((Reference< XServiceInfo > *) 0).getDescription((typelib_TypeDescription **) & pXSharedLibraryLoader_Type); + + pXSharedLibraryLoader_Type = 0; + getCppuType((Reference< XSingleServiceFactory > *) 0).getDescription((typelib_TypeDescription **) & pXSharedLibraryLoader_Type); + + joSLL_cpp = (jobject) dest2java.mapInterface( pSSF, getCppuType((Reference< XSingleServiceFactory > *) 0)); + + /* + XSingleServiceFactory * pRet = (XSingleServiceFactory *) + aDest2Java.mapInterface( + pSSF, ::getCppuType( (const Reference< XSingleServiceFactory > *)0 ) ); + if (pRet) + { + xRet = pRet; + pRet->release(); + } + */ + if (pLoaderEnv->pExtEnv) + (*pLoaderEnv->pExtEnv->releaseInterface)( pLoaderEnv->pExtEnv, pSSF ); + } + else + { + sMessage = OUString::createFromAscii("got no factory from component \""); + sMessage += aLibName; + sMessage += OUString::createFromAscii("\"!"); + } + } + } + } else + { + sMessage = OUString::createFromAscii("symbol \""); + sMessage += aGetFactoryName; + sMessage += OUString::createFromAscii("\" could not be found in \""); + sMessage += aLibName; + sMessage += OUString::createFromAscii("\""); + } + + if (pLoaderEnv) + (*pLoaderEnv->release)( pLoaderEnv ); + if (pJavaEnv) + (*pJavaEnv->release)( pJavaEnv ); + } + } + return joSLL_cpp; +} + +/* + * Class: com_sun_star_comp_helper_RegistryServiceFactory + * Method: createRegistryServiceFactory + * Signature: (Ljava/lang/String;Ljava/lang/String;Z)Ljava/lang/Object; + */ +extern "C" JNIEXPORT jobject JNICALL Java_com_sun_star_comp_helper_RegistryServiceFactory_createRegistryServiceFactory + (JNIEnv * pJEnv, jclass jClass, jstring jWriteRegFile, jstring jReadRegFile, jboolean jbReadOnly ) +{ + jobject jRegServiceFac; + uno_Environment * pJavaEnv = 0; + uno_Environment * pUnoEnv = 0; + JavaVM * pJVM; + + try + { + pJEnv->GetJavaVM( &pJVM ); + + //fprintf(stderr, "creating java environment\n"); + uno_getEnvironment( &pJavaEnv, OUString::createFromAscii("java").pData, pJVM ); + //fprintf(stderr, "done\n"); + + OUString aCurrentEnv(RTL_CONSTASCII_USTRINGPARAM(CPPU_CURRENT_LANGUAGE_BINDING_NAME)); + + //fprintf(stderr, "getting uno env\n"); + uno_getEnvironment(&pUnoEnv, aCurrentEnv.pData, NULL); + //fprintf(stderr, "done\n"); + + if (pJavaEnv && pUnoEnv) + { + OUString aWriteRegFile; + OUString aReadRegFile; + + sal_Bool bReadOnly = jbReadOnly == JNI_FALSE? sal_False : sal_True; + + if (jWriteRegFile) + { + const jchar* pjWriteRegFile = pJEnv->GetStringChars( jWriteRegFile, NULL ); + aWriteRegFile = OUString( pjWriteRegFile ); + pJEnv->ReleaseStringChars( jWriteRegFile, pjWriteRegFile ); + } + + if (jReadRegFile) + { + const jchar* pjReadRegFile = pJEnv->GetStringChars( jReadRegFile, NULL ); + aReadRegFile = OUString( pjReadRegFile ); + pJEnv->ReleaseStringChars( jReadRegFile, pjReadRegFile ); + } + //fprintf(stderr, "getting the native RegistryServiceFactory\n"); + Reference<XMultiServiceFactory> rMSFac; + + if (aReadRegFile.getLength() == 0) + { + rMSFac = createRegistryServiceFactory( aWriteRegFile, bReadOnly); + } + else + { + rMSFac = createRegistryServiceFactory( aWriteRegFile, aReadRegFile, bReadOnly ); + } + + //fprintf(stderr, "done\n"); + //Reference<XMultiServiceFactory> rMSFac = createRegistryServiceFactory( OUString::createFromAscii("m:\\applicat.rdb"), OUString() ); + Mapping dest2java( pUnoEnv, pJavaEnv ); + + if ( dest2java.is() ) + { + + typelib_InterfaceTypeDescription * pXMultiServiceFactory_Type = 0; + getCppuType((Reference< XMultiServiceFactory > *) 0).getDescription((typelib_TypeDescription **) & pXMultiServiceFactory_Type); + jRegServiceFac = (jobject) dest2java.mapInterface( rMSFac.get(), getCppuType((Reference< XMultiServiceFactory > *) 0)); + + if (pUnoEnv->pExtEnv) + (*pUnoEnv->pExtEnv->releaseInterface)( pUnoEnv->pExtEnv, rMSFac.get() ); + } + } + if (pJavaEnv) + (*pJavaEnv->release)( pJavaEnv ); + if (pUnoEnv) + (*pUnoEnv->release)( pUnoEnv ); + } + catch (::com::sun::star::uno::Exception ex) + { + + //jclass exClass = pJEnv->FindClass("com/sun/star/uno/Exception"); + if (pJavaEnv) + (*pJavaEnv->release)( pJavaEnv ); + if (pUnoEnv) + (*pUnoEnv->release)( pUnoEnv ); + /* + if (exClass) + { + OString msg = OUStringToOString( ex.Message, osl_getThreadTextEncoding()); + pJEnv->ThrowNew(exClass, msg.getStr()); + } + */ + + } + return jRegServiceFac; +} + diff --git a/javaunohelper/source/makefile.mk b/javaunohelper/source/makefile.mk new file mode 100644 index 000000000000..a9736781b961 --- /dev/null +++ b/javaunohelper/source/makefile.mk @@ -0,0 +1,126 @@ +#************************************************************************* +# +# $RCSfile: makefile.mk,v $ +# +# $Revision: 1.1.1.1 $ +# +# last change: $Author: hr $ $Date: 2000-09-18 16:31:32 $ +# +# The Contents of this file are made available subject to the terms of +# either of the following licenses +# +# - GNU Lesser General Public License Version 2.1 +# - Sun Industry Standards Source License Version 1.1 +# +# Sun Microsystems Inc., October, 2000 +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2000 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library 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 for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +# +# Sun Industry Standards Source License Version 1.1 +# ================================================= +# The contents of this file are subject to the Sun Industry Standards +# Source License Version 1.1 (the "License"); You may not use this file +# except in compliance with the License. You may obtain a copy of the +# License at http://www.openoffice.org/license.html. +# +# Software provided under this License is provided on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, +# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. +# See the License for the specific provisions governing your rights and +# obligations concerning the Software. +# +# The Initial Developer of the Original Code is: Sun Microsystems, Inc. +# +# Copyright: 2000 by Sun Microsystems, Inc. +# +# All Rights Reserved. +# +# Contributor(s): _______________________________________ +# +# +# +#************************************************************************* + +PRJ=.. + +PRJNAME= juhelper +TARGET= juh +USE_DEFFILE= TRUE +NO_BSYMBOLIC= TRUE +ENABLE_EXCEPTIONS=TRUE +BOOTSTRAP_SERVICE=TRUE + +# --- Settings ----------------------------------------------------- + +.INCLUDE : svpre.mk +.INCLUDE : settings.mk +.INCLUDE : sv.mk + +# ------------------------------------------------------------------ + +UNOUCRDEP= $(SOLARBINDIR)$/applicat.rdb +UNOUCRRDB= $(SOLARBINDIR)$/applicat.rdb + +.IF "$(BOOTSTRAP_SERVICE)" == "TRUE" +UNOUCROUT= $(OUT)$/inc$/comprehensive +INCPRE+= $(OUT)$/inc$/comprehensive +CPPUMAKERFLAGS += -C +.ELSE +UNOUCROUT= $(OUT)$/inc +INCPRE+= $(OUT)$/inc +.ENDIF + +UNOTYPES= \ + com.sun.star.loader.XImplementationLoader \ + com.sun.star.registry.XRegistryKey \ + com.sun.star.lang.IllegalArgumentException \ + com.sun.star.lang.XTypeProvider \ + com.sun.star.lang.XServiceInfo \ + com.sun.star.lang.XMultiServiceFactory \ + com.sun.star.lang.XSingleServiceFactory \ + com.sun.star.uno.TypeClass \ + com.sun.star.uno.XWeak \ + com.sun.star.uno.XAggregation \ + com.sun.star.lang.XInitialization + +SLOFILES= \ + $(SLO)$/javaunohelper.obj + +SHL1TARGET= $(TARGET) + +SHL1STDLIBS= \ + $(VOSLIB) \ + $(CPPULIB) \ + $(CPPUHELPERLIB) \ + $(SALLIB) + +SHL1DEPN= +SHL1IMPLIB= i$(TARGET) +SHL1LIBS= $(SLB)$/$(TARGET).lib +SHL1DEF= $(MISC)$/$(SHL1TARGET).def + +DEF1NAME= $(SHL1TARGET) +DEF1EXPORTFILE= exports.dxp + +# --- Targets ------------------------------------------------------ + +.INCLUDE : target.mk diff --git a/javaunohelper/test/com/sun/star/comp/helper/RegistryServiceFactory_Test.java b/javaunohelper/test/com/sun/star/comp/helper/RegistryServiceFactory_Test.java new file mode 100644 index 000000000000..007d2466486b --- /dev/null +++ b/javaunohelper/test/com/sun/star/comp/helper/RegistryServiceFactory_Test.java @@ -0,0 +1,134 @@ +/************************************************************************* + * + * $RCSfile: RegistryServiceFactory_Test.java,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:31:32 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +package com.sun.star.comp.helper; + +import com.sun.star.comp.loader.JavaLoader; + +import com.sun.star.comp.servicemanager.ServiceManager; +import com.sun.star.uno.UnoRuntime; + +import com.sun.star.container.XSet; +import com.sun.star.container.XContentEnumerationAccess; +import com.sun.star.container.XEnumeration; +import com.sun.star.container.XEnumerationAccess; +import com.sun.star.container.XElementAccess; + +import com.sun.star.lang.XComponent; + +import com.sun.star.lang.XServiceInfo; +import com.sun.star.lang.XMultiServiceFactory; +import com.sun.star.lang.XSingleServiceFactory; +import com.sun.star.lang.XInitialization; + +import com.sun.star.loader.XImplementationLoader; + +import com.sun.star.registry.XSimpleRegistry; + +public class RegistryServiceFactory_Test { + + static public boolean test(String applicat) throws java.lang.Exception { + boolean passed = false; + System.err.println(); + System.out.println("*******************************************************************"); + System.err.println("RegistryServiceFactory - doing tests..."); + System.err.println(); + + try { + XMultiServiceFactory msf = RegistryServiceFactory.create( applicat ); + String services[] = msf.getAvailableServiceNames(); + System.out.println("Available services are:"); + System.err.println(); + if (services.length == 0) + System.out.println("No services avialable!"); + + else + for ( int i=0; i<services.length; i++ ) + System.out.println(services[i]); + + passed = true; + } + catch (Exception e) { + e.printStackTrace(); + } + System.err.println(); + System.err.println("RegistryServiceFactory test passed? " + passed); + System.out.println("*******************************************************************"); + System.err.println(); + return passed; + } + + private static void usage() { + System.out.println(); + System.out.println("usage:"); + System.out.println("java com.sun.star.comp.helper.RegistryServiceFactory [rdb-file]"); + System.out.println("example:"); + System.out.println("java com.sun.star.comp.helper.RegistryServiceFactory c:\\applicat.rdb"); + System.exit( -1 ); + } + + static public void main(String args[]) throws java.lang.Exception { + if ( args.length != 1 ) + usage(); + System.exit( test(args[0]) == true ? 0: -1 ); + } +} + diff --git a/javaunohelper/test/com/sun/star/comp/helper/SharedLibraryLoader_Test.java b/javaunohelper/test/com/sun/star/comp/helper/SharedLibraryLoader_Test.java new file mode 100644 index 000000000000..1a28d84bd45a --- /dev/null +++ b/javaunohelper/test/com/sun/star/comp/helper/SharedLibraryLoader_Test.java @@ -0,0 +1,228 @@ +/************************************************************************* + * + * $RCSfile: SharedLibraryLoader_Test.java,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:31:32 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +package com.sun.star.comp.helper; + +import com.sun.star.comp.loader.JavaLoader; + +import com.sun.star.comp.servicemanager.ServiceManager; +import com.sun.star.uno.UnoRuntime; + +import com.sun.star.container.XSet; +import com.sun.star.container.XContentEnumerationAccess; +import com.sun.star.container.XEnumeration; +import com.sun.star.container.XEnumerationAccess; +import com.sun.star.container.XElementAccess; + +import com.sun.star.lang.XComponent; + +import com.sun.star.lang.XServiceInfo; +import com.sun.star.lang.XMultiServiceFactory; +import com.sun.star.lang.XSingleServiceFactory; +import com.sun.star.lang.XInitialization; + +import com.sun.star.loader.XImplementationLoader; + +import com.sun.star.registry.XSimpleRegistry; + + +public class SharedLibraryLoader_Test { + + private static final String NATIVE_SERVICE_MANAGER_IMP_NAME = "com.sun.star.comp.stoc.OServiceManager"; + private static final String NATIVE_SERVICE_MANAGER_LIB_NAME = "smgr"; + private static final String NATIVE_REGISTRY_IMP_NAME = "com.sun.star.comp.stoc.SimpleRegistry"; + private static final String NATIVE_REGISTRY_LIB_NAME = "simreg"; + + private static XMultiServiceFactory nativeServiceManager = null; + private static XSingleServiceFactory sharedLibraryLoaderFactory = null; + private static XImplementationLoader sharedLibraryLoader = null; + private static XSimpleRegistry simpleRegistry = null; + + static public boolean test_getSharedLibraryLoaderFactory() + throws java.lang.Exception + { + sharedLibraryLoaderFactory = null; + System.out.println("*******************************************************************"); + System.out.println("Test: <<< get SharedLibraryLoader factory >>>"); + sharedLibraryLoaderFactory = SharedLibraryLoader.getServiceFactory(null, null); + + System.out.print("Test - "); + System.out.println(sharedLibraryLoaderFactory == null? "failed" : "successfull"); + System.out.println("*******************************************************************"); + System.out.println(); + + return sharedLibraryLoaderFactory != null; + } + + static public boolean test_instantiateSharedLibraryLoader() + throws java.lang.Exception + { + sharedLibraryLoader = null; + System.out.println("*******************************************************************"); + System.out.println("Test: <<< instantiate SharedLibraryLoader >>>"); + if ( sharedLibraryLoaderFactory == null ) + if ( ! test_getSharedLibraryLoaderFactory() ) + return false; + + sharedLibraryLoader = (XImplementationLoader) UnoRuntime.queryInterface( + XImplementationLoader.class, sharedLibraryLoaderFactory.createInstance() ); + + System.out.print("Test - "); + System.out.println(sharedLibraryLoader == null? "failed" : "successfull"); + System.out.println("*******************************************************************"); + System.out.println(); + + return sharedLibraryLoader != null; + } + + static public boolean test_loadNativeServiceManager() + throws java.lang.Exception + { + nativeServiceManager = null; + + System.out.println("*******************************************************************"); + System.out.println("Test: <<< load native ServiceManager >>>"); + if ( sharedLibraryLoader == null ) + if ( ! test_instantiateSharedLibraryLoader() ) + return false; + + System.err.println("- get the native ServiceManger factory"); + XSingleServiceFactory aSMgrFac = + (XSingleServiceFactory) UnoRuntime.queryInterface( XSingleServiceFactory.class, + sharedLibraryLoader.activate(NATIVE_SERVICE_MANAGER_IMP_NAME, null, NATIVE_SERVICE_MANAGER_LIB_NAME, null)); + + System.err.println("- instantiate the native ServiceManger"); + nativeServiceManager = (XMultiServiceFactory) UnoRuntime.queryInterface( XMultiServiceFactory.class, aSMgrFac.createInstance() ); + + System.out.print("Test - "); + System.out.println(nativeServiceManager == null? "failed" : "successfull"); + + System.out.println("*******************************************************************"); + System.out.println(); + return nativeServiceManager != null; + } + + static public boolean test_loadNativeSimpleRegistry() + throws java.lang.Exception + { + boolean result = false; + System.out.println("*******************************************************************"); + System.out.println("Test: <<< load native SimpleRegistry >>>"); + if ( sharedLibraryLoader == null ) + if ( ! test_instantiateSharedLibraryLoader() ) + return false; + + System.err.println("- get factory of the Registry"); + XSingleServiceFactory aRegFac = + (XSingleServiceFactory) UnoRuntime.queryInterface( XSingleServiceFactory.class, + sharedLibraryLoader.activate(NATIVE_REGISTRY_IMP_NAME, null, NATIVE_REGISTRY_LIB_NAME, null) + ); + System.err.println("- instantiate the Registry"); + simpleRegistry = + (XSimpleRegistry) UnoRuntime.queryInterface( XSimpleRegistry.class, aRegFac.createInstance() ); + System.out.print("Test - "); + System.out.println(simpleRegistry == null? "failed" : "successfull"); + System.out.println("*******************************************************************"); + System.err.println(); + return true; + } + + static public boolean test_registerSharedLibraryLoader() + throws java.lang.Exception + { + boolean result = true; + System.out.println("*******************************************************************"); + System.out.println("Test: <<< register SharedLibraryLoader at the Registry >>>"); + + if ( simpleRegistry == null ) + if ( ! test_loadNativeSimpleRegistry() ) + return false; + + com.sun.star.registry.XRegistryKey regKey = simpleRegistry.getRootKey(); + result = SharedLibraryLoader.writeRegistryServiceInfo( null, regKey ); + + System.out.print("Test - "); + System.out.println( result==false ? "failed" : "successfull"); + System.out.println("*******************************************************************"); + System.out.println(); + return result; + } + + static public boolean test() throws java.lang.Exception { + boolean passed = true; + + System.err.println("SharedLibraryLoader - doing tests..."); + passed = test_getSharedLibraryLoaderFactory() && passed; + passed = test_instantiateSharedLibraryLoader() && passed; + passed = test_loadNativeServiceManager() && passed; + passed = test_loadNativeSimpleRegistry() && passed; + //passed = test_registerSharedLibraryLoader() && passed; + + System.err.println("SharedLibraryLoader test passed? " + passed); + + return passed; + } + + static public void main(String args[]) throws java.lang.Exception { + System.exit( test() == true ? 0: -1 ); + } +} + diff --git a/javaunohelper/test/com/sun/star/comp/helper/makefile.mk b/javaunohelper/test/com/sun/star/comp/helper/makefile.mk new file mode 100644 index 000000000000..96d2f1dd03ee --- /dev/null +++ b/javaunohelper/test/com/sun/star/comp/helper/makefile.mk @@ -0,0 +1,84 @@ +#************************************************************************* +# +# $RCSfile: makefile.mk,v $ +# +# $Revision: 1.1.1.1 $ +# +# last change: $Author: hr $ $Date: 2000-09-18 16:31:32 $ +# +# The Contents of this file are made available subject to the terms of +# either of the following licenses +# +# - GNU Lesser General Public License Version 2.1 +# - Sun Industry Standards Source License Version 1.1 +# +# Sun Microsystems Inc., October, 2000 +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2000 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library 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 for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +# +# Sun Industry Standards Source License Version 1.1 +# ================================================= +# The contents of this file are subject to the Sun Industry Standards +# Source License Version 1.1 (the "License"); You may not use this file +# except in compliance with the License. You may obtain a copy of the +# License at http://www.openoffice.org/license.html. +# +# Software provided under this License is provided on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, +# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. +# See the License for the specific provisions governing your rights and +# obligations concerning the Software. +# +# The Initial Developer of the Original Code is: Sun Microsystems, Inc. +# +# Copyright: 2000 by Sun Microsystems, Inc. +# +# All Rights Reserved. +# +# Contributor(s): _______________________________________ +# +# +# +#************************************************************************* + +PRJ =..$/..$/..$/..$/..$/.. +PRJNAME = juhelper +PACKAGE = com$/sun$/star$/comp$/helper +TARGET = com_sun_star_comp_helper_test + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk + +# --- Files -------------------------------------------------------- + +JARFILES = sandbox.jar jurt.jar unoil.jar + +JAVACLASSFILES= \ + $(CLASSDIR)$/$(PACKAGE)$/SharedLibraryLoader_Test.class \ + $(CLASSDIR)$/$(PACKAGE)$/RegistryServiceFactory_Test.class + +JAVAFILES= $(subst,$(CLASSDIR)$/$(PACKAGE)$/, $(subst,.class,.java $(JAVACLASSFILES))) + +# --- Targets ------------------------------------------------------ + +.INCLUDE : target.mk diff --git a/javaunohelper/util/makefile.mk b/javaunohelper/util/makefile.mk new file mode 100644 index 000000000000..41491764db75 --- /dev/null +++ b/javaunohelper/util/makefile.mk @@ -0,0 +1,80 @@ +#************************************************************************* +# +# $RCSfile: makefile.mk,v $ +# +# $Revision: 1.1.1.1 $ +# +# last change: $Author: hr $ $Date: 2000-09-18 16:31:32 $ +# +# The Contents of this file are made available subject to the terms of +# either of the following licenses +# +# - GNU Lesser General Public License Version 2.1 +# - Sun Industry Standards Source License Version 1.1 +# +# Sun Microsystems Inc., October, 2000 +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2000 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library 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 for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +# +# Sun Industry Standards Source License Version 1.1 +# ================================================= +# The contents of this file are subject to the Sun Industry Standards +# Source License Version 1.1 (the "License"); You may not use this file +# except in compliance with the License. You may obtain a copy of the +# License at http://www.openoffice.org/license.html. +# +# Software provided under this License is provided on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, +# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. +# See the License for the specific provisions governing your rights and +# obligations concerning the Software. +# +# The Initial Developer of the Original Code is: Sun Microsystems, Inc. +# +# Copyright: 2000 by Sun Microsystems, Inc. +# +# All Rights Reserved. +# +# Contributor(s): _______________________________________ +# +# +# +#************************************************************************* + +PRJ = .. +PRJNAME = juhelper +TARGET = juh + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk +.INCLUDE : $(PRJ)$/version.mk + +JARCLASSDIRS = com$/sun$/star$/comp$/helper +JARTARGET = $(TARGET).jar +JARCOMPRESS = TRUE + +# --- Targets ------------------------------------------------------ + +.INCLUDE : target.mk + + diff --git a/offuh/prj/d.lst b/offuh/prj/d.lst new file mode 100644 index 000000000000..449316d94f7e --- /dev/null +++ b/offuh/prj/d.lst @@ -0,0 +1,151 @@ +mkdir: %_DEST%\inc%_EXT%\com +mkdir: %_DEST%\inc%_EXT%\com\sun +mkdir: %_DEST%\inc%_EXT%\com\sun\star + +mkdir: %_DEST%\inc%_EXT%\com\sun\star\awt +mkdir: %_DEST%\inc%_EXT%\com\sun\star\beans +mkdir: %_DEST%\inc%_EXT%\com\sun\star\bridge +mkdir: %_DEST%\inc%_EXT%\com\sun\star\chaos +mkdir: %_DEST%\inc%_EXT%\com\sun\star\chart +mkdir: %_DEST%\inc%_EXT%\com\sun\star\container +mkdir: %_DEST%\inc%_EXT%\com\sun\star\connection +mkdir: %_DEST%\inc%_EXT%\com\sun\star\data +mkdir: %_DEST%\inc%_EXT%\com\sun\star\daemons +mkdir: %_DEST%\inc%_EXT%\com\sun\star\document +mkdir: %_DEST%\inc%_EXT%\com\sun\star\drawing +mkdir: %_DEST%\inc%_EXT%\com\sun\star\form +mkdir: %_DEST%\inc%_EXT%\com\sun\star\frame +mkdir: %_DEST%\inc%_EXT%\com\sun\star\installation +mkdir: %_DEST%\inc%_EXT%\com\sun\star\io +mkdir: %_DEST%\inc%_EXT%\com\sun\star\java +mkdir: %_DEST%\inc%_EXT%\com\sun\star\lang +mkdir: %_DEST%\inc%_EXT%\com\sun\star\linguistic +mkdir: %_DEST%\inc%_EXT%\com\sun\star\presentation +mkdir: %_DEST%\inc%_EXT%\com\sun\star\reflection +mkdir: %_DEST%\inc%_EXT%\com\sun\star\registry +mkdir: %_DEST%\inc%_EXT%\com\sun\star\sdb +mkdir: %_DEST%\inc%_EXT%\com\sun\star\sdbc +mkdir: %_DEST%\inc%_EXT%\com\sun\star\sdbcx +mkdir: %_DEST%\inc%_EXT%\com\sun\star\scanner +mkdir: %_DEST%\inc%_EXT%\com\sun\star\script +mkdir: %_DEST%\inc%_EXT%\com\sun\star\sheet +mkdir: %_DEST%\inc%_EXT%\com\sun\star\style +mkdir: %_DEST%\inc%_EXT%\com\sun\star\table +mkdir: %_DEST%\inc%_EXT%\com\sun\star\telephony +mkdir: %_DEST%\inc%_EXT%\com\sun\star\telephony\DIALER +mkdir: %_DEST%\inc%_EXT%\com\sun\star\text +mkdir: %_DEST%\inc%_EXT%\com\sun\star\uno +mkdir: %_DEST%\inc%_EXT%\com\sun\star\util +mkdir: %_DEST%\inc%_EXT%\com\sun\star\view +mkdir: %_DEST%\inc%_EXT%\com\sun\star\linguistic +mkdir: %_DEST%\inc%_EXT%\com\sun\star\xml +mkdir: %_DEST%\inc%_EXT%\com\sun\star\xml\sax +mkdir: %_DEST%\inc%_EXT%\com\sun\star\loader +mkdir: %_DEST%\inc%_EXT%\com\sun\star\task +mkdir: %_DEST%\inc%_EXT%\com\sun\star\ucb +mkdir: %_DEST%\inc%_EXT%\com\sun\star\plugin +mkdir: %_DEST%\inc%_EXT%\com\sun\star\setup +mkdir: %_DEST%\inc%_EXT%\com\sun\star\portal +mkdir: %_DEST%\inc%_EXT%\com\sun\star\portal\client +mkdir: %_DEST%\inc%_EXT%\com\sun\star\portal\daemons +mkdir: %_DEST%\inc%_EXT%\com\sun\star\portal\daemons\sadmind +mkdir: %_DEST%\inc%_EXT%\com\sun\star\portal\daemons\sofficed +mkdir: %_DEST%\inc%_EXT%\com\sun\star\portal\system +mkdir: %_DEST%\inc%_EXT%\com\sun\star\mozilla + +..\%__SRC%\inc\com\sun\star\awt\*.hdl %_DEST%\inc%_EXT%\com\sun\star\awt\*.hdl +..\%__SRC%\inc\com\sun\star\awt\*.hpp %_DEST%\inc%_EXT%\com\sun\star\awt\*.hpp +..\%__SRC%\inc\com\sun\star\beans\*.hdl %_DEST%\inc%_EXT%\com\sun\star\beans\*.hdl +..\%__SRC%\inc\com\sun\star\beans\*.hpp %_DEST%\inc%_EXT%\com\sun\star\beans\*.hpp +..\%__SRC%\inc\com\sun\star\bridge\*.hdl %_DEST%\inc%_EXT%\com\sun\star\bridge\*.hdl +..\%__SRC%\inc\com\sun\star\bridge\*.hpp %_DEST%\inc%_EXT%\com\sun\star\bridge\*.hpp +..\%__SRC%\inc\com\sun\star\chaos\*.hdl %_DEST%\inc%_EXT%\com\sun\star\chaos\*.hdl +..\%__SRC%\inc\com\sun\star\chaos\*.hpp %_DEST%\inc%_EXT%\com\sun\star\chaos\*.hpp +..\%__SRC%\inc\com\sun\star\chart\*.hdl %_DEST%\inc%_EXT%\com\sun\star\chart\*.hdl +..\%__SRC%\inc\com\sun\star\chart\*.hpp %_DEST%\inc%_EXT%\com\sun\star\chart\*.hpp +..\%__SRC%\inc\com\sun\star\container\*.hdl %_DEST%\inc%_EXT%\com\sun\star\container\*.hdl +..\%__SRC%\inc\com\sun\star\container\*.hpp %_DEST%\inc%_EXT%\com\sun\star\container\*.hpp +..\%__SRC%\inc\com\sun\star\connection\*.hdl %_DEST%\inc%_EXT%\com\sun\star\connection\*.hdl +..\%__SRC%\inc\com\sun\star\connection\*.hpp %_DEST%\inc%_EXT%\com\sun\star\connection\*.hpp +..\%__SRC%\inc\com\sun\star\data\*.hdl %_DEST%\inc%_EXT%\com\sun\star\data\*.hdl +..\%__SRC%\inc\com\sun\star\data\*.hpp %_DEST%\inc%_EXT%\com\sun\star\data\*.hpp +..\%__SRC%\inc\com\sun\star\daemons\*.hdl %_DEST%\inc%_EXT%\com\sun\star\daemons\*.hdl +..\%__SRC%\inc\com\sun\star\daemons\*.hpp %_DEST%\inc%_EXT%\com\sun\star\daemons\*.hpp +..\%__SRC%\inc\com\sun\star\document\*.hdl %_DEST%\inc%_EXT%\com\sun\star\document\*.hdl +..\%__SRC%\inc\com\sun\star\document\*.hpp %_DEST%\inc%_EXT%\com\sun\star\document\*.hpp +..\%__SRC%\inc\com\sun\star\drawing\*.hdl %_DEST%\inc%_EXT%\com\sun\star\drawing\*.hdl +..\%__SRC%\inc\com\sun\star\drawing\*.hpp %_DEST%\inc%_EXT%\com\sun\star\drawing\*.hpp +..\%__SRC%\inc\com\sun\star\form\*.hdl %_DEST%\inc%_EXT%\com\sun\star\form\*.hdl +..\%__SRC%\inc\com\sun\star\form\*.hpp %_DEST%\inc%_EXT%\com\sun\star\form\*.hpp +..\%__SRC%\inc\com\sun\star\frame\*.hdl %_DEST%\inc%_EXT%\com\sun\star\frame\*.hdl +..\%__SRC%\inc\com\sun\star\frame\*.hpp %_DEST%\inc%_EXT%\com\sun\star\frame\*.hpp +..\%__SRC%\inc\com\sun\star\installation\*.hdl %_DEST%\inc%_EXT%\com\sun\star\installation\*.hdl +..\%__SRC%\inc\com\sun\star\installation\*.hpp %_DEST%\inc%_EXT%\com\sun\star\installation\*.hpp +..\%__SRC%\inc\com\sun\star\io\*.hdl %_DEST%\inc%_EXT%\com\sun\star\io\*.hdl +..\%__SRC%\inc\com\sun\star\io\*.hpp %_DEST%\inc%_EXT%\com\sun\star\io\*.hpp +..\%__SRC%\inc\com\sun\star\java\*.hdl %_DEST%\inc%_EXT%\com\sun\star\java\*.hdl +..\%__SRC%\inc\com\sun\star\java\*.hpp %_DEST%\inc%_EXT%\com\sun\star\java\*.hpp +..\%__SRC%\inc\com\sun\star\lang\*.hdl %_DEST%\inc%_EXT%\com\sun\star\lang\*.hdl +..\%__SRC%\inc\com\sun\star\lang\*.hpp %_DEST%\inc%_EXT%\com\sun\star\lang\*.hpp +..\%__SRC%\inc\com\sun\star\linguistic\*.hdl %_DEST%\inc%_EXT%\com\sun\star\linguistic\*.hdl +..\%__SRC%\inc\com\sun\star\linguistic\*.hpp %_DEST%\inc%_EXT%\com\sun\star\linguistic\*.hpp +..\%__SRC%\inc\com\sun\star\presentation\*.hdl %_DEST%\inc%_EXT%\com\sun\star\presentation\*.hdl +..\%__SRC%\inc\com\sun\star\presentation\*.hpp %_DEST%\inc%_EXT%\com\sun\star\presentation\*.hpp +..\%__SRC%\inc\com\sun\star\reflection\*.hdl %_DEST%\inc%_EXT%\com\sun\star\reflection\*.hdl +..\%__SRC%\inc\com\sun\star\reflection\*.hpp %_DEST%\inc%_EXT%\com\sun\star\reflection\*.hpp +..\%__SRC%\inc\com\sun\star\registry\*.hpp %_DEST%\inc%_EXT%\com\sun\star\registry\*.hpp +..\%__SRC%\inc\com\sun\star\registry\*.hdl %_DEST%\inc%_EXT%\com\sun\star\registry\*.hdl +..\%__SRC%\inc\com\sun\star\sdb\*.hdl %_DEST%\inc%_EXT%\com\sun\star\sdb\*.hdl +..\%__SRC%\inc\com\sun\star\sdb\*.hpp %_DEST%\inc%_EXT%\com\sun\star\sdb\*.hpp +..\%__SRC%\inc\com\sun\star\sdbc\*.hdl %_DEST%\inc%_EXT%\com\sun\star\sdbc\*.hdl +..\%__SRC%\inc\com\sun\star\sdbc\*.hpp %_DEST%\inc%_EXT%\com\sun\star\sdbc\*.hpp +..\%__SRC%\inc\com\sun\star\sdbcx\*.hdl %_DEST%\inc%_EXT%\com\sun\star\sdbcx\*.hdl +..\%__SRC%\inc\com\sun\star\sdbcx\*.hpp %_DEST%\inc%_EXT%\com\sun\star\sdbcx\*.hpp +..\%__SRC%\inc\com\sun\star\scanner\*.hdl %_DEST%\inc%_EXT%\com\sun\star\scanner\*.hdl +..\%__SRC%\inc\com\sun\star\scanner\*.hpp %_DEST%\inc%_EXT%\com\sun\star\scanner\*.hpp +..\%__SRC%\inc\com\sun\star\script\*.hdl %_DEST%\inc%_EXT%\com\sun\star\script\*.hdl +..\%__SRC%\inc\com\sun\star\script\*.hpp %_DEST%\inc%_EXT%\com\sun\star\script\*.hpp +..\%__SRC%\inc\com\sun\star\sheet\*.hdl %_DEST%\inc%_EXT%\com\sun\star\sheet\*.hdl +..\%__SRC%\inc\com\sun\star\sheet\*.hpp %_DEST%\inc%_EXT%\com\sun\star\sheet\*.hpp +..\%__SRC%\inc\com\sun\star\style\*.hdl %_DEST%\inc%_EXT%\com\sun\star\style\*.hdl +..\%__SRC%\inc\com\sun\star\style\*.hpp %_DEST%\inc%_EXT%\com\sun\star\style\*.hpp +..\%__SRC%\inc\com\sun\star\table\*.hdl %_DEST%\inc%_EXT%\com\sun\star\table\*.hdl +..\%__SRC%\inc\com\sun\star\table\*.hpp %_DEST%\inc%_EXT%\com\sun\star\table\*.hpp +..\%__SRC%\inc\com\sun\star\telephony\*.hdl %_DEST%\inc%_EXT%\com\sun\star\telephony\*.hdl +..\%__SRC%\inc\com\sun\star\telephony\*.hpp %_DEST%\inc%_EXT%\com\sun\star\telephony\*.hpp +..\%__SRC%\inc\com\sun\star\telephony\DIALER\*.hdl %_DEST%\inc%_EXT%\com\sun\star\telephony\DIALER\*.hdl +..\%__SRC%\inc\com\sun\star\telephony\DIALER\*.hpp %_DEST%\inc%_EXT%\com\sun\star\telephony\DIALER\*.hpp +..\%__SRC%\inc\com\sun\star\text\*.hdl %_DEST%\inc%_EXT%\com\sun\star\text\*.hdl +..\%__SRC%\inc\com\sun\star\text\*.hpp %_DEST%\inc%_EXT%\com\sun\star\text\*.hpp +..\%__SRC%\inc\com\sun\star\uno\*.hdl %_DEST%\inc%_EXT%\com\sun\star\uno\*.hdl +..\%__SRC%\inc\com\sun\star\uno\*.hpp %_DEST%\inc%_EXT%\com\sun\star\uno\*.hpp +..\%__SRC%\inc\com\sun\star\util\*.hdl %_DEST%\inc%_EXT%\com\sun\star\util\*.hdl +..\%__SRC%\inc\com\sun\star\util\*.hpp %_DEST%\inc%_EXT%\com\sun\star\util\*.hpp +..\%__SRC%\inc\com\sun\star\view\*.hdl %_DEST%\inc%_EXT%\com\sun\star\view\*.hdl +..\%__SRC%\inc\com\sun\star\view\*.hpp %_DEST%\inc%_EXT%\com\sun\star\view\*.hpp +..\%__SRC%\inc\com\sun\star\linguistic\*.hdl %_DEST%\inc%_EXT%\com\sun\star\linguistic\*.hdl +..\%__SRC%\inc\com\sun\star\linguistic\*.hpp %_DEST%\inc%_EXT%\com\sun\star\linguistic\*.hpp +..\%__SRC%\inc\com\sun\star\xml\*.hdl %_DEST%\inc%_EXT%\com\sun\star\xml\*.hdl +..\%__SRC%\inc\com\sun\star\xml\*.hpp %_DEST%\inc%_EXT%\com\sun\star\xml\*.hpp +..\%__SRC%\inc\com\sun\star\xml\sax\*.hdl %_DEST%\inc%_EXT%\com\sun\star\xml\sax\*.hdl +..\%__SRC%\inc\com\sun\star\xml\sax\*.hpp %_DEST%\inc%_EXT%\com\sun\star\xml\sax\*.hpp +..\%__SRC%\inc\com\sun\star\loader\*.hdl %_DEST%\inc%_EXT%\com\sun\star\loader\*.hdl +..\%__SRC%\inc\com\sun\star\loader\*.hpp %_DEST%\inc%_EXT%\com\sun\star\loader\*.hpp +..\%__SRC%\inc\com\sun\star\task\*.hdl %_DEST%\inc%_EXT%\com\sun\star\task\*.hdl +..\%__SRC%\inc\com\sun\star\task\*.hpp %_DEST%\inc%_EXT%\com\sun\star\task\*.hpp +..\%__SRC%\inc\com\sun\star\ucb\*.hpp %_DEST%\inc%_EXT%\com\sun\star\ucb\*.hpp +..\%__SRC%\inc\com\sun\star\ucb\*.hdl %_DEST%\inc%_EXT%\com\sun\star\ucb\*.hdl +..\%__SRC%\inc\com\sun\star\plugin\*.hpp %_DEST%\inc%_EXT%\com\sun\star\plugin\*.hpp +..\%__SRC%\inc\com\sun\star\plugin\*.hdl %_DEST%\inc%_EXT%\com\sun\star\plugin\*.hdl +..\%__SRC%\inc\com\sun\star\setup\*.hpp %_DEST%\inc%_EXT%\com\sun\star\setup\*.hpp +..\%__SRC%\inc\com\sun\star\setup\*.hdl %_DEST%\inc%_EXT%\com\sun\star\setup\*.hdl +..\%__SRC%\inc\com\sun\star\portal\client\*.hpp %_DEST%\inc%_EXT%\com\sun\star\portal\client\*.hpp +..\%__SRC%\inc\com\sun\star\portal\client\*.hdl %_DEST%\inc%_EXT%\com\sun\star\portal\client\*.hdl +..\%__SRC%\inc\com\sun\star\portal\daemons\sadmind\*.hpp %_DEST%\inc%_EXT%\com\sun\star\portal\daemons\sadmind\*.hpp +..\%__SRC%\inc\com\sun\star\portal\daemons\sadmind\*.hdl %_DEST%\inc%_EXT%\com\sun\star\portal\daemons\sadmind\*.hdl +..\%__SRC%\inc\com\sun\star\portal\daemons\sofficed\*.hpp %_DEST%\inc%_EXT%\com\sun\star\portal\daemons\sofficed\*.hpp +..\%__SRC%\inc\com\sun\star\portal\daemons\sofficed\*.hdl %_DEST%\inc%_EXT%\com\sun\star\portal\daemons\sofficed\*.hdl +..\%__SRC%\inc\com\sun\star\portal\system\*.hpp %_DEST%\inc%_EXT%\com\sun\star\portal\system\*.hpp +..\%__SRC%\inc\com\sun\star\portal\system\*.hdl %_DEST%\inc%_EXT%\com\sun\star\portal\system\*.hdl +..\%__SRC%\inc\com\sun\star\mozilla\*.hpp %_DEST%\inc%_EXT%\com\sun\star\mozilla\*.hpp +..\%__SRC%\inc\com\sun\star\mozilla\*.hdl %_DEST%\inc%_EXT%\com\sun\star\mozilla\*.hdl diff --git a/offuh/source/makefile.mk b/offuh/source/makefile.mk new file mode 100644 index 000000000000..3dc16424ee68 --- /dev/null +++ b/offuh/source/makefile.mk @@ -0,0 +1,82 @@ +#************************************************************************* +# +# $RCSfile: makefile.mk,v $ +# +# $Revision: 1.1.1.1 $ +# +# last change: $Author: hr $ $Date: 2000-09-18 16:33:13 $ +# +# The Contents of this file are made available subject to the terms of +# either of the following licenses +# +# - GNU Lesser General Public License Version 2.1 +# - Sun Industry Standards Source License Version 1.1 +# +# Sun Microsystems Inc., October, 2000 +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2000 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library 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 for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +# +# Sun Industry Standards Source License Version 1.1 +# ================================================= +# The contents of this file are subject to the Sun Industry Standards +# Source License Version 1.1 (the "License"); You may not use this file +# except in compliance with the License. You may obtain a copy of the +# License at http://www.openoffice.org/license.html. +# +# Software provided under this License is provided on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, +# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. +# See the License for the specific provisions governing your rights and +# obligations concerning the Software. +# +# The Initial Developer of the Original Code is: Sun Microsystems, Inc. +# +# Copyright: 2000 by Sun Microsystems, Inc. +# +# All Rights Reserved. +# +# Contributor(s): _______________________________________ +# +# +# +#************************************************************************* +PRJ=.. + +PRJNAME= offuh +TARGET= offuh + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk + +# ------------------------------------------------------------------ + +UNOUCRRDB= $(SOLARBINDIR)$/applicat.rdb +UNOUCROUT= $(OUT)$/inc + +$(MISC)$/$(TARGET).don : $(UNOUCRRDB) + @+-$(RM) $@ >& $(NULLDEV) + +cppumaker $(CPPUMAKERFLAGS) -B$(UNOUCRBASE) -O$(UNOUCROUT) $(UNOUCRRDB) && echo > $@ + +# --- Targets ------------------------------------------------------ + +.INCLUDE : target.mk |