summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorsb <sb@openoffice.org>2010-09-10 13:10:07 +0200
committersb <sb@openoffice.org>2010-09-10 13:10:07 +0200
commita43f7851c7d3424e845eedffe8ef25c6e9e8fe99 (patch)
tree6f9d6b8b67bc97841060cdeadfd516024a5f8720 /sc
parent0badf8094b28ceb44f2e65787eed93982fe0c0ea (diff)
sb129: #i113189# change UNO components to use passive registration
Diffstat (limited to 'sc')
-rw-r--r--sc/prj/d.lst3
-rw-r--r--sc/source/ui/unoobj/appluno.cxx120
-rw-r--r--sc/source/ui/unoobj/detreg.cxx21
-rw-r--r--sc/source/ui/vba/service.cxx35
-rw-r--r--sc/util/makefile.mk20
-rw-r--r--sc/util/sc.component97
-rw-r--r--sc/util/scd.component34
-rw-r--r--sc/util/vbaobj.component58
8 files changed, 212 insertions, 176 deletions
diff --git a/sc/prj/d.lst b/sc/prj/d.lst
index 6f4e95203bed..a0d4c1290bf9 100644
--- a/sc/prj/d.lst
+++ b/sc/prj/d.lst
@@ -32,3 +32,6 @@ mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\scalc\statusbar
..\uiconfig\scalc\statusbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\scalc\statusbar\*.xml
..\%__SRC%\bin\*-layout.zip %_DEST%\pck%_EXT%\*.*
+..\%__SRC%\misc\sc.component %_DEST%\xml%_EXT%\sc.component
+..\%__SRC%\misc\scd.component %_DEST%\xml%_EXT%\scd.component
+..\%__SRC%\misc\vbaobj.component %_DEST%\xml%_EXT%\vbaobj.component
diff --git a/sc/source/ui/unoobj/appluno.cxx b/sc/source/ui/unoobj/appluno.cxx
index 8b20d9849f47..437c220ba1c3 100644
--- a/sc/source/ui/unoobj/appluno.cxx
+++ b/sc/source/ui/unoobj/appluno.cxx
@@ -184,21 +184,6 @@ SC_SIMPLE_SERVICE_INFO( ScSpreadsheetSettings, "ScSpreadsheetSettings", SCSPREAD
//------------------------------------------------------------------------
-static void lcl_WriteInfo( registry::XRegistryKey* pRegistryKey,
- const rtl::OUString& rImplementationName,
- const uno::Sequence< rtl::OUString >& rServices )
- throw( registry::InvalidRegistryException )
-{
- rtl::OUString aImpl(rtl::OUString::createFromAscii( "/" ));
- aImpl += rImplementationName;
- aImpl += rtl::OUString::createFromAscii( "/UNO/SERVICES" );
- uno::Reference<registry::XRegistryKey> xNewKey(pRegistryKey->createKey(aImpl));
-
- const rtl::OUString* pArray = rServices.getConstArray();
- for( sal_Int32 i = 0; i < rServices.getLength(); i++ )
- xNewKey->createKey( pArray[i]);
-}
-
extern "C" {
SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
@@ -207,111 +192,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
-SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(
- void * /* pServiceManager */, registry::XRegistryKey * pRegistryKey )
-{
- if (pRegistryKey)
- {
- try
- {
- lcl_WriteInfo( pRegistryKey,
- ScSpreadsheetSettings::getImplementationName_Static(),
- ScSpreadsheetSettings::getSupportedServiceNames_Static() );
-
- lcl_WriteInfo( pRegistryKey,
- ScRecentFunctionsObj::getImplementationName_Static(),
- ScRecentFunctionsObj::getSupportedServiceNames_Static() );
-
- lcl_WriteInfo( pRegistryKey,
- ScFunctionListObj::getImplementationName_Static(),
- ScFunctionListObj::getSupportedServiceNames_Static() );
-
- lcl_WriteInfo( pRegistryKey,
- ScAutoFormatsObj::getImplementationName_Static(),
- ScAutoFormatsObj::getSupportedServiceNames_Static() );
-
- lcl_WriteInfo( pRegistryKey,
- ScFunctionAccess::getImplementationName_Static(),
- ScFunctionAccess::getSupportedServiceNames_Static() );
-
- lcl_WriteInfo( pRegistryKey,
- ScFilterOptionsObj::getImplementationName_Static(),
- ScFilterOptionsObj::getSupportedServiceNames_Static() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLImport_getImplementationName(),
- ScXMLImport_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLImport_Meta_getImplementationName(),
- ScXMLImport_Meta_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLImport_Styles_getImplementationName(),
- ScXMLImport_Styles_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLImport_Content_getImplementationName(),
- ScXMLImport_Content_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLImport_Settings_getImplementationName(),
- ScXMLImport_Settings_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLOOoExport_getImplementationName(),
- ScXMLOOoExport_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLOOoExport_Meta_getImplementationName(),
- ScXMLOOoExport_Meta_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLOOoExport_Styles_getImplementationName(),
- ScXMLOOoExport_Styles_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLOOoExport_Content_getImplementationName(),
- ScXMLOOoExport_Content_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLOOoExport_Settings_getImplementationName(),
- ScXMLOOoExport_Settings_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLOasisExport_getImplementationName(),
- ScXMLOasisExport_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLOasisExport_Meta_getImplementationName(),
- ScXMLOasisExport_Meta_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLOasisExport_Styles_getImplementationName(),
- ScXMLOasisExport_Styles_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLOasisExport_Content_getImplementationName(),
- ScXMLOasisExport_Content_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScXMLOasisExport_Settings_getImplementationName(),
- ScXMLOasisExport_Settings_getSupportedServiceNames() );
-
- lcl_WriteInfo( pRegistryKey,
- ScDocument_getImplementationName(),
- ScDocument_getSupportedServiceNames() );
-
- return sal_True;
- }
- catch (registry::InvalidRegistryException&)
- {
- OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
- }
- }
- return sal_False;
-}
-
SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * /* pRegistryKey */ )
{
diff --git a/sc/source/ui/unoobj/detreg.cxx b/sc/source/ui/unoobj/detreg.cxx
index 498d0fc886ec..e1e77e5deac9 100644
--- a/sc/source/ui/unoobj/detreg.cxx
+++ b/sc/source/ui/unoobj/detreg.cxx
@@ -49,27 +49,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
*ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ;
}
-SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( void* /* pServiceManager */ ,
- void* pRegistryKey )
-{
- Reference< ::registry::XRegistryKey >
- xKey( reinterpret_cast< ::registry::XRegistryKey* >( pRegistryKey ) ) ;
-
- OUString aDelimiter( RTL_CONSTASCII_USTRINGPARAM("/") );
- OUString aUnoServices( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") );
-
- // Eigentliche Implementierung und ihre Services registrieren
- sal_Int32 i;
- Reference< ::registry::XRegistryKey > xNewKey(xKey->createKey( aDelimiter + ScFilterDetect::impl_getStaticImplementationName() +
- aUnoServices ));
-
- Sequence< OUString > aServices(ScFilterDetect::impl_getStaticSupportedServiceNames());
- for(i = 0; i < aServices.getLength(); i++ )
- xNewKey->createKey( aServices.getConstArray()[i] );
-
- return sal_True;
-}
-
SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName,
void* pServiceManager,
void* /* pRegistryKey */ )
diff --git a/sc/source/ui/vba/service.cxx b/sc/source/ui/vba/service.cxx
index 2b1f14cf154a..7e986338e7d1 100644
--- a/sc/source/ui/vba/service.cxx
+++ b/sc/source/ui/vba/service.cxx
@@ -84,41 +84,6 @@ extern "C"
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
- SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(
- lang::XMultiServiceFactory * pServiceManager, registry::XRegistryKey * pRegistryKey )
- {
- OSL_TRACE("In component_writeInfo");
-#if 0
- // Component registration
- if ( component_writeInfoHelper( pServiceManager, pRegistryKey,
- range::serviceDecl, workbook::serviceDecl, worksheet::serviceDecl, globals::serviceDecl, window::serviceDecl, hyperlink::serviceDecl, application::serviceDecl ) && component_writeInfoHelper( pServiceManager, pRegistryKey, vbaeventshelper::serviceDecl ) )
- {
- // Singleton registration
- try
- {
- registry::XRegistryKey * pKey =
- reinterpret_cast< registry::XRegistryKey * >(pRegistryKey);
-
- Reference< registry::XRegistryKey >xKey = pKey->createKey(
- rtl::OUString::createFromAscii( ("ooo.vba.Globals/UNO/SINGLETONS/ooo.vba.theGlobals") ) );
- xKey->setStringValue( ::rtl::OUString::createFromAscii(
- ("ooo.vba.Globals") ) );
- return sal_True;
- }
- catch( uno::Exception& /*e*/ )
- {
- //recomp & friends will detect false returned and fail
- }
- }
- return sal_False;
-#else
- // Component registration
- return component_writeInfoHelper( pServiceManager, pRegistryKey,
- range::serviceDecl, workbook::serviceDecl, worksheet::serviceDecl, globals::serviceDecl, window::serviceDecl, hyperlink::serviceDecl, application::serviceDecl ) && component_writeInfoHelper( pServiceManager, pRegistryKey, vbaeventshelper::serviceDecl, textframe::serviceDecl );
-#endif
-
- }
-
SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
const sal_Char * pImplName, lang::XMultiServiceFactory * pServiceManager,
registry::XRegistryKey * pRegistryKey )
diff --git a/sc/util/makefile.mk b/sc/util/makefile.mk
index 980d271ae7c0..09578f6ef6a8 100644
--- a/sc/util/makefile.mk
+++ b/sc/util/makefile.mk
@@ -342,3 +342,23 @@ ALLTAR: $(MISC)$/linkinc.ls $(COMP)
build_extn : $(SHL9TARGETN)
$(PERL) createExtPackage.pl $(COMMONBIN)$/vbaapi.oxt $(SOLARBINDIR)$/oovbaapi.rdb $(LIBCOMPNAME)
+
+ALLTAR : $(MISC)/sc.component $(MISC)/scd.component $(MISC)/vbaobj.component
+
+$(MISC)/sc.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ sc.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt sc.component
+
+$(MISC)/scd.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ scd.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL2TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt scd.component
+
+$(MISC)/vbaobj.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ vbaobj.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL9TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt vbaobj.component
diff --git a/sc/util/sc.component b/sc/util/sc.component
new file mode 100644
index 000000000000..abd05aa579f2
--- /dev/null
+++ b/sc/util/sc.component
@@ -0,0 +1,97 @@
+<?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.Calc.FilterOptionsDialog">
+ <service name="com.sun.star.ui.dialogs.FilterOptionsDialog"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Calc.SpreadsheetDocument">
+ <service name="com.sun.star.sheet.SpreadsheetDocument"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Calc.XMLContentExporter">
+ <service name="com.sun.star.comp.Calc.XMLContentExporter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Calc.XMLExporter">
+ <service name="com.sun.star.comp.Calc.XMLExporter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Calc.XMLMetaExporter">
+ <service name="com.sun.star.comp.Calc.XMLMetaExporter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Calc.XMLOasisContentExporter">
+ <service name="com.sun.star.comp.Calc.XMLOasisContentExporter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Calc.XMLOasisContentImporter">
+ <service name="com.sun.star.comp.Calc.XMLOasisContentImporter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Calc.XMLOasisExporter">
+ <service name="com.sun.star.comp.Calc.XMLOasisExporter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Calc.XMLOasisImporter">
+ <service name="com.sun.star.comp.Calc.XMLOasisImporter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Calc.XMLOasisMetaExporter">
+ <service name="com.sun.star.comp.Calc.XMLOasisMetaExporter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Calc.XMLOasisMetaImporter">
+ <service name="com.sun.star.comp.Calc.XMLOasisMetaImporter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Calc.XMLOasisSettingsExporter">
+ <service name="com.sun.star.comp.Calc.XMLOasisSettingsExporter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Calc.XMLOasisSettingsImporter">
+ <service name="com.sun.star.comp.Calc.XMLOasisSettingsImporter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Calc.XMLOasisStylesExporter">
+ <service name="com.sun.star.comp.Calc.XMLOasisStylesExporter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Calc.XMLOasisStylesImporter">
+ <service name="com.sun.star.comp.Calc.XMLOasisStylesImporter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Calc.XMLSettingsExporter">
+ <service name="com.sun.star.comp.Calc.XMLSettingsExporter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Calc.XMLStylesExporter">
+ <service name="com.sun.star.comp.Calc.XMLStylesExporter"/>
+ </implementation>
+ <implementation name="stardiv.StarCalc.ScAutoFormatsObj">
+ <service name="com.sun.star.sheet.TableAutoFormats"/>
+ </implementation>
+ <implementation name="stardiv.StarCalc.ScFunctionAccess">
+ <service name="com.sun.star.sheet.FunctionAccess"/>
+ </implementation>
+ <implementation name="stardiv.StarCalc.ScFunctionListObj">
+ <service name="com.sun.star.sheet.FunctionDescriptions"/>
+ </implementation>
+ <implementation name="stardiv.StarCalc.ScRecentFunctionsObj">
+ <service name="com.sun.star.sheet.RecentFunctions"/>
+ </implementation>
+ <implementation name="stardiv.StarCalc.ScSpreadsheetSettings">
+ <service name="com.sun.star.sheet.GlobalSheetSettings"/>
+ </implementation>
+</component>
diff --git a/sc/util/scd.component b/sc/util/scd.component
new file mode 100644
index 000000000000..df2e2f77e25f
--- /dev/null
+++ b/sc/util/scd.component
@@ -0,0 +1,34 @@
+<?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.calc.FormatDetector">
+ <service name="com.sun.star.frame.ExtendedTypeDetection"/>
+ </implementation>
+</component>
diff --git a/sc/util/vbaobj.component b/sc/util/vbaobj.component
new file mode 100644
index 000000000000..52ad691822d0
--- /dev/null
+++ b/sc/util/vbaobj.component
@@ -0,0 +1,58 @@
+<?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="ScVbaApplication">
+ <service name="ooo.vba.excel.Application"/>
+ </implementation>
+ <implementation name="ScVbaEventsHelper">
+ <service name="com.sun.star.script.vba.VBASpreadsheetEventProcessor"/>
+ </implementation>
+ <implementation name="ScVbaGlobals">
+ <service name="ooo.vba.excel.Globals"/>
+ </implementation>
+ <implementation name="ScVbaHyperlink">
+ <service name="ooo.vba.excel.Hyperlink"/>
+ </implementation>
+ <implementation name="ScVbaTextFrame">
+ <service name="ooo.vba.excel.TextFrame"/>
+ </implementation>
+ <implementation name="ScVbaWindow">
+ <service name="ooo.vba.excel.Window"/>
+ </implementation>
+ <implementation name="ScVbaWorkbook">
+ <service name="ooo.vba.excel.Workbook"/>
+ </implementation>
+ <implementation name="ScVbaWorksheet">
+ <service name="ooo.vba.excel.Worksheet"/>
+ </implementation>
+ <implementation name="SvVbaRange">
+ <service name="ooo.vba.excel.Range"/>
+ </implementation>
+</component>