summaryrefslogtreecommitdiff
path: root/extensions/source/resource
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/source/resource')
-rw-r--r--extensions/source/resource/exports.dxp1
-rw-r--r--extensions/source/resource/makefile.mk8
-rw-r--r--extensions/source/resource/res.component38
-rw-r--r--extensions/source/resource/res_services.cxx42
4 files changed, 46 insertions, 43 deletions
diff --git a/extensions/source/resource/exports.dxp b/extensions/source/resource/exports.dxp
index 9e59e94034a6..f0e1c69934bc 100644
--- a/extensions/source/resource/exports.dxp
+++ b/extensions/source/resource/exports.dxp
@@ -1,3 +1,2 @@
-component_writeInfo
component_getImplementationEnvironment
component_getFactory
diff --git a/extensions/source/resource/makefile.mk b/extensions/source/resource/makefile.mk
index a89d690b7393..adeec5fd09dc 100644
--- a/extensions/source/resource/makefile.mk
+++ b/extensions/source/resource/makefile.mk
@@ -74,3 +74,11 @@ DEF1EXPORTFILE= exports.dxp
.INCLUDE : target.mk
.INCLUDE : $(PRJ)$/util$/target.pmk
+
+ALLTAR : $(MISC)/res.component
+
+$(MISC)/res.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ res.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt res.component
diff --git a/extensions/source/resource/res.component b/extensions/source/resource/res.component
new file mode 100644
index 000000000000..57f96609d5df
--- /dev/null
+++ b/extensions/source/resource/res.component
@@ -0,0 +1,38 @@
+<?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.extensions.ResourceService">
+ <service name="com.sun.star.resource.VclStringResourceLoader"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.resource.OpenOfficeResourceLoader">
+ <service name="com.sun.star.resource.OfficeResourceLoader"/>
+ <singleton name="com.sun.star.resource.OfficeResourceLoader"/>
+ </implementation>
+</component>
diff --git a/extensions/source/resource/res_services.cxx b/extensions/source/resource/res_services.cxx
index 6babbe48e8cd..7bdc684294ea 100644
--- a/extensions/source/resource/res_services.cxx
+++ b/extensions/source/resource/res_services.cxx
@@ -29,12 +29,7 @@
#include "precompiled_extensions.hxx"
#include "res_services.hxx"
-/** === begin UNO includes === **/
-#include <com/sun/star/registry/XRegistryKey.hpp>
-/** === end UNO includes === **/
-
/** === begin UNO using === **/
-using ::com::sun::star::registry::XRegistryKey;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::uno::Exception;
@@ -64,43 +59,6 @@ void SAL_CALL component_getImplementationEnvironment(
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
-sal_Bool SAL_CALL component_writeInfo( void * /*pServiceManager*/, XRegistryKey * pRegistryKey )
-{
- try
- {
- ::std::vector< ::res::ComponentInfo > aComponentInfos( ::res::getComponentInfos() );
- for ( ::std::vector< ::res::ComponentInfo >::const_iterator loop = aComponentInfos.begin();
- loop != aComponentInfos.end();
- ++loop
- )
- {
- Reference< XRegistryKey > xNewKey =
- pRegistryKey->createKey( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/") )
- + loop->sImplementationName + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES" ) ) );
-
- for( sal_Int32 i = 0; i < loop->aSupportedServices.getLength(); ++i )
- xNewKey->createKey( loop->aSupportedServices.getConstArray()[i]);
-
- if ( loop->sSingletonName.getLength() )
- {
- OSL_ENSURE( loop->aSupportedServices.getLength() == 1, "singletons must support exactly one service!" );
- xNewKey = pRegistryKey->createKey( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/") )
- + loop->sImplementationName + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SINGLETONS/" ) )
- + loop->sSingletonName );
- xNewKey->setStringValue( loop->aSupportedServices[ 0 ] );
- }
- }
-
- return sal_True;
- }
- catch (Exception &)
- {
- // not allowed to throw an exception over the c function.
- //OSL_ENSURE( sal_False, "Exception cannot register component!" );
- return sal_False;
- }
-}
-
void * SAL_CALL component_getFactory(
const sal_Char * pImplName, XMultiServiceFactory * /*pServiceManager*/, void * /*pRegistryKey*/ )
{