diff options
author | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2010-10-04 19:55:06 +0200 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2010-10-04 19:55:06 +0200 |
commit | e9c647712ad2bae33af42c27295c8cd435bf3158 (patch) | |
tree | 2611c1780dc7bf4ce62a6365ebc93be5b9521bec /unotools | |
parent | f12537fa393ce4efc512252168af0bdf2ee9be3a (diff) | |
parent | 525de6f8eeac6e357167467da0f9a9448433bb25 (diff) |
dba34b: pulled DEV300:m89
Diffstat (limited to 'unotools')
-rw-r--r-- | unotools/prj/d.lst | 1 | ||||
-rw-r--r-- | unotools/source/ucbhelper/xtempfile.cxx | 58 | ||||
-rw-r--r-- | unotools/util/makefile.mk | 8 | ||||
-rw-r--r-- | unotools/util/utl.component | 34 |
4 files changed, 43 insertions, 58 deletions
diff --git a/unotools/prj/d.lst b/unotools/prj/d.lst index ad8a764055b2..38cafd0cc1f8 100644 --- a/unotools/prj/d.lst +++ b/unotools/prj/d.lst @@ -9,3 +9,4 @@ mkdir: %_DEST%\inc%_EXT%\unotools ..\inc\unotools\*.hxx %_DEST%\inc%_EXT%\unotools\*.hxx ..\inc\unotools\unotoolsdllapi.h %_DEST%\inc%_EXT%\unotools\unotoolsdllapi.h +..\%__SRC%\misc\utl.component %_DEST%\xml%_EXT%\utl.component diff --git a/unotools/source/ucbhelper/xtempfile.cxx b/unotools/source/ucbhelper/xtempfile.cxx index 023211dc3527..525596fae854 100644 --- a/unotools/source/ucbhelper/xtempfile.cxx +++ b/unotools/source/ucbhelper/xtempfile.cxx @@ -28,12 +28,6 @@ #include <XTempFile.hxx> #include <cppuhelper/factory.hxx> #include <cppuhelper/typeprovider.hxx> -#ifndef _COM_SUN_STAR_REGISTRY_XREGISTRYKEY_HPP -#include <com/sun/star/registry/XRegistryKey.hpp> -#endif -#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP -#include <com/sun/star/beans/PropertyAttribute.hpp> -#endif #include <unotools/tempfile.hxx> #include <osl/file.hxx> #include <unotools/configmgr.hxx> @@ -489,43 +483,6 @@ throw ( ::css::uno::RuntimeException ) return ::cppu::createSingleComponentFactory( XTempFile_createInstance, getImplementationName_Static(), getSupportedServiceNames_Static() ); } -static sal_Bool writeInfo( void * pRegistryKey, - const ::rtl::OUString & rImplementationName, - ::css::uno::Sequence< ::rtl::OUString > const & rServiceNames ) -{ - ::rtl::OUString aKeyName( RTL_CONSTASCII_USTRINGPARAM ( "/" ) ); - aKeyName += rImplementationName; - aKeyName += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "/UNO/SERVICES" ) ); - - ::css::uno::Reference< ::css::registry::XRegistryKey > xKey; - try - { - xKey = static_cast< ::css::registry::XRegistryKey * >( - pRegistryKey )->createKey( aKeyName ); - } - catch ( ::css::registry::InvalidRegistryException const & ) - { - } - - if ( !xKey.is() ) - return sal_False; - - sal_Bool bSuccess = sal_True; - - for ( sal_Int32 n = 0; n < rServiceNames.getLength(); ++n ) - { - try - { - xKey->createKey( rServiceNames[ n ] ); - } - catch ( ::css::registry::InvalidRegistryException const & ) - { - bSuccess = sal_False; - break; - } - } - return bSuccess; -} // C functions to implement this as a component extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( @@ -535,21 +492,6 @@ extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnviron } /** - * This function creates an implementation section in the registry and another subkey - * for each supported service. - * @param pServiceManager generic uno interface providing a service manager - * @param pRegistryKey generic uno interface providing registry key to write - */ -extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, void* pRegistryKey ) -{ - return pRegistryKey && - writeInfo (pRegistryKey, - OTempFileService::getImplementationName_Static(), - OTempFileService::getSupportedServiceNames_Static() ); -} - - -/** * This function is called to get service factories for an implementation. * @param pImplName name of implementation * @param pServiceManager generic uno interface providing a service manager to instantiate components diff --git a/unotools/util/makefile.mk b/unotools/util/makefile.mk index 8e725d2de2fa..343e56f04169 100644 --- a/unotools/util/makefile.mk +++ b/unotools/util/makefile.mk @@ -94,3 +94,11 @@ $(MISC)$/$(SHL1TARGET).flt: makefile.mk @echo UpdateToConfig >> $@ @echo _Impl >> $@ + +ALLTAR : $(MISC)/utl.component + +$(MISC)/utl.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + utl.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt utl.component diff --git a/unotools/util/utl.component b/unotools/util/utl.component new file mode 100644 index 000000000000..8c8198741f55 --- /dev/null +++ b/unotools/util/utl.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.io.comp.TempFile"> + <service name="com.sun.star.io.TempFile"/> + </implementation> +</component> |