diff options
Diffstat (limited to 'package')
-rw-r--r-- | package/prj/d.lst | 2 | ||||
-rw-r--r-- | package/source/manifest/UnoRegister.cxx | 63 | ||||
-rw-r--r-- | package/source/xstor/makefile.mk | 8 | ||||
-rw-r--r-- | package/source/xstor/register.cxx | 28 | ||||
-rw-r--r-- | package/source/xstor/xstor.component | 35 | ||||
-rw-r--r-- | package/source/xstor/xstor.dxp | 1 | ||||
-rw-r--r-- | package/util/exports.dxp | 1 | ||||
-rw-r--r-- | package/util/makefile.mk | 8 | ||||
-rw-r--r-- | package/util/package2.component | 44 |
9 files changed, 97 insertions, 93 deletions
diff --git a/package/prj/d.lst b/package/prj/d.lst index 23966d0cfeae..919a1719aa09 100644 --- a/package/prj/d.lst +++ b/package/prj/d.lst @@ -3,3 +3,5 @@ ..\%__SRC%\lib\lib*.so %_DEST%\lib%_EXT%\lib*.so ..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib ..\dtd\*.dtd %_DEST%\bin%_EXT%\*.* +..\%__SRC%\misc\package2.component %_DEST%\xml%_EXT%\package2.component +..\%__SRC%\misc\xstor.component %_DEST%\xml%_EXT%\xstor.component diff --git a/package/source/manifest/UnoRegister.cxx b/package/source/manifest/UnoRegister.cxx index 2405495f321f..34dd874206e1 100644 --- a/package/source/manifest/UnoRegister.cxx +++ b/package/source/manifest/UnoRegister.cxx @@ -46,43 +46,6 @@ using namespace ::com::sun::star::registry; using namespace ::com::sun::star::packages; using namespace ::com::sun::star::packages::manifest; -static sal_Bool writeInfo( void * pRegistryKey, - const OUString & rImplementationName, - Sequence< OUString > const & rServiceNames ) -{ - OUString aKeyName( OUString::createFromAscii( "/" ) ); - aKeyName += rImplementationName; - aKeyName += OUString::createFromAscii( "/UNO/SERVICES" ); - - Reference< XRegistryKey > xKey; - try - { - xKey = static_cast< XRegistryKey * >( - pRegistryKey )->createKey( aKeyName ); - } - catch ( InvalidRegistryException const & ) - { - } - - if ( !xKey.is() ) - return sal_False; - - sal_Bool bSuccess = sal_True; - - for ( sal_Int32 n = 0; n < rServiceNames.getLength(); ++n ) - { - try - { - xKey->createKey( rServiceNames[ n ] ); - } - catch ( InvalidRegistryException const & ) - { - bSuccess = sal_False; - break; - } - } - return bSuccess; -} // C functions to implement this as a component extern "C" void SAL_CALL component_getImplementationEnvironment( @@ -92,32 +55,6 @@ extern "C" void SAL_CALL component_getImplementationEnvironment( } /** - * This function creates an implementation section in the registry and another subkey - * for each supported service. - * @param pServiceManager generic uno interface providing a service manager - * @param pRegistryKey generic uno interface providing registry key to write - */ -extern "C" sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, void* pRegistryKey ) -{ - return pRegistryKey && - writeInfo (pRegistryKey, - ManifestReader::static_getImplementationName(), - ManifestReader::static_getSupportedServiceNames() ) && - writeInfo (pRegistryKey, - ManifestWriter::static_getImplementationName(), - ManifestWriter::static_getSupportedServiceNames() ) && - writeInfo (pRegistryKey, - ZipPackage::static_getImplementationName(), - ZipPackage::static_getSupportedServiceNames() ) && - - writeInfo (pRegistryKey, - OZipFileAccess::impl_staticGetImplementationName(), - OZipFileAccess::impl_staticGetSupportedServiceNames() ); - -} - - -/** * This function is called to get service factories for an implementation. * @param pImplName name of implementation * @param pServiceManager generic uno interface providing a service manager to instantiate components diff --git a/package/source/xstor/makefile.mk b/package/source/xstor/makefile.mk index 76494cb7dbe7..5c381ba4c803 100644 --- a/package/source/xstor/makefile.mk +++ b/package/source/xstor/makefile.mk @@ -73,3 +73,11 @@ DEF1EXPORTFILE=$(SHL1TARGET).dxp .INCLUDE : target.mk + +ALLTAR : $(MISC)/xstor.component + +$(MISC)/xstor.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + xstor.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt xstor.component diff --git a/package/source/xstor/register.cxx b/package/source/xstor/register.cxx index 1e3ae15fe383..808788345bfc 100644 --- a/package/source/xstor/register.cxx +++ b/package/source/xstor/register.cxx @@ -69,33 +69,5 @@ void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServic return pRet; } -sal_Bool SAL_CALL component_writeInfo( void * /*pServiceManager*/, void * pRegistryKey ) -{ - if (pRegistryKey) - { - try - { - uno::Reference< registry::XRegistryKey > xKey( reinterpret_cast< registry::XRegistryKey* >( pRegistryKey ) ); - - uno::Reference< registry::XRegistryKey > xNewKey; - - xNewKey = xKey->createKey( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) + - OStorageFactory::impl_staticGetImplementationName() + - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") ) ); - - const uno::Sequence< ::rtl::OUString > aServices = OStorageFactory::impl_staticGetSupportedServiceNames(); - for( sal_Int32 ind = 0; ind < aServices.getLength(); ind++ ) - xNewKey->createKey( aServices.getConstArray()[ind] ); - - return sal_True; - } - catch (registry::InvalidRegistryException &) - { - OSL_ENSURE( sal_False, "### InvalidRegistryException!" ); - } - } - return sal_False; -} - } // extern "C" diff --git a/package/source/xstor/xstor.component b/package/source/xstor/xstor.component new file mode 100644 index 000000000000..f338d6a546cb --- /dev/null +++ b/package/source/xstor/xstor.component @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* 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. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.SharedLibrary" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.comp.embed.StorageFactory"> + <service name="com.sun.star.comp.embed.StorageFactory"/> + <service name="com.sun.star.embed.StorageFactory"/> + </implementation> +</component> diff --git a/package/source/xstor/xstor.dxp b/package/source/xstor/xstor.dxp index 9630d7e06768..f0e1c69934bc 100644 --- a/package/source/xstor/xstor.dxp +++ b/package/source/xstor/xstor.dxp @@ -1,3 +1,2 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory diff --git a/package/util/exports.dxp b/package/util/exports.dxp index 9630d7e06768..f0e1c69934bc 100644 --- a/package/util/exports.dxp +++ b/package/util/exports.dxp @@ -1,3 +1,2 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory diff --git a/package/util/makefile.mk b/package/util/makefile.mk index 20732c102007..344b2cf1346f 100644 --- a/package/util/makefile.mk +++ b/package/util/makefile.mk @@ -75,3 +75,11 @@ DEF1NAME=$(SHL1TARGET) .INCLUDE : target.mk + +ALLTAR : $(MISC)/package2.component + +$(MISC)/package2.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + package2.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt package2.component diff --git a/package/util/package2.component b/package/util/package2.component new file mode 100644 index 000000000000..cdfa842d0db6 --- /dev/null +++ b/package/util/package2.component @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* 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. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.SharedLibrary" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.comp.package.zip.ZipFileAccess"> + <service name="com.sun.star.comp.packages.zip.ZipFileAccess"/> + <service name="com.sun.star.packages.zip.ZipFileAccess"/> + </implementation> + <implementation name="com.sun.star.packages.comp.ZipPackage"> + <service name="com.sun.star.packages.Package"/> + </implementation> + <implementation name="com.sun.star.packages.manifest.comp.ManifestReader"> + <service name="com.sun.star.packages.manifest.ManifestReader"/> + </implementation> + <implementation name="com.sun.star.packages.manifest.comp.ManifestWriter"> + <service name="com.sun.star.packages.manifest.ManifestWriter"/> + </implementation> +</component> |