summaryrefslogtreecommitdiff
path: root/package/source
diff options
context:
space:
mode:
Diffstat (limited to 'package/source')
-rw-r--r--package/source/manifest/UnoRegister.cxx63
-rw-r--r--package/source/xstor/makefile.mk8
-rw-r--r--package/source/xstor/register.cxx28
-rw-r--r--package/source/xstor/xstor.component35
-rw-r--r--package/source/xstor/xstor.dxp1
5 files changed, 43 insertions, 92 deletions
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