diff options
author | sb <sb@openoffice.org> | 2010-09-10 13:10:07 +0200 |
---|---|---|
committer | sb <sb@openoffice.org> | 2010-09-10 13:10:07 +0200 |
commit | 7788dc10a3b53efa890635b3779f103879e9e55a (patch) | |
tree | 61317a258b9e7c3bc7103a530b0d44193d8bbe7f | |
parent | 40e1e1a4b2c190ffd71e17d83fc9f00c81d7d5b1 (diff) |
sb129: #i113189# change UNO components to use passive registration
71 files changed, 890 insertions, 694 deletions
diff --git a/filter/prj/d.lst b/filter/prj/d.lst index e8fdae8a1c58..037bef1a3765 100644 --- a/filter/prj/d.lst +++ b/filter/prj/d.lst @@ -49,9 +49,21 @@ mkdir: %_DEST%\bin%_EXT%\pdfimport ..\%__SRC%\bin\pdfunzip.* %_DEST%\bin%_EXT%\pdfunzip.* ..\%__SRC%\misc\filters\modulepacks\fcfg_*.xcu %_DEST%\xml%_EXT%\registry\spool\fcfg_*.xcu ..\%COMMON_OUTDIR%\bin\fcfg_langpack_*.zip %_DEST%\pck%_EXT%\fcfg_langpack_*.zip +..\%__SRC%\misc\t602filter.component %_DEST%\xml%_EXT%\t602filter.component mkdir: %_DEST%\inc%_EXT%\filter mkdir: %_DEST%\inc%_EXT%\filter\msfilter ..\inc\filter\msfilter\*.hxx %_DEST%\inc%_EXT%\filter\msfilter\*.hxx ..\inc\filter\msfilter\*.h %_DEST%\inc%_EXT%\filter\msfilter\*.h +..\%__SRC%\misc\XSLTFilter.jar.component %_DEST%\xml%_EXT%\XSLTFilter.jar.component +..\%__SRC%\misc\XSLTValidate.component %_DEST%\xml%_EXT%\XSLTValidate.component +..\%__SRC%\misc\filterconfig1.component %_DEST%\xml%_EXT%\filterconfig1.component +..\%__SRC%\misc\flash.component %_DEST%\xml%_EXT%\flash.component +..\%__SRC%\misc\pdffilter.component %_DEST%\xml%_EXT%\pdffilter.component +..\%__SRC%\misc\placeware.component %_DEST%\xml%_EXT%\placeware.component +..\%__SRC%\misc\svgfilter.component %_DEST%\xml%_EXT%\svgfilter.component +..\%__SRC%\misc\xmlfa.component %_DEST%\xml%_EXT%\xmlfa.component +..\%__SRC%\misc\xmlfd.component %_DEST%\xml%_EXT%\xmlfd.component +..\%__SRC%\misc\xsltdlg.component %_DEST%\xml%_EXT%\xsltdlg.component +..\%__SRC%\misc\xsltfilter.component %_DEST%\xml%_EXT%\xsltfilter.component diff --git a/filter/source/config/cache/filterconfig1.component b/filter/source/config/cache/filterconfig1.component new file mode 100644 index 000000000000..9d3c7c90fb31 --- /dev/null +++ b/filter/source/config/cache/filterconfig1.component @@ -0,0 +1,46 @@ +<?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.filter.config.ConfigFlush"> + <service name="com.sun.star.document.FilterConfigRefresh"/> + </implementation> + <implementation name="com.sun.star.comp.filter.config.ContentHandlerFactory"> + <service name="com.sun.star.frame.ContentHandlerFactory"/> + </implementation> + <implementation name="com.sun.star.comp.filter.config.FilterFactory"> + <service name="com.sun.star.document.FilterFactory"/> + </implementation> + <implementation name="com.sun.star.comp.filter.config.FrameLoaderFactory"> + <service name="com.sun.star.frame.FrameLoaderFactory"/> + </implementation> + <implementation name="com.sun.star.comp.filter.config.TypeDetection"> + <service name="com.sun.star.document.TypeDetection"/> + </implementation> +</component> diff --git a/filter/source/config/cache/makefile.mk b/filter/source/config/cache/makefile.mk index fbc4806b0a32..d94c81e35010 100644 --- a/filter/source/config/cache/makefile.mk +++ b/filter/source/config/cache/makefile.mk @@ -77,3 +77,11 @@ SHL1VERSIONMAP= $(SOLARENV)/src/component.map # --- Targets ---------------------------------- .INCLUDE : target.mk + +ALLTAR : $(MISC)/filterconfig1.component + +$(MISC)/filterconfig1.component .ERRREMOVE : \ + $(SOLARENV)/bin/createcomponent.xslt filterconfig1.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt filterconfig1.component diff --git a/filter/source/config/cache/registration.cxx b/filter/source/config/cache/registration.cxx index a65f5c42fea8..2be110871ee1 100644 --- a/filter/source/config/cache/registration.cxx +++ b/filter/source/config/cache/registration.cxx @@ -94,30 +94,6 @@ static void InitConstants() // extern "C" component_getImplementationEnvironment() _COMPHELPER_COMPONENT_GETIMPLEMENTATIONENVIRONMENT -// extern "C" component_writeInfo() -_COMPHELPER_COMPONENT_WRITEINFO -( - _COMPHELPER_COMPONENTINFO( TypeDetection , - TypeDetection::impl_getImplementationName() , - TypeDetection::impl_getSupportedServiceNames()) - - _COMPHELPER_COMPONENTINFO( FilterFactory , - FilterFactory::impl_getImplementationName() , - FilterFactory::impl_getSupportedServiceNames()) - - _COMPHELPER_COMPONENTINFO( ContentHandlerFactory , - ContentHandlerFactory::impl_getImplementationName() , - ContentHandlerFactory::impl_getSupportedServiceNames()) - - _COMPHELPER_COMPONENTINFO( FrameLoaderFactory , - FrameLoaderFactory::impl_getImplementationName() , - FrameLoaderFactory::impl_getSupportedServiceNames()) - - _COMPHELPER_COMPONENTINFO( ConfigFlush , - ConfigFlush::impl_getImplementationName() , - ConfigFlush::impl_getSupportedServiceNames()) -) - // extern "C" component_getFactory() _COMPHELPER_COMPONENT_GETFACTORY ( diff --git a/filter/source/config/cache/registration.hxx b/filter/source/config/cache/registration.hxx index 38e5980c967a..d664cc365abb 100644 --- a/filter/source/config/cache/registration.hxx +++ b/filter/source/config/cache/registration.hxx @@ -31,10 +31,8 @@ //_______________________________________________ // includes -#include <com/sun/star/registry/XRegistryKey.hpp> #include <com/sun/star/lang/XSingleServiceFactory.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> -#include <com/sun/star/registry/InvalidRegistryException.hpp> #include <rtl/ustrbuf.hxx> #include <cppuhelper/factory.hxx> @@ -59,97 +57,6 @@ namespace comphelper{ //_______________________________________________ -/** @short creates a new key inside component registry. - - @descr using: a) _COMPHELPER_COMPONENTINFO( MyClass, - MyClass::st_getImplName(), - MyClass::st_getServNames()) - - b) _COMPHELPER_COMPONENTINFO( MyClass, - ::rtl::OUString::createFromAscii("css.MyClass"), - lServiceNames) - - @param CLASS - must be the class name of the implementation - of an uno service, which should be registered here. - - @param IMPLEMENTATIONNAME - can be an uno implementation name from type [::rtl::OUString] - directly or any possible method call, which returns such - name. - - @param SERVICENAME - a list of supported uno service names from type - [css::uno::Sequence< ::rtl::OUString >] - or any possible method call, which returns such - list. - */ -#define _COMPHELPER_COMPONENTINFO(CLASS, IMPLEMENTATIONNAME, SERVICENAMES) \ - /*define new scope to prevent multiple using of the same variables ... */ \ - { \ - /* build new key name */ \ - ::rtl::OUStringBuffer sKeyBuf(256); \ - sKeyBuf.appendAscii("/" ); \ - sKeyBuf.append (IMPLEMENTATIONNAME); \ - sKeyBuf.appendAscii("/UNO/SERVICES" ); \ - ::rtl::OUString sKey = sKeyBuf.makeStringAndClear(); \ - \ - /* try to register this service ... thrown exception will be catched by COMPONENT_WRITEINFO! */ \ - css::uno::Reference< css::registry::XRegistryKey > xKey = xRoot->createKey(sKey); \ - if (!xKey.is()) \ - throw css::registry::InvalidRegistryException(sKey, css::uno::Reference< css::uno::XInterface >()); \ - \ - /* dont optimize it! it must work for simple types and function calls! */ \ - const css::uno::Sequence< ::rtl::OUString > lServiceNames = SERVICENAMES; \ - const ::rtl::OUString* pServiceNames = lServiceNames.getConstArray(); \ - sal_Int32 nCount = lServiceNames.getLength(); \ - \ - for (sal_Int32 i=0; i<nCount; ++i) \ - xKey->createKey(pServiceNames[i]); \ - } - -//_______________________________________________ - -/** @short implments extern C function component_writeInfo - - @descr using: _COMPHELPER_COMPONENT_WRITEINFO - ( - _COMPHELPER_COMPONENTINFO(...) - .. - _COMPHELPER_COMPONENTINFO(...) - ) - - @param INFOLIST - list of macros of type COMPONENTINFO without(!) any - seperator signs between two elements. - */ -#define _COMPHELPER_COMPONENT_WRITEINFO(INFOLIST) \ - extern "C" sal_Bool SAL_CALL component_writeInfo(void* pServiceManager, \ - void* pRegistryKey ) \ - { \ - if (!pServiceManager || !pRegistryKey) \ - return sal_False; \ - \ - css::uno::Reference< css::registry::XRegistryKey > xRoot = reinterpret_cast< css::registry::XRegistryKey* >(pRegistryKey); \ - \ - /*if one of following registration will fail ... an exception is thrown! */ \ - try \ - { \ - /* This parameter will expand to: */ \ - /* _COMPHELPER_COMPONENTINFO(1) */ \ - /* ... */ \ - /* _COMPHELPER_COMPONENTINFO(n) */ \ - INFOLIST \ - } \ - catch(const css::registry::InvalidRegistryException&) \ - { \ - return sal_False; \ - } \ - return sal_True; \ - } - -//_______________________________________________ - /** TODO doc */ #define _COMPHELPER_MULTIINSTANCEFACTORY(IMPLEMENTATIONNAME, SERVICENAMES, FACTORYMETHOD) \ diff --git a/filter/source/filtertracer/exports.dxp b/filter/source/filtertracer/exports.dxp index 0c2e3e7cddd7..0cb5620a1603 100644 --- a/filter/source/filtertracer/exports.dxp +++ b/filter/source/filtertracer/exports.dxp @@ -1,3 +1,2 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory
\ No newline at end of file diff --git a/filter/source/filtertracer/filtertraceruno.cxx b/filter/source/filtertracer/filtertraceruno.cxx index f2254c8256f9..0e3097de3ff6 100644 --- a/filter/source/filtertracer/filtertraceruno.cxx +++ b/filter/source/filtertracer/filtertraceruno.cxx @@ -51,37 +51,6 @@ extern "C" void SAL_CALL component_getImplementationEnvironment( const sal_Char *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -// ----------------------- -// - component_writeInfo - -// ----------------------- - -extern "C" sal_Bool SAL_CALL component_writeInfo( void* /* pServiceManager */, void* pRegistryKey ) -{ - sal_Bool bRet = sal_False; - - if( pRegistryKey ) - { - try - { - NMSP_UNO::Reference< com::sun::star::registry::XRegistryKey > xNewKey( - reinterpret_cast< com::sun::star::registry::XRegistryKey * >( pRegistryKey )->createKey( - FilterTracer_getImplementationName() ) ); - xNewKey = xNewKey->createKey( B2UCONST( "/UNO/SERVICES" ) ); - const SEQ( rtl::OUString )& rSNL = FilterTracer_getSupportedServiceNames(); - const rtl::OUString * pArray = rSNL.getConstArray(); - for ( sal_Int32 nPos = rSNL.getLength(); nPos--; ) - xNewKey->createKey( pArray[nPos] ); - bRet = sal_True; - } - catch( com::sun::star::registry::InvalidRegistryException& ) - { - OSL_ENSURE( sal_False, "### InvalidRegistryException!" ); - } - } - - return bRet; -} - // ------------------------ // - component_getFactory - // ------------------------ diff --git a/filter/source/flash/flash.component b/filter/source/flash/flash.component new file mode 100644 index 000000000000..1ce69b3549bc --- /dev/null +++ b/filter/source/flash/flash.component @@ -0,0 +1,37 @@ +<?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.Impress.FlashExportDialog"> + <service name="com.sun.star.Impress.FlashExportDialog"/> + </implementation> + <implementation name="com.sun.star.comp.Impress.FlashExportFilter"> + <service name="com.sun.star.document.ExportFilter"/> + </implementation> +</component> diff --git a/filter/source/flash/makefile.mk b/filter/source/flash/makefile.mk index e5ff1bf21c5e..69da217234d8 100644 --- a/filter/source/flash/makefile.mk +++ b/filter/source/flash/makefile.mk @@ -96,3 +96,11 @@ DEF1NAME=$(SHL1TARGET) .INCLUDE : target.mk + +ALLTAR : $(MISC)/flash.component + +$(MISC)/flash.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + flash.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt flash.component diff --git a/filter/source/flash/swfuno.cxx b/filter/source/flash/swfuno.cxx index d4a11ebb921b..5ab572014ace 100644 --- a/filter/source/flash/swfuno.cxx +++ b/filter/source/flash/swfuno.cxx @@ -61,42 +61,7 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( { *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -//================================================================================================== - -void singlecomponent_writeInfo( Reference< XRegistryKey >& xNewKey, const Sequence< OUString > & rSNL ) -{ - const OUString * pArray = rSNL.getConstArray(); - for ( sal_Int32 nPos = rSNL.getLength(); nPos--; ) - xNewKey->createKey( pArray[nPos] ); -} - -SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - void * /* pServiceManager */, void * pRegistryKey ) -{ - if (pRegistryKey) - { - try - { - Reference< XRegistryKey > xNewKey( - reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( FlashExportFilter_getImplementationName() ) ); - xNewKey = xNewKey->createKey( OUString::createFromAscii( "/UNO/SERVICES" ) ); - singlecomponent_writeInfo( xNewKey, FlashExportFilter_getSupportedServiceNames() ); - - xNewKey = reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( SWFDialog_getImplementationName() ); - xNewKey = xNewKey->createKey( OUString::createFromAscii( "/UNO/SERVICES" ) ); - - singlecomponent_writeInfo( xNewKey, SWFDialog_getSupportedServiceNames() ); - - return sal_True; - } - catch (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/filter/source/msfilter/powerpoint/pptimporteruno.cxx b/filter/source/msfilter/powerpoint/pptimporteruno.cxx index c1089f66a5c3..325d360344cf 100644 --- a/filter/source/msfilter/powerpoint/pptimporteruno.cxx +++ b/filter/source/msfilter/powerpoint/pptimporteruno.cxx @@ -51,37 +51,6 @@ extern "C" void SAL_CALL component_getImplementationEnvironment( const sal_Char *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -// ----------------------- -// - component_writeInfo - -// ----------------------- - -extern "C" sal_Bool SAL_CALL component_writeInfo( void* /* pServiceManager */, void* pRegistryKey ) -{ - sal_Bool bRet = sal_False; - - if( pRegistryKey ) - { - try - { - NMSP_UNO::Reference< NMSP_REGISTRY::XRegistryKey > xNewKey( - reinterpret_cast< NMSP_REGISTRY::XRegistryKey * >( pRegistryKey )->createKey( - PptImporter_getImplementationName() ) ); - xNewKey = xNewKey->createKey( B2UCONST( "/UNO/SERVICES" ) ); - const SEQ( NMSP_RTL::OUString )& rSNL = PptImporter_getSupportedServiceNames(); - const NMSP_RTL::OUString * pArray = rSNL.getConstArray(); - for ( sal_Int32 nPos = rSNL.getLength(); nPos--; ) - xNewKey->createKey( pArray[nPos] ); - bRet = sal_True; - } - catch( NMSP_REGISTRY::InvalidRegistryException& ) - { - OSL_ENSURE( sal_False, "### InvalidRegistryException!" ); - } - } - - return bRet; -} - // ------------------------ // - component_getFactory - // ------------------------ diff --git a/filter/source/pdf/makefile.mk b/filter/source/pdf/makefile.mk index edf3147a822c..776729ac0d97 100644 --- a/filter/source/pdf/makefile.mk +++ b/filter/source/pdf/makefile.mk @@ -81,3 +81,11 @@ DEF1NAME=$(SHL1TARGET) # --- Targets ---------------------------------- .INCLUDE : target.mk + +ALLTAR : $(MISC)/pdffilter.component + +$(MISC)/pdffilter.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + pdffilter.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt pdffilter.component diff --git a/filter/source/pdf/pdffilter.component b/filter/source/pdf/pdffilter.component new file mode 100644 index 000000000000..36766b61eb97 --- /dev/null +++ b/filter/source/pdf/pdffilter.component @@ -0,0 +1,37 @@ +<?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.PDF.PDFDialog"> + <service name="com.sun.star.document.PDFDialog"/> + </implementation> + <implementation name="com.sun.star.comp.PDF.PDFFilter"> + <service name="com.sun.star.document.PDFFilter"/> + </implementation> +</component> diff --git a/filter/source/pdf/pdfuno.cxx b/filter/source/pdf/pdfuno.cxx index 10c0f7df293d..78bfff4c89f7 100644 --- a/filter/source/pdf/pdfuno.cxx +++ b/filter/source/pdf/pdfuno.cxx @@ -53,41 +53,6 @@ extern "C" // ------------------------------------------------------------------------- - SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, void* pRegistryKey ) - { - if (pRegistryKey) - { - try - { - Reference< XRegistryKey > xNewKey; - sal_Int32 nPos; - - xNewKey = reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( PDFFilter_getImplementationName() ); - xNewKey = xNewKey->createKey( OUString::createFromAscii( "/UNO/SERVICES" ) ); - const Sequence< OUString > & rSNL1 = PDFFilter_getSupportedServiceNames(); - const OUString * pArray1 = rSNL1.getConstArray(); - for ( nPos = rSNL1.getLength(); nPos--; ) - xNewKey->createKey( pArray1[nPos] ); - - xNewKey = reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( PDFDialog_getImplementationName() ); - xNewKey = xNewKey->createKey( OUString::createFromAscii( "/UNO/SERVICES" ) ); - const Sequence< OUString > & rSNL2 = PDFDialog_getSupportedServiceNames(); - const OUString * pArray2 = rSNL2.getConstArray(); - for ( nPos = rSNL2.getLength(); nPos--; ) - xNewKey->createKey( pArray2[nPos] ); - - return sal_True; - } - catch (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*/ ) { OUString aImplName( OUString::createFromAscii( pImplName ) ); diff --git a/filter/source/placeware/exports.dxp b/filter/source/placeware/exports.dxp index 9630d7e06768..f0e1c69934bc 100644 --- a/filter/source/placeware/exports.dxp +++ b/filter/source/placeware/exports.dxp @@ -1,3 +1,2 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory diff --git a/filter/source/placeware/makefile.mk b/filter/source/placeware/makefile.mk index 3238193c52ae..e3bd32a9197f 100644 --- a/filter/source/placeware/makefile.mk +++ b/filter/source/placeware/makefile.mk @@ -65,3 +65,11 @@ DEF1NAME= $(SHL1TARGET) # --- Targets ---------------------------------- .INCLUDE : target.mk + +ALLTAR : $(MISC)/placeware.component + +$(MISC)/placeware.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + placeware.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt placeware.component diff --git a/filter/source/placeware/placeware.component b/filter/source/placeware/placeware.component new file mode 100644 index 000000000000..9a6ca703ef2d --- /dev/null +++ b/filter/source/placeware/placeware.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.Impress.PlaceWareExportFilter"> + <service name="com.sun.star.document.ExportFilter"/> + </implementation> +</component> diff --git a/filter/source/placeware/uno.cxx b/filter/source/placeware/uno.cxx index c11b4392a1b4..49a660b05241 100644 --- a/filter/source/placeware/uno.cxx +++ b/filter/source/placeware/uno.cxx @@ -59,32 +59,6 @@ void SAL_CALL component_getImplementationEnvironment( *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } //================================================================================================== -sal_Bool SAL_CALL component_writeInfo( - void * /* pServiceManager */, void * pRegistryKey ) -{ - if (pRegistryKey) - { - try - { - Reference< XRegistryKey > xNewKey( - reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( PlaceWareExportFilter_getImplementationName() ) ); - xNewKey = xNewKey->createKey( OUString::createFromAscii( "/UNO/SERVICES" ) ); - - const Sequence< OUString > & rSNL = PlaceWareExportFilter_getSupportedServiceNames(); - const OUString * pArray = rSNL.getConstArray(); - for ( sal_Int32 nPos = rSNL.getLength(); nPos--; ) - xNewKey->createKey( pArray[nPos] ); - - return sal_True; - } - catch (InvalidRegistryException &) - { - OSL_ENSURE( sal_False, "### InvalidRegistryException!" ); - } - } - return sal_False; -} -//================================================================================================== void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /* pRegistryKey */ ) { diff --git a/filter/source/svg/makefile.mk b/filter/source/svg/makefile.mk index 12c1210c18c4..44bac23381f5 100644 --- a/filter/source/svg/makefile.mk +++ b/filter/source/svg/makefile.mk @@ -81,3 +81,11 @@ DEF1NAME=$(SHL1TARGET) # --- Targets ---------------------------------- .INCLUDE : target.mk + +ALLTAR : $(MISC)/svgfilter.component + +$(MISC)/svgfilter.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + svgfilter.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt svgfilter.component diff --git a/filter/source/svg/svgfilter.component b/filter/source/svg/svgfilter.component new file mode 100644 index 000000000000..82db624ff9e0 --- /dev/null +++ b/filter/source/svg/svgfilter.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.Draw.SVGFilter"> + <service name="com.sun.star.document.SVGFilter"/> + </implementation> +</component> diff --git a/filter/source/svg/svguno.cxx b/filter/source/svg/svguno.cxx index aa91889fc93f..f20bfb6a526d 100644 --- a/filter/source/svg/svguno.cxx +++ b/filter/source/svg/svguno.cxx @@ -51,32 +51,6 @@ extern "C" *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } //================================================================================================== - SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - void * /* pServiceManager */, void * pRegistryKey ) - { - if (pRegistryKey) - { - try - { - Reference< XRegistryKey > xNewKey( - reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( SVGFilter_getImplementationName() ) ); - xNewKey = xNewKey->createKey( OUString::createFromAscii( "/UNO/SERVICES" ) ); - - const Sequence< OUString > & rSNL = SVGFilter_getSupportedServiceNames(); - const OUString * pArray = rSNL.getConstArray(); - for ( sal_Int32 nPos = rSNL.getLength(); nPos--; ) - xNewKey->createKey( pArray[nPos] ); - - return sal_True; - } - catch (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/filter/source/t602/filterenv.cxx b/filter/source/t602/filterenv.cxx index f7fc319c27e3..d1e1a2536f8b 100644 --- a/filter/source/t602/filterenv.cxx +++ b/filter/source/t602/filterenv.cxx @@ -52,41 +52,6 @@ void SAL_CALL component_getImplementationEnvironment( *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } //================================================================================================== -sal_Bool SAL_CALL component_writeInfo( - void * /* pServiceManager */, void * pRegistryKey ) -{ - if (pRegistryKey) - { - try - { - sal_Int32 nPos = 0; - Reference< XRegistryKey > xNewKey( - reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( T602ImportFilter_getImplementationName() ) ); - xNewKey = xNewKey->createKey( OUString::createFromAscii( "/UNO/SERVICES" ) ); - - const Sequence< OUString > & rSNL = T602ImportFilter_getSupportedServiceNames(); - const OUString * pArray = rSNL.getConstArray(); - for ( nPos = rSNL.getLength(); nPos--; ) - xNewKey->createKey( pArray[nPos] ); - - xNewKey = reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( T602ImportFilterDialog_getImplementationName() ); - xNewKey = xNewKey->createKey( OUString::createFromAscii( "/UNO/SERVICES" ) ); - - const Sequence< OUString > & rSNL2 = T602ImportFilterDialog_getSupportedServiceNames(); - pArray = rSNL2.getConstArray(); - for ( nPos = rSNL2.getLength(); nPos--; ) - xNewKey->createKey( pArray[nPos] ); - - return sal_True; - } - catch (InvalidRegistryException &) - { - OSL_ENSURE( sal_False, "### InvalidRegistryException!" ); - } - } - return sal_False; -} -//================================================================================================== void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /* pRegistryKey */ ) { diff --git a/filter/source/t602/makefile.mk b/filter/source/t602/makefile.mk index c65de1bc9b7c..141794b346b5 100644 --- a/filter/source/t602/makefile.mk +++ b/filter/source/t602/makefile.mk @@ -60,3 +60,11 @@ SHL1STDLIBS= \ # --- Targets ------------------------------------------------------ .INCLUDE : target.mk + +ALLTAR : $(MISC)/t602filter.component + +$(MISC)/t602filter.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + t602filter.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt t602filter.component diff --git a/filter/source/t602/t602filter.component b/filter/source/t602/t602filter.component new file mode 100644 index 000000000000..fe512bf483ca --- /dev/null +++ b/filter/source/t602/t602filter.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.Writer.T602ImportFilter"> + <service name="com.sun.star.document.ExtendedTypeDetection"/> + <service name="com.sun.star.document.ImportFilter"/> + </implementation> + <implementation name="com.sun.star.comp.Writer.T602ImportFilterDialog"> + <service name="com.sun.star.ui.dialogs.FilterOptionsDialog"/> + </implementation> +</component> diff --git a/filter/source/xmlfilteradaptor/genericfilter.cxx b/filter/source/xmlfilteradaptor/genericfilter.cxx index f91c7e4f296c..8af896b84938 100644 --- a/filter/source/xmlfilteradaptor/genericfilter.cxx +++ b/filter/source/xmlfilteradaptor/genericfilter.cxx @@ -82,58 +82,6 @@ void SAL_CALL component_getImplementationEnvironment( //================================================================================================== -sal_Bool SAL_CALL component_writeInfo( - - void * /* pServiceManager */, void * pRegistryKey ) - -{ - - if (pRegistryKey) - - { - - try - - { - - Reference< XRegistryKey > xNewKey( - - reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( XmlFilterAdaptor_getImplementationName() ) ); - - xNewKey = xNewKey->createKey( OUString::createFromAscii( "/UNO/SERVICES" ) ); - - - - const Sequence< OUString > & rSNL = XmlFilterAdaptor_getSupportedServiceNames(); - - const OUString * pArray = rSNL.getConstArray(); - - for ( sal_Int32 nPos = rSNL.getLength(); nPos--; ) - - xNewKey->createKey( pArray[nPos] ); - - - - return sal_True; - - } - - catch (InvalidRegistryException &) - - { - - OSL_ENSURE( sal_False, "### InvalidRegistryException!" ); - - } - - } - - return sal_False; - -} - -//================================================================================================== - void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /* pRegistryKey */ ) diff --git a/filter/source/xmlfilteradaptor/makefile.mk b/filter/source/xmlfilteradaptor/makefile.mk index b3d39f860388..0e3732c20885 100644 --- a/filter/source/xmlfilteradaptor/makefile.mk +++ b/filter/source/xmlfilteradaptor/makefile.mk @@ -60,3 +60,11 @@ SHL1STDLIBS= $(COMPHELPERLIB) \ .INCLUDE : target.mk + +ALLTAR : $(MISC)/xmlfa.component + +$(MISC)/xmlfa.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + xmlfa.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt xmlfa.component diff --git a/filter/source/xmlfilteradaptor/xmlfa.component b/filter/source/xmlfilteradaptor/xmlfa.component new file mode 100644 index 000000000000..d835782c2f38 --- /dev/null +++ b/filter/source/xmlfilteradaptor/xmlfa.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.Writer.XmlFilterAdaptor"> + <service name="com.sun.star.document.ExportFilter"/> + <service name="com.sun.star.document.ImportFilter"/> + </implementation> +</component> diff --git a/filter/source/xmlfilterdetect/fdcomp.cxx b/filter/source/xmlfilterdetect/fdcomp.cxx index 10820fc8f280..8f68f35cc0dc 100644 --- a/filter/source/xmlfilterdetect/fdcomp.cxx +++ b/filter/source/xmlfilterdetect/fdcomp.cxx @@ -82,58 +82,6 @@ void SAL_CALL component_getImplementationEnvironment( //================================================================================================== -sal_Bool SAL_CALL component_writeInfo( - - void * /* pServiceManager */, void * pRegistryKey ) - -{ - - if (pRegistryKey) - - { - - try - - { - - Reference< XRegistryKey > xNewKey( - - reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( FilterDetect_getImplementationName() ) ); - - xNewKey = xNewKey->createKey( OUString::createFromAscii( "/UNO/SERVICES" ) ); - - - - const Sequence< OUString > & rSNL = FilterDetect_getSupportedServiceNames(); - - const OUString * pArray = rSNL.getConstArray(); - - for ( sal_Int32 nPos = rSNL.getLength(); nPos--; ) - - xNewKey->createKey( pArray[nPos] ); - - - - return sal_True; - - } - - catch (InvalidRegistryException &) - - { - - OSL_ENSURE( sal_False, "### InvalidRegistryException!" ); - - } - - } - - return sal_False; - -} - -//================================================================================================== - void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /* pRegistryKey */ ) diff --git a/filter/source/xmlfilterdetect/makefile.mk b/filter/source/xmlfilterdetect/makefile.mk index d13c4af5f576..582b73950ef9 100644 --- a/filter/source/xmlfilterdetect/makefile.mk +++ b/filter/source/xmlfilterdetect/makefile.mk @@ -58,3 +58,11 @@ SHL1STDLIBS= $(UCBHELPERLIB) \ $(SALLIB) .INCLUDE : target.mk + +ALLTAR : $(MISC)/xmlfd.component + +$(MISC)/xmlfd.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + xmlfd.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt xmlfd.component diff --git a/filter/source/xmlfilterdetect/xmlfd.component b/filter/source/xmlfilterdetect/xmlfd.component new file mode 100644 index 000000000000..3796b0e1fb46 --- /dev/null +++ b/filter/source/xmlfilterdetect/xmlfd.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.filters.XMLFilterDetect"> + <service name="com.sun.star.document.ExtendedTypeDetection"/> + </implementation> +</component> diff --git a/filter/source/xsltdialog/exports.dxp b/filter/source/xsltdialog/exports.dxp index 9630d7e06768..f0e1c69934bc 100644 --- a/filter/source/xsltdialog/exports.dxp +++ b/filter/source/xsltdialog/exports.dxp @@ -1,3 +1,2 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory diff --git a/filter/source/xsltdialog/makefile.mk b/filter/source/xsltdialog/makefile.mk index 728a94bf0d36..c8b95594df4f 100644 --- a/filter/source/xsltdialog/makefile.mk +++ b/filter/source/xsltdialog/makefile.mk @@ -92,3 +92,11 @@ DEF1EXPORTFILE=exports.dxp # --- Targets ---------------------------------- .INCLUDE : target.mk + +ALLTAR : $(MISC)/xsltdlg.component + +$(MISC)/xsltdlg.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + xsltdlg.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt xsltdlg.component diff --git a/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx b/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx index c744a65fc274..e22ac2790955 100644 --- a/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx +++ b/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx @@ -403,37 +403,7 @@ void SAL_CALL component_getImplementationEnvironment( { *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -//================================================================================================== - -void singlecomponent_writeInfo( Reference< XRegistryKey >& xNewKey, const Sequence< OUString > & rSNL ) -{ - const OUString * pArray = rSNL.getConstArray(); - for ( sal_Int32 nPos = rSNL.getLength(); nPos--; ) - xNewKey->createKey( pArray[nPos] ); -} - -sal_Bool SAL_CALL component_writeInfo( - void * /* pServiceManager */, void * pRegistryKey ) -{ - if (pRegistryKey) - { - try - { - Reference< XRegistryKey > xNewKey( - reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( XMLFilterDialogComponent_getImplementationName() ) ); - xNewKey = xNewKey->createKey( OUString::createFromAscii( "/UNO/SERVICES" ) ); - singlecomponent_writeInfo( xNewKey, XMLFilterDialogComponent_getSupportedServiceNames() ); - - return sal_True; - } - catch (InvalidRegistryException &) - { - OSL_ENSURE( sal_False, "### InvalidRegistryException!" ); - } - } - return sal_False; -} //================================================================================================== void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /* pRegistryKey */ ) diff --git a/filter/source/xsltdialog/xsltdlg.component b/filter/source/xsltdialog/xsltdlg.component new file mode 100644 index 000000000000..086208f4f830 --- /dev/null +++ b/filter/source/xsltdialog/xsltdlg.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="XMLFilterDialogComponent"> + <service name="com.sun.star.comp.ui.XSLTFilterDialog"/> + </implementation> +</component> diff --git a/filter/source/xsltfilter/XSLTFilter.cxx b/filter/source/xsltfilter/XSLTFilter.cxx index 2ee532086ef5..cccad09bae2e 100644 --- a/filter/source/xsltfilter/XSLTFilter.cxx +++ b/filter/source/xsltfilter/XSLTFilter.cxx @@ -682,31 +682,6 @@ void SAL_CALL component_getImplementationEnvironment( *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -sal_Bool SAL_CALL component_writeInfo(void * /* pServiceManager */, void * pRegistryKey ) -{ - if (pRegistryKey) - { - try - { - Reference< XRegistryKey > xNewKey( - reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( - OUString::createFromAscii( "/" IMPLEMENTATION_NAME "/UNO/SERVICES" ) ) ); - - const Sequence< OUString > & rSNL = getSupportedServiceNames(); - const OUString * pArray = rSNL.getConstArray(); - for ( sal_Int32 nPos = rSNL.getLength(); nPos--; ) - xNewKey->createKey( pArray[nPos] ); - - return sal_True; - } - catch (InvalidRegistryException &) - { - OSL_ENSURE( sal_False, "### InvalidRegistryException!" ); - } - } - return sal_False; -} - void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /* pRegistryKey */ ) { diff --git a/filter/source/xsltfilter/XSLTFilter.jar.component b/filter/source/xsltfilter/XSLTFilter.jar.component new file mode 100644 index 000000000000..d4ecd66f3b53 --- /dev/null +++ b/filter/source/xsltfilter/XSLTFilter.jar.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.Java2" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="XSLTransformer"> + <service name="com.sun.star.comp.JAXTHelper"/> + </implementation> +</component> diff --git a/filter/source/xsltfilter/XSLTransformer.java b/filter/source/xsltfilter/XSLTransformer.java index 4806c18b8161..315170ec7f98 100644 --- a/filter/source/xsltfilter/XSLTransformer.java +++ b/filter/source/xsltfilter/XSLTransformer.java @@ -81,9 +81,8 @@ import com.sun.star.lib.uno.adapter.XOutputStreamToOutputStreamAdapter; import net.sf.saxon.FeatureKeys; /** This outer class provides an inner class to implement the service - * description, a method to instantiate the - * component on demand (__getServiceFactory()), and a method to give - * information about the component (__writeRegistryServiceInfo()). + * description and a method to instantiate the + * component on demand (__getServiceFactory()). */ public class XSLTransformer implements XTypeProvider, XServiceName, XServiceInfo, XActiveDataSink, @@ -476,9 +475,4 @@ public class XSLTransformer } return xSingleServiceFactory; } - - public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) { - return FactoryHelper.writeRegistryServiceInfo(XSLTransformer.class.getName(), - _serviceName, regKey); - } } diff --git a/filter/source/xsltfilter/makefile.mk b/filter/source/xsltfilter/makefile.mk index a5e27135e17a..f96534df4e2d 100644 --- a/filter/source/xsltfilter/makefile.mk +++ b/filter/source/xsltfilter/makefile.mk @@ -83,3 +83,17 @@ $(JAVACLASSFILES) : $(CLASSDIR) $(CLASSDIR) : $(MKDIR) $(CLASSDIR) .ENDIF + +ALLTAR : $(MISC)/XSLTFilter.jar.component $(MISC)/xsltfilter.component + +$(MISC)/XSLTFilter.jar.component .ERRREMOVE : \ + $(SOLARENV)/bin/createcomponent.xslt XSLTFilter.jar.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_JAVA)$(JARTARGET)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt XSLTFilter.jar.component + +$(MISC)/xsltfilter.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + xsltfilter.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt xsltfilter.component diff --git a/filter/source/xsltfilter/xsltfilter.component b/filter/source/xsltfilter/xsltfilter.component new file mode 100644 index 000000000000..25a479794b29 --- /dev/null +++ b/filter/source/xsltfilter/xsltfilter.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.documentconversion.XSLTFilter"> + <service name="com.sun.star.documentconversion.XSLTFilter"/> + </implementation> +</component> diff --git a/filter/source/xsltvalidate/XSLTValidate.component b/filter/source/xsltvalidate/XSLTValidate.component new file mode 100644 index 000000000000..7d357be55119 --- /dev/null +++ b/filter/source/xsltvalidate/XSLTValidate.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.Java2" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="XSLTValidate$_XSLTValidate"> + <service name="com.sun.star.documentconversion.XSLTValidate"/> + </implementation> +</component> diff --git a/filter/source/xsltvalidate/XSLTValidate.java b/filter/source/xsltvalidate/XSLTValidate.java index 6dba438f4e47..591b7c6f354c 100644 --- a/filter/source/xsltvalidate/XSLTValidate.java +++ b/filter/source/xsltvalidate/XSLTValidate.java @@ -53,9 +53,8 @@ import com.sun.star.uno.AnyConverter; import com.sun.star.lib.uno.adapter.*; /** This outer class provides an inner class to implement the service - * description, a method to instantiate the - * component on demand (__getServiceFactory()), and a method to give - * information about the component (__writeRegistryServiceInfo()). + * description and a method to instantiate the + * component on demand (__getServiceFactory()). */ public class XSLTValidate { @@ -330,18 +329,4 @@ public class XSLTValidate { return xSingleServiceFactory; } - - /** - * Writes the service information into the given registry key. - * This method is called by the <code>JavaLoader</code> - * <p> - * @return returns true if the operation succeeded - * @param regKey the registryKey - * @see com.sun.star.comp.loader.JavaLoader - */ - public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) { - - return FactoryHelper.writeRegistryServiceInfo(_XSLTValidate.class.getName(), - _XSLTValidate.__serviceName, regKey); - } } diff --git a/filter/source/xsltvalidate/makefile.mk b/filter/source/xsltvalidate/makefile.mk index 5337d31a4bd7..1ceb740fcf6a 100644 --- a/filter/source/xsltvalidate/makefile.mk +++ b/filter/source/xsltvalidate/makefile.mk @@ -74,3 +74,11 @@ $(JARMANIFEST) : $(CLASSDIR) $(CLASSDIR) : $(MKDIR) $(CLASSDIR) + +ALLTAR : $(MISC)/XSLTValidate.component + +$(MISC)/XSLTValidate.component .ERRREMOVE : \ + $(SOLARENV)/bin/createcomponent.xslt XSLTValidate.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_JAVA)$(JARTARGET)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt XSLTValidate.component diff --git a/hwpfilter/prj/d.lst b/hwpfilter/prj/d.lst index 32763725af8b..0848b21f27ac 100644 --- a/hwpfilter/prj/d.lst +++ b/hwpfilter/prj/d.lst @@ -2,4 +2,4 @@ ..\%__SRC%\lib\ihwp*.lib %_DEST%\bin%_EXT%\ihwp*.lib ..\%__SRC%\lib\libhwp.so %_DEST%\lib%_EXT%\libhwp.so ..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib - +..\%__SRC%\misc\hwp.component %_DEST%\xml%_EXT%\hwp.component diff --git a/hwpfilter/source/hwp.component b/hwpfilter/source/hwp.component new file mode 100644 index 000000000000..5280cfbbd46b --- /dev/null +++ b/hwpfilter/source/hwp.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.comp.hwpimport.HwpImportFilter"> + <service name="com.sun.star.document.ImportFilter"/> + </implementation> +</component> diff --git a/hwpfilter/source/hwpreader.hxx b/hwpfilter/source/hwpreader.hxx index c5fdb180f776..239a1ff225d6 100644 --- a/hwpfilter/source/hwpreader.hxx +++ b/hwpfilter/source/hwpreader.hxx @@ -345,30 +345,6 @@ extern "C" *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } - - sal_Bool SAL_CALL component_writeInfo( - void * , void * pRegistryKey ) - { - if (pRegistryKey) - { - try - { - Reference< XRegistryKey > xKey( reinterpret_cast< XRegistryKey * >( pRegistryKey ) ); - - Reference< XRegistryKey > xNewKey = xKey->createKey( - OUString::createFromAscii( "/" IMPLEMENTATION_NAME "/UNO/SERVICES" ) ); - xNewKey->createKey( OUString::createFromAscii( SERVICE_NAME ) ); - - return sal_True; - } - catch (InvalidRegistryException &) - { - OSL_ENSURE( sal_False, "### InvalidRegistryException!" ); - } - } - return sal_False; - } - void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * ) { void * pRet = 0; diff --git a/hwpfilter/source/makefile.mk b/hwpfilter/source/makefile.mk index 98b00d0618d6..494b4a30d74d 100644 --- a/hwpfilter/source/makefile.mk +++ b/hwpfilter/source/makefile.mk @@ -1,6 +1,4 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +#************************************************************************* NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # Copyright 2000, 2010 Oracle and/or its affiliates. # @@ -95,3 +93,11 @@ DEF1NAME=$(SHL1TARGET) # --- Tagets ------------------------------------------------------- .INCLUDE : target.mk + +ALLTAR : $(MISC)/hwp.component + +$(MISC)/hwp.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + hwp.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt hwp.component diff --git a/oox/prj/d.lst b/oox/prj/d.lst index 482a270926a3..f656056b119e 100644 --- a/oox/prj/d.lst +++ b/oox/prj/d.lst @@ -41,3 +41,4 @@ mkdir: %_DEST%\inc%_EXT%\oox\xls dos: sh -c "if test %OS% = MACOSX; then create-bundle %_DEST%\lib%_EXT%\*.dylib; fi" ..\xml\components.xml %_DEST%\xml%_EXT%\components.xml +..\%__SRC%\misc\oox.component %_DEST%\xml%_EXT%\oox.component diff --git a/oox/source/core/facreg.cxx b/oox/source/core/facreg.cxx index de6212984093..ed54ae81e7e5 100644 --- a/oox/source/core/facreg.cxx +++ b/oox/source/core/facreg.cxx @@ -77,45 +77,6 @@ OOX_DLLPUBLIC void SAL_CALL component_getImplementationEnvironment( const sal_Ch *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -void SAL_CALL writeInfo( registry::XRegistryKey * pRegistryKey, const OUString& rImplementationName, const uno::Sequence< OUString >& rServices ) -{ - uno::Reference< registry::XRegistryKey > xNewKey( - pRegistryKey->createKey( - OUString( sal_Unicode( '/' ) ) + rImplementationName + OUString(RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") ) ) ); - - for( sal_Int32 i = 0; i < rServices.getLength(); i++ ) - xNewKey->createKey( rServices.getConstArray()[i]); -} - -#define WRITEINFO(className)\ - writeInfo( pKey, className##_getImplementationName(), className##_getSupportedServiceNames() ) - -OOX_DLLPUBLIC sal_Bool SAL_CALL component_writeInfo( void * , void * pRegistryKey ) -{ - if( pRegistryKey ) - { - try - { - registry::XRegistryKey *pKey = reinterpret_cast< registry::XRegistryKey * >( pRegistryKey ); - - WRITEINFO( ::oox::core::FilterDetect ); - WRITEINFO( ::oox::ppt::PowerPointImport ); - WRITEINFO( ::oox::xls::BiffDetector ); - WRITEINFO( ::oox::xls::ExcelFilter ); - WRITEINFO( ::oox::xls::ExcelBiffFilter ); - WRITEINFO( ::oox::shape::ShapeContextHandler ); - WRITEINFO( ::oox::shape::FastTokenHandlerService ); - WRITEINFO( ::oox::docprop::OOXMLDocPropImportImpl ); - WRITEINFO( ::oox::xls::OOXMLFormulaParser ); - } - catch (registry::InvalidRegistryException &) - { - OSL_ENSURE( sal_False, "### InvalidRegistryException!" ); - } - } - return sal_True; -} - #define SINGLEFACTORY(classname)\ if( classname##_getImplementationName().equalsAsciiL( pImplName, nImplNameLen ) )\ {\ diff --git a/oox/util/makefile.mk b/oox/util/makefile.mk index 8bbf8a3650f2..329ced792164 100644 --- a/oox/util/makefile.mk +++ b/oox/util/makefile.mk @@ -94,3 +94,11 @@ DEFLIB1NAME =$(TARGET) .ENDIF # L10N_framework .INCLUDE : target.mk + +ALLTAR : $(MISC)/oox.component + +$(MISC)/oox.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + oox.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt oox.component diff --git a/oox/util/oox.component b/oox/util/oox.component new file mode 100644 index 000000000000..686ee6f1728e --- /dev/null +++ b/oox/util/oox.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="com.sun.star.comp.Impress.oox.PowerPointImport"> + <service name="com.sun.star.comp.ooxpptx"/> + </implementation> + <implementation name="com.sun.star.comp.oox.BiffDetector"> + <service name="com.sun.star.frame.ExtendedTypeDetection"/> + </implementation> + <implementation name="com.sun.star.comp.oox.ExcelBiffFilter"> + <service name="com.sun.star.comp.oox.ExcelBiffFilter"/> + </implementation> + <implementation name="com.sun.star.comp.oox.ExcelFilter"> + <service name="com.sun.star.comp.oox.ExcelFilter"/> + </implementation> + <implementation name="com.sun.star.comp.oox.FastTokenHandlerService"> + <service name="com.sun.star.xml.sax.FastTokenHandler"/> + </implementation> + <implementation name="com.sun.star.comp.oox.FormatDetector"> + <service name="com.sun.star.frame.ExtendedTypeDetection"/> + </implementation> + <implementation name="com.sun.star.comp.oox.OOXMLFormulaParser"> + <service name="com.sun.star.sheet.FilterFormulaParser"/> + </implementation> + <implementation name="com.sun.star.comp.oox.ShapeContextHandler"> + <service name="com.sun.star.xml.sax.FastShapeContextHandler"/> + </implementation> + <implementation name="com.sun.star.comp.oox.docprop.OOXMLDocumentPropertiesImporter"> + <service name="com.sun.star.document.OOXMLDocumentPropertiesImporter"/> + </implementation> +</component> diff --git a/unoxml/prj/d.lst b/unoxml/prj/d.lst index e2bf5df03b34..4fcedbdba7a2 100644 --- a/unoxml/prj/d.lst +++ b/unoxml/prj/d.lst @@ -1,3 +1,5 @@ ..\%__SRC%\lib\lib*.so %_DEST%\lib%_EXT%\lib*.so ..\%__SRC%\lib\lib*.dylib %_DEST%\lib%_EXT%\lib*.dylib ..\%__SRC%\bin\*.dll %_DEST%\bin%_EXT%\*.dll +..\%__SRC%\misc\unordf.component %_DEST%\xml%_EXT%\unordf.component +..\%__SRC%\misc\unoxml.component %_DEST%\xml%_EXT%\unoxml.component diff --git a/unoxml/source/rdf/librdf_services.cxx b/unoxml/source/rdf/librdf_services.cxx index 03949934560d..08e776d214fe 100644 --- a/unoxml/source/rdf/librdf_services.cxx +++ b/unoxml/source/rdf/librdf_services.cxx @@ -72,12 +72,5 @@ extern "C" void * SAL_CALL component_getFactory( implName, serviceManager, registryKey, entries); } -extern "C" sal_Bool SAL_CALL component_writeInfo( - void * serviceManager, void * registryKey) -{ - return ::cppu::component_writeInfoHelper(serviceManager, registryKey, - entries); -} - } // extern "C" diff --git a/unoxml/source/rdf/makefile.mk b/unoxml/source/rdf/makefile.mk index 3f6d7f445297..1dbcffb8b6ac 100644 --- a/unoxml/source/rdf/makefile.mk +++ b/unoxml/source/rdf/makefile.mk @@ -82,3 +82,11 @@ SHL1STDLIBS= \ .INCLUDE : target.mk + +ALLTAR : $(MISC)/unordf.component + +$(MISC)/unordf.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + unordf.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt unordf.component diff --git a/unoxml/source/rdf/unordf.component b/unoxml/source/rdf/unordf.component new file mode 100644 index 000000000000..a828e7b05d47 --- /dev/null +++ b/unoxml/source/rdf/unordf.component @@ -0,0 +1,43 @@ +<?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="CBlankNode"> + <service name="com.sun.star.rdf.BlankNode"/> + </implementation> + <implementation name="CLiteral"> + <service name="com.sun.star.rdf.Literal"/> + </implementation> + <implementation name="CURI"> + <service name="com.sun.star.rdf.URI"/> + </implementation> + <implementation name="librdf_Repository"> + <service name="com.sun.star.rdf.Repository"/> + </implementation> +</component> diff --git a/unoxml/source/service/makefile.mk b/unoxml/source/service/makefile.mk index 93aec0746323..5fbe62f67ec4 100644 --- a/unoxml/source/service/makefile.mk +++ b/unoxml/source/service/makefile.mk @@ -76,3 +76,11 @@ SHL1STDLIBS= \ .INCLUDE : target.mk + +ALLTAR : $(MISC)/unoxml.component + +$(MISC)/unoxml.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + unoxml.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt unoxml.component diff --git a/unoxml/source/service/services.cxx b/unoxml/source/service/services.cxx index 218015852c83..6b1a2f6f0979 100644 --- a/unoxml/source/service/services.cxx +++ b/unoxml/source/service/services.cxx @@ -60,44 +60,6 @@ component_getImplementationEnvironment(const sal_Char **ppEnvironmentTypeName, u *ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ; } -sal_Bool SAL_CALL -component_writeInfo(void * /*pServiceManager*/, void* pRegistryKey ) -{ - Reference< XRegistryKey > xKey(reinterpret_cast< XRegistryKey* >(pRegistryKey)); - Reference< XRegistryKey > xNewKey; - OUString aImpl; - - // register DOM service - aImpl = OUString(RTL_CONSTASCII_USTRINGPARAM("/")); - aImpl += CDocumentBuilder::_getImplementationName(); - aImpl += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); - xNewKey = xKey->createKey(aImpl); - xNewKey->createKey(CDocumentBuilder::_getSupportedServiceNames()[0]); - - // register DOM service - aImpl = OUString(RTL_CONSTASCII_USTRINGPARAM("/")); - aImpl += CSAXDocumentBuilder::_getImplementationName(); - aImpl += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); - xNewKey = xKey->createKey(aImpl); - xNewKey->createKey(CSAXDocumentBuilder::_getSupportedServiceNames()[0]); - - // register XPath service - aImpl = OUString(RTL_CONSTASCII_USTRINGPARAM("/")); - aImpl += CXPathAPI::_getImplementationName(); - aImpl += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); - xNewKey = xKey->createKey(aImpl); - xNewKey->createKey(CXPathAPI::_getSupportedServiceNames()[0]); - - // register EventTest service - aImpl = OUString(RTL_CONSTASCII_USTRINGPARAM("/")); - aImpl += CTestListener::_getImplementationName(); - aImpl += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); - xNewKey = xKey->createKey(aImpl); - xNewKey->createKey(CTestListener::_getSupportedServiceNames()[0]); - - return sal_True; -} - void* SAL_CALL component_getFactory(const sal_Char *pImplementationName, void *pServiceManager, void * /*pRegistryKey*/) { diff --git a/unoxml/source/service/unoxml.component b/unoxml/source/service/unoxml.component new file mode 100644 index 000000000000..d8c907e6475b --- /dev/null +++ b/unoxml/source/service/unoxml.component @@ -0,0 +1,43 @@ +<?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.xml.dom.DocumentBuilder"> + <service name="com.sun.star.xml.dom.DocumentBuilder"/> + </implementation> + <implementation name="com.sun.star.comp.xml.dom.SAXDocumentBuilder"> + <service name="com.sun.star.xml.dom.SAXDocumentBuilder"/> + </implementation> + <implementation name="com.sun.star.comp.xml.dom.events.TestListener"> + <service name="com.sun.star.comp.xml.dom.events.TestListener"/> + </implementation> + <implementation name="com.sun.star.comp.xml.xpath.XPathAPI"> + <service name="com.sun.star.xml.xpath.XPathAPI"/> + </implementation> +</component> diff --git a/writerfilter/prj/d.lst b/writerfilter/prj/d.lst index f941f4266035..1d09ecf9ad2b 100644 --- a/writerfilter/prj/d.lst +++ b/writerfilter/prj/d.lst @@ -2,6 +2,7 @@ ..\%__SRC%\bin\*.dll %_DEST%\bin%_EXT%\*.dll ..\%__SRC%\lib\*.so %_DEST%\lib%_EXT%\*.so ..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib +..\%__SRC%\misc\writerfilter.component %_DEST%\xml%_EXT%\writerfilter.component mkdir: %_DEST%\inc%_EXT%\writerfilter\doctok ..\%__SRC%\inc\doctok\sprmids.hxx %_DEST%\inc%_EXT%\writerfilter\doctok\sprmids.hxx diff --git a/writerfilter/source/filter/WriterFilter.cxx b/writerfilter/source/filter/WriterFilter.cxx index 71a97d72f391..f8775d097f66 100644 --- a/writerfilter/source/filter/WriterFilter.cxx +++ b/writerfilter/source/filter/WriterFilter.cxx @@ -64,11 +64,6 @@ void SAL_CALL component_getImplementationEnvironment(const sal_Char ** ppEnvType *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -sal_Bool SAL_CALL component_writeInfo( ::com::sun::star::lang::XMultiServiceFactory * xMgr, ::com::sun::star::registry::XRegistryKey * xRegistry ) -{ - return ::cppu::component_writeInfoHelper( xMgr, xRegistry, s_component_entries ); -} - void * SAL_CALL component_getFactory(sal_Char const * implName, ::com::sun::star::lang::XMultiServiceFactory * xMgr, ::com::sun::star::registry::XRegistryKey * xRegistry ) { return ::cppu::component_getFactoryHelper(implName, xMgr, xRegistry, s_component_entries ); diff --git a/writerfilter/unocomponent/component.cxx b/writerfilter/unocomponent/component.cxx index 327e61e41a21..06e837ef4cd6 100644 --- a/writerfilter/unocomponent/component.cxx +++ b/writerfilter/unocomponent/component.cxx @@ -61,12 +61,6 @@ static struct ::cppu::ImplementationEntry s_component_entries [] = *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -sal_Bool SAL_CALL component_writeInfo( ::com::sun::star::lang::XMultiServiceFactory * xMgr, ::com::sun::star::registry::XRegistryKey * xRegistry ) -{ - return ::cppu::component_writeInfoHelper( xMgr, xRegistry, s_component_entries ); -} - - void * SAL_CALL component_getFactory(sal_Char const * implName, ::com::sun::star::lang::XMultiServiceFactory * xMgr, ::com::sun::star::registry::XRegistryKey * xRegistry ) { fprintf(stderr, "Loading service: %s: ", implName); diff --git a/writerfilter/unocomponent/exports.dxp b/writerfilter/unocomponent/exports.dxp index 028ac4175990..f0e1c69934bc 100644 --- a/writerfilter/unocomponent/exports.dxp +++ b/writerfilter/unocomponent/exports.dxp @@ -1,3 +1,2 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory diff --git a/writerfilter/util/makefile.mk b/writerfilter/util/makefile.mk index f5981222743c..c2f5c9ee37e1 100644 --- a/writerfilter/util/makefile.mk +++ b/writerfilter/util/makefile.mk @@ -75,4 +75,10 @@ DEF1NAME=$(SHL1TARGET) .INCLUDE : target.mk +ALLTAR : $(MISC)/writerfilter.component +$(MISC)/writerfilter.component .ERRREMOVE : \ + $(SOLARENV)/bin/createcomponent.xslt writerfilter.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt writerfilter.component diff --git a/writerfilter/util/writerfilter.component b/writerfilter/util/writerfilter.component new file mode 100644 index 000000000000..5d4c628df978 --- /dev/null +++ b/writerfilter/util/writerfilter.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.Writer.WriterFilter"> + <service name="com.sun.star.document.ExportFilter"/> + <service name="com.sun.star.document.ImportFilter"/> + </implementation> + <implementation name="com.sun.star.comp.Writer.WriterFilterDetector"> + <service name="com.sun.star.document.ExtendedTypeDetection"/> + </implementation> +</component> diff --git a/writerperfect/prj/d.lst b/writerperfect/prj/d.lst index 5b5852c6a86f..971d1ce6f50e 100644 --- a/writerperfect/prj/d.lst +++ b/writerperfect/prj/d.lst @@ -2,3 +2,4 @@ ..\%__SRC%\bin\wpft*.dll %_DEST%\bin%_EXT% ..\%__SRC%\bin\wpftgo.dll %_DEST%\bin%_EXT%\wpftgo.dll ..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib +..\%__SRC%\misc\wpft.component %_DEST%\xml%_EXT%\wpft.component diff --git a/writerperfect/source/wpdimp/wpft_genericfilter.cxx b/writerperfect/source/wpdimp/wpft_genericfilter.cxx index c117b93af3c7..b107d5ff4a71 100644 --- a/writerperfect/source/wpdimp/wpft_genericfilter.cxx +++ b/writerperfect/source/wpdimp/wpft_genericfilter.cxx @@ -46,33 +46,6 @@ void SAL_CALL component_getImplementationEnvironment( *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } //================================================================================================== -sal_Bool SAL_CALL component_writeInfo( - void * /* pServiceManager */, void * pRegistryKey ) -{ - if (pRegistryKey) - { - try - { - sal_Int32 nPos = 0; - Reference< XRegistryKey > xNewKey( - reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( WordPerfectImportFilter_getImplementationName() ) ); - xNewKey = xNewKey->createKey( OUString::createFromAscii( "/UNO/SERVICES" ) ); - - const Sequence< OUString > & rSNL = WordPerfectImportFilter_getSupportedServiceNames(); - const OUString * pArray = rSNL.getConstArray(); - for ( nPos = rSNL.getLength(); nPos--; ) - xNewKey->createKey( pArray[nPos] ); - - return sal_True; - } - catch (InvalidRegistryException &) - { - OSL_ENSURE( sal_False, "### InvalidRegistryException!" ); - } - } - return sal_False; -} -//================================================================================================== void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /* pRegistryKey */ ) { diff --git a/writerperfect/util/makefile.mk b/writerperfect/util/makefile.mk index dca29e005287..ae8cf0b73641 100644 --- a/writerperfect/util/makefile.mk +++ b/writerperfect/util/makefile.mk @@ -43,3 +43,11 @@ SHL1VERSIONMAP=$(SOLARENV)/src/component.map DEF1NAME=$(SHL1TARGET) .INCLUDE : target.mk + +ALLTAR : $(MISC)/wpft.component + +$(MISC)/wpft.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + wpft.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt wpft.component diff --git a/writerperfect/util/wpft.component b/writerperfect/util/wpft.component new file mode 100644 index 000000000000..2d8a013606a9 --- /dev/null +++ b/writerperfect/util/wpft.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.Writer.WordPerfectImportFilter"> + <service name="com.sun.star.document.ExtendedTypeDetection"/> + <service name="com.sun.star.document.ImportFilter"/> + </implementation> +</component> diff --git a/xmerge/prj/d.lst b/xmerge/prj/d.lst index 03cd7235c126..9cfd7927ed00 100644 --- a/xmerge/prj/d.lst +++ b/xmerge/prj/d.lst @@ -9,3 +9,4 @@ mkdir: %_DEST%\doc%_EXT%\xmerge ..\%__SRC%\doc\javadoc\package-list %_DEST%\doc%_EXT%\xmerge\package-list ..\%__SRC%\doc\xmerge_javadoc.zip %_DEST%\doc%_EXT%\xmerge_javadoc.zip ..\%__SRC%\doc\writer2latex_javadoc.zip %_DEST%\doc%_EXT%\writer2latex_javadoc.zip +..\%__SRC%\misc\XMergeBridge.component %_DEST%\xml%_EXT%\XMergeBridge.component diff --git a/xmerge/source/bridge/XMergeBridge.component b/xmerge/source/bridge/XMergeBridge.component new file mode 100644 index 000000000000..c48aae6a0e20 --- /dev/null +++ b/xmerge/source/bridge/XMergeBridge.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.Java2" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="XMergeBridge$_XMergeBridge"> + <service name="com.sun.star.documentconversion.XMergeBridge"/> + </implementation> +</component> diff --git a/xmerge/source/bridge/java/XMergeBridge.java b/xmerge/source/bridge/java/XMergeBridge.java index 38503d3b49ff..c2dafd75c996 100644 --- a/xmerge/source/bridge/java/XMergeBridge.java +++ b/xmerge/source/bridge/java/XMergeBridge.java @@ -74,9 +74,8 @@ import java.net.URI; /** This outer class provides an inner class to implement the service - * description, a method to instantiate the - * component on demand (__getServiceFactory()), and a method to give - * information about the component (__writeRegistryServiceInfo()). + * description and a method to instantiate the + * component on demand (__getServiceFactory()). */ public class XMergeBridge { @@ -695,21 +694,4 @@ public class XMergeBridge { return xSingleServiceFactory; } - - /** - * Writes the service information into the given registry key. - * This method is called by the <code>JavaLoader</code> - * <p> - * @return returns true if the operation succeeded - * @param regKey the registryKey - * @see com.sun.star.comp.loader.JavaLoader - */ - public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) { - - return FactoryHelper.writeRegistryServiceInfo(_XMergeBridge.class.getName(), - _XMergeBridge.__serviceName, regKey); - } } - - - diff --git a/xmerge/source/bridge/makefile.mk b/xmerge/source/bridge/makefile.mk index 77a39a568966..05fa5a738d84 100644 --- a/xmerge/source/bridge/makefile.mk +++ b/xmerge/source/bridge/makefile.mk @@ -33,3 +33,11 @@ PRJNAME=xmerge .IF "$(L10N_framework)"=="" ALLTAR: ANTBUILD .ENDIF + +ALLTAR : $(MISC)/XMergeBridge.component + +$(MISC)/XMergeBridge.component .ERRREMOVE : \ + $(SOLARENV)/bin/createcomponent.xslt XMergeBridge.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_JAVA)XMergeBridge.jar' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt XMergeBridge.component |