diff options
Diffstat (limited to 'ucb/source')
305 files changed, 978 insertions, 1010 deletions
diff --git a/ucb/source/cacher/cached.xml b/ucb/source/cacher/cached.xml index 9e88aa74f2..9e88aa74f2 100644..100755 --- a/ucb/source/cacher/cached.xml +++ b/ucb/source/cacher/cached.xml diff --git a/ucb/source/cacher/cached1.component b/ucb/source/cacher/cached1.component new file mode 100755 index 0000000000..aa19e54b5d --- /dev/null +++ b/ucb/source/cacher/cached1.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.ucb.CachedContentResultSetFactory"> + <service name="com.sun.star.ucb.CachedContentResultSetFactory"/> + </implementation> + <implementation name="com.sun.star.comp.ucb.CachedContentResultSetStubFactory"> + <service name="com.sun.star.ucb.CachedContentResultSetStubFactory"/> + </implementation> + <implementation name="com.sun.star.comp.ucb.CachedDynamicResultSetFactory"> + <service name="com.sun.star.ucb.CachedDynamicResultSetFactory"/> + </implementation> + <implementation name="com.sun.star.comp.ucb.CachedDynamicResultSetStubFactory"> + <service name="com.sun.star.ucb.CachedDynamicResultSetStubFactory"/> + </implementation> +</component> diff --git a/ucb/source/cacher/cachedcontentresultset.cxx b/ucb/source/cacher/cachedcontentresultset.cxx index 06fd429beb..06fd429beb 100644..100755 --- a/ucb/source/cacher/cachedcontentresultset.cxx +++ b/ucb/source/cacher/cachedcontentresultset.cxx diff --git a/ucb/source/cacher/cachedcontentresultset.hxx b/ucb/source/cacher/cachedcontentresultset.hxx index 44e48e7dc5..44e48e7dc5 100644..100755 --- a/ucb/source/cacher/cachedcontentresultset.hxx +++ b/ucb/source/cacher/cachedcontentresultset.hxx diff --git a/ucb/source/cacher/cachedcontentresultsetstub.cxx b/ucb/source/cacher/cachedcontentresultsetstub.cxx index 452fa503f5..452fa503f5 100644..100755 --- a/ucb/source/cacher/cachedcontentresultsetstub.cxx +++ b/ucb/source/cacher/cachedcontentresultsetstub.cxx diff --git a/ucb/source/cacher/cachedcontentresultsetstub.hxx b/ucb/source/cacher/cachedcontentresultsetstub.hxx index 217022d4e9..217022d4e9 100644..100755 --- a/ucb/source/cacher/cachedcontentresultsetstub.hxx +++ b/ucb/source/cacher/cachedcontentresultsetstub.hxx diff --git a/ucb/source/cacher/cacheddynamicresultset.cxx b/ucb/source/cacher/cacheddynamicresultset.cxx index 5c79514590..5c79514590 100644..100755 --- a/ucb/source/cacher/cacheddynamicresultset.cxx +++ b/ucb/source/cacher/cacheddynamicresultset.cxx diff --git a/ucb/source/cacher/cacheddynamicresultset.hxx b/ucb/source/cacher/cacheddynamicresultset.hxx index 54f2f090d4..54f2f090d4 100644..100755 --- a/ucb/source/cacher/cacheddynamicresultset.hxx +++ b/ucb/source/cacher/cacheddynamicresultset.hxx diff --git a/ucb/source/cacher/cacheddynamicresultsetstub.cxx b/ucb/source/cacher/cacheddynamicresultsetstub.cxx index 0373ca409c..0373ca409c 100644..100755 --- a/ucb/source/cacher/cacheddynamicresultsetstub.cxx +++ b/ucb/source/cacher/cacheddynamicresultsetstub.cxx diff --git a/ucb/source/cacher/cacheddynamicresultsetstub.hxx b/ucb/source/cacher/cacheddynamicresultsetstub.hxx index f84c67e1cb..f84c67e1cb 100644..100755 --- a/ucb/source/cacher/cacheddynamicresultsetstub.hxx +++ b/ucb/source/cacher/cacheddynamicresultsetstub.hxx diff --git a/ucb/source/cacher/cacheserv.cxx b/ucb/source/cacher/cacheserv.cxx index 5f335ab187..edfd93a3e4 100644..100755 --- a/ucb/source/cacher/cacheserv.cxx +++ b/ucb/source/cacher/cacheserv.cxx @@ -43,45 +43,6 @@ using namespace com::sun::star::registry; using ::rtl::OUString; //========================================================================= -static sal_Bool writeInfo( void * pRegistryKey, - const OUString & rImplementationName, - Sequence< OUString > const & rServiceNames ) -{ - OUString aKeyName( RTL_CONSTASCII_USTRINGPARAM( "/" ) ); - aKeyName += rImplementationName; - aKeyName += OUString(RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES" )); - - Reference< XRegistryKey > xKey; - try - { - xKey = static_cast< XRegistryKey * >( - pRegistryKey )->createKey( aKeyName ); - } - catch ( InvalidRegistryException const & ) - { - } - - if ( !xKey.is() ) - return sal_False; - - sal_Bool bSuccess = sal_True; - - for ( sal_Int32 n = 0; n < rServiceNames.getLength(); ++n ) - { - try - { - xKey->createKey( rServiceNames[ n ] ); - } - catch ( InvalidRegistryException const & ) - { - bSuccess = sal_False; - break; - } - } - return bSuccess; -} - -//========================================================================= extern "C" void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** ) { @@ -89,44 +50,6 @@ extern "C" void SAL_CALL component_getImplementationEnvironment( } //========================================================================= -extern "C" sal_Bool SAL_CALL component_writeInfo( void *, void * pRegistryKey ) -{ - return pRegistryKey && - - ////////////////////////////////////////////////////////////////////// - // CachedContentResultSetFactory. - ////////////////////////////////////////////////////////////////////// - - writeInfo( pRegistryKey, - CachedContentResultSetFactory::getImplementationName_Static(), - CachedContentResultSetFactory::getSupportedServiceNames_Static() ) && - - ////////////////////////////////////////////////////////////////////// - // CachedContentResultSetStubFactory. - ////////////////////////////////////////////////////////////////////// - - writeInfo( pRegistryKey, - CachedContentResultSetStubFactory::getImplementationName_Static(), - CachedContentResultSetStubFactory::getSupportedServiceNames_Static() ) && - - ////////////////////////////////////////////////////////////////////// - // CachedDynamicResultSetFactory. - ////////////////////////////////////////////////////////////////////// - - writeInfo( pRegistryKey, - CachedDynamicResultSetFactory::getImplementationName_Static(), - CachedDynamicResultSetFactory::getSupportedServiceNames_Static() ) && - - ////////////////////////////////////////////////////////////////////// - // CachedDynamicResultSetStubFactory. - ////////////////////////////////////////////////////////////////////// - - writeInfo( pRegistryKey, - CachedDynamicResultSetStubFactory::getImplementationName_Static(), - CachedDynamicResultSetStubFactory::getSupportedServiceNames_Static() ); -} - -//========================================================================= extern "C" void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * ) { diff --git a/ucb/source/cacher/contentresultsetwrapper.cxx b/ucb/source/cacher/contentresultsetwrapper.cxx index f0e2c5f5f0..f0e2c5f5f0 100644..100755 --- a/ucb/source/cacher/contentresultsetwrapper.cxx +++ b/ucb/source/cacher/contentresultsetwrapper.cxx diff --git a/ucb/source/cacher/contentresultsetwrapper.hxx b/ucb/source/cacher/contentresultsetwrapper.hxx index aa0c73eada..aa0c73eada 100644..100755 --- a/ucb/source/cacher/contentresultsetwrapper.hxx +++ b/ucb/source/cacher/contentresultsetwrapper.hxx diff --git a/ucb/source/cacher/dynamicresultsetwrapper.cxx b/ucb/source/cacher/dynamicresultsetwrapper.cxx index 801e932aca..801e932aca 100644..100755 --- a/ucb/source/cacher/dynamicresultsetwrapper.cxx +++ b/ucb/source/cacher/dynamicresultsetwrapper.cxx diff --git a/ucb/source/cacher/dynamicresultsetwrapper.hxx b/ucb/source/cacher/dynamicresultsetwrapper.hxx index 83416e1066..83416e1066 100644..100755 --- a/ucb/source/cacher/dynamicresultsetwrapper.hxx +++ b/ucb/source/cacher/dynamicresultsetwrapper.hxx diff --git a/ucb/source/cacher/makefile.mk b/ucb/source/cacher/makefile.mk index 600fefc174..24d245ec6c 100644..100755 --- a/ucb/source/cacher/makefile.mk +++ b/ucb/source/cacher/makefile.mk @@ -66,3 +66,11 @@ DEF1NAME=$(SHL1TARGET) .INCLUDE: target.mk + +ALLTAR : $(MISC)/cached1.component + +$(MISC)/cached1.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + cached1.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt cached1.component diff --git a/ucb/source/core/cmdenv.cxx b/ucb/source/core/cmdenv.cxx index 4248b2e6cd..4248b2e6cd 100644..100755 --- a/ucb/source/core/cmdenv.cxx +++ b/ucb/source/core/cmdenv.cxx diff --git a/ucb/source/core/cmdenv.hxx b/ucb/source/core/cmdenv.hxx index 09a3dff8d1..09a3dff8d1 100644..100755 --- a/ucb/source/core/cmdenv.hxx +++ b/ucb/source/core/cmdenv.hxx diff --git a/ucb/source/core/exports2.dxp b/ucb/source/core/exports2.dxp index a1936474f7..8091459f4d 100644..100755 --- a/ucb/source/core/exports2.dxp +++ b/ucb/source/core/exports2.dxp @@ -1,5 +1,4 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory _ZTIN3com3sun4star3ucb34InteractiveBadTransferURLExceptionE diff --git a/ucb/source/core/identify.cxx b/ucb/source/core/identify.cxx index 9b024395df..9b024395df 100644..100755 --- a/ucb/source/core/identify.cxx +++ b/ucb/source/core/identify.cxx diff --git a/ucb/source/core/identify.hxx b/ucb/source/core/identify.hxx index e2a25a5eb6..e2a25a5eb6 100644..100755 --- a/ucb/source/core/identify.hxx +++ b/ucb/source/core/identify.hxx diff --git a/ucb/source/core/makefile.mk b/ucb/source/core/makefile.mk index 34765eb742..6360f82320 100644..100755 --- a/ucb/source/core/makefile.mk +++ b/ucb/source/core/makefile.mk @@ -74,3 +74,11 @@ DEF1NAME=$(SHL1TARGET) .INCLUDE: target.mk + +ALLTAR : $(MISC)/ucb1.component + +$(MISC)/ucb1.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + ucb1.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt ucb1.component diff --git a/ucb/source/core/providermap.hxx b/ucb/source/core/providermap.hxx index 292707ea31..292707ea31 100644..100755 --- a/ucb/source/core/providermap.hxx +++ b/ucb/source/core/providermap.hxx diff --git a/ucb/source/core/provprox.cxx b/ucb/source/core/provprox.cxx index d54c830c06..d54c830c06 100644..100755 --- a/ucb/source/core/provprox.cxx +++ b/ucb/source/core/provprox.cxx diff --git a/ucb/source/core/provprox.hxx b/ucb/source/core/provprox.hxx index 32c9a5aab3..32c9a5aab3 100644..100755 --- a/ucb/source/core/provprox.hxx +++ b/ucb/source/core/provprox.hxx diff --git a/ucb/source/core/ucb.cxx b/ucb/source/core/ucb.cxx index 8325bacb5f..8325bacb5f 100644..100755 --- a/ucb/source/core/ucb.cxx +++ b/ucb/source/core/ucb.cxx diff --git a/ucb/source/core/ucb.hxx b/ucb/source/core/ucb.hxx index 8c5b434313..8c5b434313 100644..100755 --- a/ucb/source/core/ucb.hxx +++ b/ucb/source/core/ucb.hxx diff --git a/ucb/source/core/ucb.xml b/ucb/source/core/ucb.xml index 1eeb7b5983..1eeb7b5983 100644..100755 --- a/ucb/source/core/ucb.xml +++ b/ucb/source/core/ucb.xml diff --git a/ucb/source/core/ucb1.component b/ucb/source/core/ucb1.component new file mode 100755 index 0000000000..e9d408822c --- /dev/null +++ b/ucb/source/core/ucb1.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.ucb.CommandEnvironment"> + <service name="com.sun.star.ucb.CommandEnvironment"/> + </implementation> + <implementation name="com.sun.star.comp.ucb.UcbContentProviderProxyFactory"> + <service name="com.sun.star.ucb.ContentProviderProxyFactory"/> + </implementation> + <implementation name="com.sun.star.comp.ucb.UcbPropertiesManager"> + <service name="com.sun.star.ucb.PropertiesManager"/> + </implementation> + <implementation name="com.sun.star.comp.ucb.UcbStore"> + <service name="com.sun.star.ucb.Store"/> + </implementation> + <implementation name="com.sun.star.comp.ucb.UniversalContentBroker"> + <service name="com.sun.star.ucb.UniversalContentBroker"/> + </implementation> +</component> diff --git a/ucb/source/core/ucbcmds.cxx b/ucb/source/core/ucbcmds.cxx index 6aad4da227..6aad4da227 100644..100755 --- a/ucb/source/core/ucbcmds.cxx +++ b/ucb/source/core/ucbcmds.cxx diff --git a/ucb/source/core/ucbcmds.hxx b/ucb/source/core/ucbcmds.hxx index 4a760367d6..4a760367d6 100644..100755 --- a/ucb/source/core/ucbcmds.hxx +++ b/ucb/source/core/ucbcmds.hxx diff --git a/ucb/source/core/ucbprops.cxx b/ucb/source/core/ucbprops.cxx index e75e449ea1..e75e449ea1 100644..100755 --- a/ucb/source/core/ucbprops.cxx +++ b/ucb/source/core/ucbprops.cxx diff --git a/ucb/source/core/ucbprops.hxx b/ucb/source/core/ucbprops.hxx index 444dbf802a..444dbf802a 100644..100755 --- a/ucb/source/core/ucbprops.hxx +++ b/ucb/source/core/ucbprops.hxx diff --git a/ucb/source/core/ucbserv.cxx b/ucb/source/core/ucbserv.cxx index b5eb9d0602..94e5a08b35 100644..100755 --- a/ucb/source/core/ucbserv.cxx +++ b/ucb/source/core/ucbserv.cxx @@ -30,7 +30,6 @@ #include "precompiled_ucb.hxx" #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/lang/XSingleServiceFactory.hpp> -#include <com/sun/star/registry/XRegistryKey.hpp> #include "ucb.hxx" #include "ucbstore.hxx" #include "ucbprops.hxx" @@ -39,48 +38,8 @@ using namespace com::sun::star::uno; using namespace com::sun::star::lang; -using namespace com::sun::star::registry; - using ::rtl::OUString; -//========================================================================= -static sal_Bool writeInfo( void * pRegistryKey, - const OUString & rImplementationName, - Sequence< OUString > const & rServiceNames ) -{ - OUString aKeyName( RTL_CONSTASCII_USTRINGPARAM("/") ); - aKeyName += rImplementationName; - aKeyName += OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); - - Reference< XRegistryKey > xKey; - try - { - xKey = static_cast< XRegistryKey * >( - pRegistryKey )->createKey( aKeyName ); - } - catch ( InvalidRegistryException const & ) - { - } - - if ( !xKey.is() ) - return sal_False; - - sal_Bool bSuccess = sal_True; - - for ( sal_Int32 n = 0; n < rServiceNames.getLength(); ++n ) - { - try - { - xKey->createKey( rServiceNames[ n ] ); - } - catch ( InvalidRegistryException const & ) - { - bSuccess = sal_False; - break; - } - } - return bSuccess; -} //========================================================================= extern "C" void SAL_CALL component_getImplementationEnvironment( @@ -90,52 +49,6 @@ extern "C" void SAL_CALL component_getImplementationEnvironment( } //========================================================================= -extern "C" sal_Bool SAL_CALL component_writeInfo( void *, void * pRegistryKey ) -{ - return pRegistryKey && - - ////////////////////////////////////////////////////////////////////// - // Universal Content Broker. - ////////////////////////////////////////////////////////////////////// - - writeInfo( pRegistryKey, - UniversalContentBroker::getImplementationName_Static(), - UniversalContentBroker::getSupportedServiceNames_Static() ) && - - ////////////////////////////////////////////////////////////////////// - // UCB Store. - ////////////////////////////////////////////////////////////////////// - - writeInfo( pRegistryKey, - UcbStore::getImplementationName_Static(), - UcbStore::getSupportedServiceNames_Static() ) && - - ////////////////////////////////////////////////////////////////////// - // UCB PropertiesManager. - ////////////////////////////////////////////////////////////////////// - - writeInfo( pRegistryKey, - UcbPropertiesManager::getImplementationName_Static(), - UcbPropertiesManager::getSupportedServiceNames_Static() ) && - - ////////////////////////////////////////////////////////////////////// - // UCP Proxy Factory. - ////////////////////////////////////////////////////////////////////// - - writeInfo( pRegistryKey, - UcbContentProviderProxyFactory::getImplementationName_Static(), - UcbContentProviderProxyFactory::getSupportedServiceNames_Static() ) && - - ////////////////////////////////////////////////////////////////////// - // Command Environment. - ////////////////////////////////////////////////////////////////////// - - writeInfo( pRegistryKey, - ucb_cmdenv::UcbCommandEnvironment::getImplementationName_Static(), - ucb_cmdenv::UcbCommandEnvironment::getSupportedServiceNames_Static() ); -} - -//========================================================================= extern "C" void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * ) { diff --git a/ucb/source/core/ucbstore.cxx b/ucb/source/core/ucbstore.cxx index 82e6245896..1f9cccd7c8 100644..100755 --- a/ucb/source/core/ucbstore.cxx +++ b/ucb/source/core/ucbstore.cxx @@ -321,7 +321,7 @@ struct PropertySetRegistry_Impl sal_Bool m_bTriedToGetRootWriteAccess; // #82494# PropertySetRegistry_Impl( const Sequence< Any > &rInitArgs ) - : m_aInitArgs( rInitArgs ), + : m_aInitArgs( rInitArgs ), m_bTriedToGetRootReadAccess( sal_False ), m_bTriedToGetRootWriteAccess( sal_False ) { diff --git a/ucb/source/core/ucbstore.hxx b/ucb/source/core/ucbstore.hxx index 6adeab8f6d..6adeab8f6d 100644..100755 --- a/ucb/source/core/ucbstore.hxx +++ b/ucb/source/core/ucbstore.hxx diff --git a/ucb/source/inc/regexp.hxx b/ucb/source/inc/regexp.hxx index 84beaba797..84beaba797 100644..100755 --- a/ucb/source/inc/regexp.hxx +++ b/ucb/source/inc/regexp.hxx diff --git a/ucb/source/inc/regexpmap.hxx b/ucb/source/inc/regexpmap.hxx index 9f3c6383bf..9f3c6383bf 100644..100755 --- a/ucb/source/inc/regexpmap.hxx +++ b/ucb/source/inc/regexpmap.hxx diff --git a/ucb/source/inc/regexpmap.tpt b/ucb/source/inc/regexpmap.tpt index 9d4a7fb69c..9d4a7fb69c 100644..100755 --- a/ucb/source/inc/regexpmap.tpt +++ b/ucb/source/inc/regexpmap.tpt diff --git a/ucb/source/regexp/makefile.mk b/ucb/source/regexp/makefile.mk index e748f054ea..e748f054ea 100644..100755 --- a/ucb/source/regexp/makefile.mk +++ b/ucb/source/regexp/makefile.mk diff --git a/ucb/source/regexp/regexp.cxx b/ucb/source/regexp/regexp.cxx index b61772efb9..b61772efb9 100644..100755 --- a/ucb/source/regexp/regexp.cxx +++ b/ucb/source/regexp/regexp.cxx diff --git a/ucb/source/sorter/makefile.mk b/ucb/source/sorter/makefile.mk index 68a9959589..008e39b4bc 100644..100755 --- a/ucb/source/sorter/makefile.mk +++ b/ucb/source/sorter/makefile.mk @@ -61,3 +61,11 @@ DEF1NAME=$(SHL1TARGET) .INCLUDE: target.mk + +ALLTAR : $(MISC)/srtrs1.component + +$(MISC)/srtrs1.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + srtrs1.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt srtrs1.component diff --git a/ucb/source/sorter/sortdynres.cxx b/ucb/source/sorter/sortdynres.cxx index b36c25e381..b36c25e381 100644..100755 --- a/ucb/source/sorter/sortdynres.cxx +++ b/ucb/source/sorter/sortdynres.cxx diff --git a/ucb/source/sorter/sortdynres.hxx b/ucb/source/sorter/sortdynres.hxx index adf60a4fbd..adf60a4fbd 100644..100755 --- a/ucb/source/sorter/sortdynres.hxx +++ b/ucb/source/sorter/sortdynres.hxx diff --git a/ucb/source/sorter/sortmain.cxx b/ucb/source/sorter/sortmain.cxx index 1e87bd2ba3..78ad84e3e5 100644..100755 --- a/ucb/source/sorter/sortmain.cxx +++ b/ucb/source/sorter/sortmain.cxx @@ -31,52 +31,11 @@ #include <sortdynres.hxx> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/lang/XSingleServiceFactory.hpp> -#include <com/sun/star/registry/XRegistryKey.hpp> using namespace com::sun::star::uno; using namespace com::sun::star::lang; -using namespace com::sun::star::registry; - using ::rtl::OUString; -//========================================================================= -static sal_Bool writeInfo( void * pRegistryKey, - const OUString & rImplementationName, - Sequence< OUString > const & rServiceNames ) -{ - OUString aKeyName( RTL_CONSTASCII_USTRINGPARAM("/") ); - aKeyName += rImplementationName; - aKeyName += OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); - - Reference< XRegistryKey > xKey; - try - { - xKey = static_cast< XRegistryKey * >( - pRegistryKey )->createKey( aKeyName ); - } - catch ( InvalidRegistryException const & ) - { - } - - if ( !xKey.is() ) - return sal_False; - - sal_Bool bSuccess = sal_True; - - for ( sal_Int32 n = 0; n < rServiceNames.getLength(); ++n ) - { - try - { - xKey->createKey( rServiceNames[ n ] ); - } - catch ( InvalidRegistryException const & ) - { - bSuccess = sal_False; - break; - } - } - return bSuccess; -} //========================================================================= extern "C" void SAL_CALL component_getImplementationEnvironment( @@ -86,20 +45,6 @@ extern "C" void SAL_CALL component_getImplementationEnvironment( } //========================================================================= -extern "C" sal_Bool SAL_CALL component_writeInfo( void *, void * pRegistryKey ) -{ - return pRegistryKey && - - ////////////////////////////////////////////////////////////////////// - // SortedDynamicResultSetFactory. - ////////////////////////////////////////////////////////////////////// - - writeInfo( pRegistryKey, - SortedDynamicResultSetFactory::getImplementationName_Static(), - SortedDynamicResultSetFactory::getSupportedServiceNames_Static() ); -} - -//========================================================================= extern "C" void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * ) { diff --git a/ucb/source/sorter/sortresult.cxx b/ucb/source/sorter/sortresult.cxx index 0e868e4b97..b933bc9543 100644..100755 --- a/ucb/source/sorter/sortresult.cxx +++ b/ucb/source/sorter/sortresult.cxx @@ -492,7 +492,7 @@ sal_Int32 SAL_CALL SortedResultSet::getRow() @param row is the number of rows to move. Could be negative. @returns - <sal_True/> if the cursor is on a row; <sal_False/> otherwise + <TRUE/> if the cursor is on a row; <FALSE/> otherwise @throws SQLException if a database access error occurs or if row is 0, or the result set type is FORWARD_ONLY. @@ -554,7 +554,7 @@ sal_Bool SAL_CALL SortedResultSet::absolute( sal_Int32 row ) @param rows is the number of rows to move. Could be negative. @returns - <sal_True/> if the cursor is on a valid row; <sal_False/> if it is off + <TRUE/> if the cursor is on a valid row; <FALSE/> if it is off the result set. @throws SQLException if a database access error occurs or if there is no @@ -599,7 +599,7 @@ sal_Bool SAL_CALL SortedResultSet::relative( sal_Int32 rows ) <p>Note: <code>previous()</code> is not the same as <code>relative(-1)</code> because it makes sense to call <code>previous()</code> when there is no current row. - @returns <sal_True/> if the cursor is on a valid row; <sal_False/> if it is off + @returns <TRUE/> if the cursor is on a valid row; <FALSE/> if it is off the result set. @throws SQLException if a database access error occurs or the result set type diff --git a/ucb/source/sorter/sortresult.hxx b/ucb/source/sorter/sortresult.hxx index 5c337ec081..5c337ec081 100644..100755 --- a/ucb/source/sorter/sortresult.hxx +++ b/ucb/source/sorter/sortresult.hxx diff --git a/ucb/source/sorter/srtrs.xml b/ucb/source/sorter/srtrs.xml index 622293a5c8..622293a5c8 100644..100755 --- a/ucb/source/sorter/srtrs.xml +++ b/ucb/source/sorter/srtrs.xml diff --git a/ucb/source/sorter/srtrs1.component b/ucb/source/sorter/srtrs1.component new file mode 100755 index 0000000000..c32705160c --- /dev/null +++ b/ucb/source/sorter/srtrs1.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.ucb.SortedDynamicResultSetFactory"> + <service name="com.sun.star.ucb.SortedDynamicResultSetFactory"/> + </implementation> +</component> diff --git a/ucb/source/ucp/expand/makefile.mk b/ucb/source/ucp/expand/makefile.mk index 32de160318..70e441171a 100644..100755 --- a/ucb/source/ucp/expand/makefile.mk +++ b/ucb/source/ucp/expand/makefile.mk @@ -59,3 +59,11 @@ DEF1NAME = $(SHL1TARGET) .ENDIF # L10N_framework .INCLUDE : target.mk + +ALLTAR : $(MISC)/ucpexpand1.component + +$(MISC)/ucpexpand1.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + ucpexpand1.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt ucpexpand1.component diff --git a/ucb/source/ucp/expand/ucpexpand.cxx b/ucb/source/ucp/expand/ucpexpand.cxx index b40e7f7d47..f5fb2dbe86 100644..100755 --- a/ucb/source/ucp/expand/ucpexpand.cxx +++ b/ucb/source/ucp/expand/ucpexpand.cxx @@ -274,14 +274,6 @@ void SAL_CALL component_getImplementationEnvironment( *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -sal_Bool SAL_CALL component_writeInfo( - lang::XMultiServiceFactory * pServiceManager, - registry::XRegistryKey * pRegistryKey ) -{ - return ::cppu::component_writeInfoHelper( - pServiceManager, pRegistryKey, s_entries ); -} - void * SAL_CALL component_getFactory( const sal_Char * pImplName, lang::XMultiServiceFactory * pServiceManager, diff --git a/ucb/source/ucp/expand/ucpexpand1.component b/ucb/source/ucp/expand/ucpexpand1.component new file mode 100755 index 0000000000..c8a7e8e18c --- /dev/null +++ b/ucb/source/ucp/expand/ucpexpand1.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.ucb.ExpandContentProvider"> + <service name="com.sun.star.ucb.ExpandContentProvider"/> + </implementation> +</component> diff --git a/ucb/source/ucp/ext/makefile.mk b/ucb/source/ucp/ext/makefile.mk index fde2d8eb0b..b5f2734a69 100644..100755 --- a/ucb/source/ucp/ext/makefile.mk +++ b/ucb/source/ucp/ext/makefile.mk @@ -59,3 +59,11 @@ SHL1DEF = $(MISC)$/$(SHL1TARGET).def DEF1NAME = $(SHL1TARGET) .INCLUDE : target.mk + +ALLTAR : $(MISC)/ucpext.component + +$(MISC)/ucpext.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + ucpext.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt ucpext.component diff --git a/ucb/source/ucp/ext/ucpext.component b/ucb/source/ucp/ext/ucpext.component new file mode 100755 index 0000000000..2982529e53 --- /dev/null +++ b/ucb/source/ucp/ext/ucpext.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="org.openoffice.comp.ucp.ext.ContentProvider"> + <service name="com.sun.star.ucb.ExtensionContentProvider"/> + </implementation> +</component> diff --git a/ucb/source/ucp/ext/ucpext_content.cxx b/ucb/source/ucp/ext/ucpext_content.cxx index cd5f3e47cc..cd5f3e47cc 100644..100755 --- a/ucb/source/ucp/ext/ucpext_content.cxx +++ b/ucb/source/ucp/ext/ucpext_content.cxx diff --git a/ucb/source/ucp/ext/ucpext_content.hxx b/ucb/source/ucp/ext/ucpext_content.hxx index 95881ba1fc..95881ba1fc 100644..100755 --- a/ucb/source/ucp/ext/ucpext_content.hxx +++ b/ucb/source/ucp/ext/ucpext_content.hxx diff --git a/ucb/source/ucp/ext/ucpext_datasupplier.cxx b/ucb/source/ucp/ext/ucpext_datasupplier.cxx index 703d2df379..703d2df379 100644..100755 --- a/ucb/source/ucp/ext/ucpext_datasupplier.cxx +++ b/ucb/source/ucp/ext/ucpext_datasupplier.cxx diff --git a/ucb/source/ucp/ext/ucpext_datasupplier.hxx b/ucb/source/ucp/ext/ucpext_datasupplier.hxx index e13ad3de62..e13ad3de62 100644..100755 --- a/ucb/source/ucp/ext/ucpext_datasupplier.hxx +++ b/ucb/source/ucp/ext/ucpext_datasupplier.hxx diff --git a/ucb/source/ucp/ext/ucpext_provider.cxx b/ucb/source/ucp/ext/ucpext_provider.cxx index b41f36e424..b41f36e424 100644..100755 --- a/ucb/source/ucp/ext/ucpext_provider.cxx +++ b/ucb/source/ucp/ext/ucpext_provider.cxx diff --git a/ucb/source/ucp/ext/ucpext_provider.hxx b/ucb/source/ucp/ext/ucpext_provider.hxx index 0a0ea062ca..0a0ea062ca 100644..100755 --- a/ucb/source/ucp/ext/ucpext_provider.hxx +++ b/ucb/source/ucp/ext/ucpext_provider.hxx diff --git a/ucb/source/ucp/ext/ucpext_resultset.cxx b/ucb/source/ucp/ext/ucpext_resultset.cxx index 0d41422599..0d41422599 100644..100755 --- a/ucb/source/ucp/ext/ucpext_resultset.cxx +++ b/ucb/source/ucp/ext/ucpext_resultset.cxx diff --git a/ucb/source/ucp/ext/ucpext_resultset.hxx b/ucb/source/ucp/ext/ucpext_resultset.hxx index 6b2475618f..6b2475618f 100644..100755 --- a/ucb/source/ucp/ext/ucpext_resultset.hxx +++ b/ucb/source/ucp/ext/ucpext_resultset.hxx diff --git a/ucb/source/ucp/ext/ucpext_services.cxx b/ucb/source/ucp/ext/ucpext_services.cxx index 7310f9ed6d..2e1f26a317 100644..100755 --- a/ucb/source/ucp/ext/ucpext_services.cxx +++ b/ucb/source/ucp/ext/ucpext_services.cxx @@ -81,12 +81,6 @@ extern "C" } //------------------------------------------------------------------------------------------------------------------ - sal_Bool SAL_CALL component_writeInfo( void * pServiceManager, void * pRegistryKey ) - { - return ::cppu::component_writeInfoHelper( pServiceManager, pRegistryKey, ::ucb::ucp::ext::s_aServiceEntries ); - } - - //------------------------------------------------------------------------------------------------------------------ void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey ) { return ::cppu::component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey , ::ucb::ucp::ext::s_aServiceEntries ); diff --git a/ucb/source/ucp/file/bc.cxx b/ucb/source/ucp/file/bc.cxx index 7d63e9117b..7d63e9117b 100644..100755 --- a/ucb/source/ucp/file/bc.cxx +++ b/ucb/source/ucp/file/bc.cxx diff --git a/ucb/source/ucp/file/bc.hxx b/ucb/source/ucp/file/bc.hxx index 5b4298fb1d..5b4298fb1d 100644..100755 --- a/ucb/source/ucp/file/bc.hxx +++ b/ucb/source/ucp/file/bc.hxx diff --git a/ucb/source/ucp/file/exports2.dxp b/ucb/source/ucp/file/exports2.dxp index 6c42314f22..4804c8d0ae 100644..100755 --- a/ucb/source/ucp/file/exports2.dxp +++ b/ucb/source/ucp/file/exports2.dxp @@ -1,5 +1,4 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory _ZTIN3com3sun4star3ucb31InteractiveAugmentedIOExceptionE diff --git a/ucb/source/ucp/file/filcmd.cxx b/ucb/source/ucp/file/filcmd.cxx index c86608dbc3..c86608dbc3 100644..100755 --- a/ucb/source/ucp/file/filcmd.cxx +++ b/ucb/source/ucp/file/filcmd.cxx diff --git a/ucb/source/ucp/file/filcmd.hxx b/ucb/source/ucp/file/filcmd.hxx index 10285ac3bd..10285ac3bd 100644..100755 --- a/ucb/source/ucp/file/filcmd.hxx +++ b/ucb/source/ucp/file/filcmd.hxx diff --git a/ucb/source/ucp/file/filerror.hxx b/ucb/source/ucp/file/filerror.hxx index 67bc001a53..67bc001a53 100644..100755 --- a/ucb/source/ucp/file/filerror.hxx +++ b/ucb/source/ucp/file/filerror.hxx diff --git a/ucb/source/ucp/file/filglob.cxx b/ucb/source/ucp/file/filglob.cxx index 3b7af59ede..3b7af59ede 100644..100755 --- a/ucb/source/ucp/file/filglob.cxx +++ b/ucb/source/ucp/file/filglob.cxx diff --git a/ucb/source/ucp/file/filglob.hxx b/ucb/source/ucp/file/filglob.hxx index e4e745aa67..e4e745aa67 100644..100755 --- a/ucb/source/ucp/file/filglob.hxx +++ b/ucb/source/ucp/file/filglob.hxx diff --git a/ucb/source/ucp/file/filid.cxx b/ucb/source/ucp/file/filid.cxx index 3a4ba0797d..3a4ba0797d 100644..100755 --- a/ucb/source/ucp/file/filid.cxx +++ b/ucb/source/ucp/file/filid.cxx diff --git a/ucb/source/ucp/file/filid.hxx b/ucb/source/ucp/file/filid.hxx index bf3c4e5238..bf3c4e5238 100644..100755 --- a/ucb/source/ucp/file/filid.hxx +++ b/ucb/source/ucp/file/filid.hxx diff --git a/ucb/source/ucp/file/filinl.hxx b/ucb/source/ucp/file/filinl.hxx index dea296572b..dea296572b 100644..100755 --- a/ucb/source/ucp/file/filinl.hxx +++ b/ucb/source/ucp/file/filinl.hxx diff --git a/ucb/source/ucp/file/filinpstr.cxx b/ucb/source/ucp/file/filinpstr.cxx index 368a1299e0..368a1299e0 100644..100755 --- a/ucb/source/ucp/file/filinpstr.cxx +++ b/ucb/source/ucp/file/filinpstr.cxx diff --git a/ucb/source/ucp/file/filinpstr.hxx b/ucb/source/ucp/file/filinpstr.hxx index bdc35d8320..bdc35d8320 100644..100755 --- a/ucb/source/ucp/file/filinpstr.hxx +++ b/ucb/source/ucp/file/filinpstr.hxx diff --git a/ucb/source/ucp/file/filinsreq.cxx b/ucb/source/ucp/file/filinsreq.cxx index 6597713c35..6597713c35 100644..100755 --- a/ucb/source/ucp/file/filinsreq.cxx +++ b/ucb/source/ucp/file/filinsreq.cxx diff --git a/ucb/source/ucp/file/filinsreq.hxx b/ucb/source/ucp/file/filinsreq.hxx index 6b069cb3f0..6b069cb3f0 100644..100755 --- a/ucb/source/ucp/file/filinsreq.hxx +++ b/ucb/source/ucp/file/filinsreq.hxx diff --git a/ucb/source/ucp/file/filnot.cxx b/ucb/source/ucp/file/filnot.cxx index ea128f382d..ea128f382d 100644..100755 --- a/ucb/source/ucp/file/filnot.cxx +++ b/ucb/source/ucp/file/filnot.cxx diff --git a/ucb/source/ucp/file/filnot.hxx b/ucb/source/ucp/file/filnot.hxx index f5c5af9b22..f5c5af9b22 100644..100755 --- a/ucb/source/ucp/file/filnot.hxx +++ b/ucb/source/ucp/file/filnot.hxx diff --git a/ucb/source/ucp/file/filprp.cxx b/ucb/source/ucp/file/filprp.cxx index 1db269e4df..1db269e4df 100644..100755 --- a/ucb/source/ucp/file/filprp.cxx +++ b/ucb/source/ucp/file/filprp.cxx diff --git a/ucb/source/ucp/file/filprp.hxx b/ucb/source/ucp/file/filprp.hxx index 879a1c65af..879a1c65af 100644..100755 --- a/ucb/source/ucp/file/filprp.hxx +++ b/ucb/source/ucp/file/filprp.hxx diff --git a/ucb/source/ucp/file/filrec.cxx b/ucb/source/ucp/file/filrec.cxx index a4a07b02ca..a4a07b02ca 100644..100755 --- a/ucb/source/ucp/file/filrec.cxx +++ b/ucb/source/ucp/file/filrec.cxx diff --git a/ucb/source/ucp/file/filrec.hxx b/ucb/source/ucp/file/filrec.hxx index 432e005889..432e005889 100644..100755 --- a/ucb/source/ucp/file/filrec.hxx +++ b/ucb/source/ucp/file/filrec.hxx diff --git a/ucb/source/ucp/file/filrow.cxx b/ucb/source/ucp/file/filrow.cxx index deac6efdf6..deac6efdf6 100644..100755 --- a/ucb/source/ucp/file/filrow.cxx +++ b/ucb/source/ucp/file/filrow.cxx diff --git a/ucb/source/ucp/file/filrow.hxx b/ucb/source/ucp/file/filrow.hxx index baca86162e..baca86162e 100644..100755 --- a/ucb/source/ucp/file/filrow.hxx +++ b/ucb/source/ucp/file/filrow.hxx diff --git a/ucb/source/ucp/file/filrset.cxx b/ucb/source/ucp/file/filrset.cxx index 84a94bb2fd..84a94bb2fd 100644..100755 --- a/ucb/source/ucp/file/filrset.cxx +++ b/ucb/source/ucp/file/filrset.cxx diff --git a/ucb/source/ucp/file/filrset.hxx b/ucb/source/ucp/file/filrset.hxx index 83e17fe6ef..83e17fe6ef 100644..100755 --- a/ucb/source/ucp/file/filrset.hxx +++ b/ucb/source/ucp/file/filrset.hxx diff --git a/ucb/source/ucp/file/filstr.cxx b/ucb/source/ucp/file/filstr.cxx index 5a28a4c138..5a28a4c138 100644..100755 --- a/ucb/source/ucp/file/filstr.cxx +++ b/ucb/source/ucp/file/filstr.cxx diff --git a/ucb/source/ucp/file/filstr.hxx b/ucb/source/ucp/file/filstr.hxx index c846c73f7c..c846c73f7c 100644..100755 --- a/ucb/source/ucp/file/filstr.hxx +++ b/ucb/source/ucp/file/filstr.hxx diff --git a/ucb/source/ucp/file/filtask.cxx b/ucb/source/ucp/file/filtask.cxx index dd151311d8..dd151311d8 100644..100755 --- a/ucb/source/ucp/file/filtask.cxx +++ b/ucb/source/ucp/file/filtask.cxx diff --git a/ucb/source/ucp/file/filtask.hxx b/ucb/source/ucp/file/filtask.hxx index f34ef10c88..f34ef10c88 100644..100755 --- a/ucb/source/ucp/file/filtask.hxx +++ b/ucb/source/ucp/file/filtask.hxx diff --git a/ucb/source/ucp/file/makefile.mk b/ucb/source/ucp/file/makefile.mk index 8007a24923..3d97cb2387 100644..100755 --- a/ucb/source/ucp/file/makefile.mk +++ b/ucb/source/ucp/file/makefile.mk @@ -78,3 +78,11 @@ DEF1NAME=$(SHL1TARGET) .INCLUDE: target.mk + +ALLTAR : $(MISC)/ucpfile1.component + +$(MISC)/ucpfile1.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + ucpfile1.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt ucpfile1.component diff --git a/ucb/source/ucp/file/prov.cxx b/ucb/source/ucp/file/prov.cxx index 4f9d19bdb3..8e2d074dc4 100644..100755 --- a/ucb/source/ucp/file/prov.cxx +++ b/ucb/source/ucp/file/prov.cxx @@ -32,7 +32,6 @@ #include <osl/file.hxx> #include <osl/socket.h> #include <cppuhelper/factory.hxx> -#include <com/sun/star/registry/XRegistryKey.hpp> #include <com/sun/star/beans/PropertyAttribute.hpp> #include <com/sun/star/ucb/FileSystemNotation.hpp> #include <com/sun/star/beans/PropertyState.hpp> @@ -52,45 +51,6 @@ using namespace com::sun::star::ucb; using namespace com::sun::star::container; //========================================================================= -static sal_Bool writeInfo( void * pRegistryKey, - const rtl::OUString & rImplementationName, - Sequence< rtl::OUString > const & rServiceNames ) -{ - rtl::OUString aKeyName( RTL_CONSTASCII_USTRINGPARAM("/") ); - aKeyName += rImplementationName; - aKeyName += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); - - Reference< registry::XRegistryKey > xKey; - try - { - xKey = static_cast< registry::XRegistryKey * >( - pRegistryKey )->createKey( aKeyName ); - } - catch ( 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 ( registry::InvalidRegistryException const & ) - { - bSuccess = sal_False; - break; - } - } - return bSuccess; -} - -//========================================================================= extern "C" void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** ) { @@ -98,20 +58,6 @@ extern "C" void SAL_CALL component_getImplementationEnvironment( } //========================================================================= -extern "C" sal_Bool SAL_CALL component_writeInfo( void *, void * pRegistryKey ) -{ - return pRegistryKey && - - ////////////////////////////////////////////////////////////////////// - // File Content Provider. - ////////////////////////////////////////////////////////////////////// - - writeInfo( pRegistryKey, - fileaccess::shell::getImplementationName_static(), - fileaccess::shell::getSupportedServiceNames_static() ); -} - -//========================================================================= extern "C" void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * ) { diff --git a/ucb/source/ucp/file/prov.hxx b/ucb/source/ucp/file/prov.hxx index be5d9356e2..be5d9356e2 100644..100755 --- a/ucb/source/ucp/file/prov.hxx +++ b/ucb/source/ucp/file/prov.hxx diff --git a/ucb/source/ucp/file/shell.cxx b/ucb/source/ucp/file/shell.cxx index 415419d752..691f88363f 100644..100755 --- a/ucb/source/ucp/file/shell.cxx +++ b/ucb/source/ucp/file/shell.cxx @@ -1806,14 +1806,26 @@ shell::write( sal_Int32 CommandId, { aFile.close(); err = aFile.open( osl_File_OpenFlag_Write ); - } - if( err != osl::FileBase::E_None ) - { - installError( CommandId, - TASKHANDLING_NO_OPEN_FILE_FOR_OVERWRITE, - err ); - return sal_False; + if( err != osl::FileBase::E_None ) + { + installError( CommandId, + TASKHANDLING_NO_OPEN_FILE_FOR_OVERWRITE, + err ); + return sal_False; + } + + // the existing file was just opened and should be overwritten now, + // truncate it first + + err = aFile.setSize( 0 ); + if( err != osl::FileBase::E_None ) + { + installError( CommandId, + TASKHANDLING_FILESIZE_FOR_WRITE, + err ); + return sal_False; + } } } else @@ -1845,7 +1857,6 @@ shell::write( sal_Int32 CommandId, sal_Bool bSuccess = sal_True; - sal_uInt64 nTotalNumberOfBytes = 0; sal_uInt64 nWrittenBytes; sal_Int32 nReadBytes = 0, nRequestedBytes = 32768 /*32k*/; uno::Sequence< sal_Int8 > seq( nRequestedBytes ); @@ -1902,20 +1913,9 @@ shell::write( sal_Int32 CommandId, bSuccess = sal_False; break; } - - nTotalNumberOfBytes += nWrittenBytes; } } while( nReadBytes == nRequestedBytes ); - err = aFile.setSize( nTotalNumberOfBytes ); - if( err != osl::FileBase::E_None ) - { - installError( CommandId, - TASKHANDLING_FILESIZE_FOR_WRITE, - err ); - bSuccess = sal_False; - } - err = aFile.close(); if( err != osl::FileBase::E_None ) { diff --git a/ucb/source/ucp/file/shell.hxx b/ucb/source/ucp/file/shell.hxx index 32f9e5e7a8..32f9e5e7a8 100644..100755 --- a/ucb/source/ucp/file/shell.hxx +++ b/ucb/source/ucp/file/shell.hxx diff --git a/ucb/source/ucp/file/ucpfile.xml b/ucb/source/ucp/file/ucpfile.xml index 8d876fd9dd..8d876fd9dd 100644..100755 --- a/ucb/source/ucp/file/ucpfile.xml +++ b/ucb/source/ucp/file/ucpfile.xml diff --git a/ucb/source/ucp/file/ucpfile1.component b/ucb/source/ucp/file/ucpfile1.component new file mode 100755 index 0000000000..2803245122 --- /dev/null +++ b/ucb/source/ucp/file/ucpfile1.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.ucb.FileProvider"> + <service name="com.sun.star.ucb.FileContentProvider"/> + </implementation> +</component> diff --git a/ucb/source/ucp/ftp/curl.hxx b/ucb/source/ucp/ftp/curl.hxx index fdfeefeb63..fdfeefeb63 100644..100755 --- a/ucb/source/ucp/ftp/curl.hxx +++ b/ucb/source/ucp/ftp/curl.hxx diff --git a/ucb/source/ucp/ftp/ftpcfunc.cxx b/ucb/source/ucp/ftp/ftpcfunc.cxx index 6a7244c866..6a7244c866 100644..100755 --- a/ucb/source/ucp/ftp/ftpcfunc.cxx +++ b/ucb/source/ucp/ftp/ftpcfunc.cxx diff --git a/ucb/source/ucp/ftp/ftpcfunc.hxx b/ucb/source/ucp/ftp/ftpcfunc.hxx index 9d6427ab1d..9d6427ab1d 100644..100755 --- a/ucb/source/ucp/ftp/ftpcfunc.hxx +++ b/ucb/source/ucp/ftp/ftpcfunc.hxx diff --git a/ucb/source/ucp/ftp/ftpcontainer.hxx b/ucb/source/ucp/ftp/ftpcontainer.hxx index 8f0f3286b4..8f0f3286b4 100644..100755 --- a/ucb/source/ucp/ftp/ftpcontainer.hxx +++ b/ucb/source/ucp/ftp/ftpcontainer.hxx diff --git a/ucb/source/ucp/ftp/ftpcontent.cxx b/ucb/source/ucp/ftp/ftpcontent.cxx index 8a7f878623..8a7f878623 100644..100755 --- a/ucb/source/ucp/ftp/ftpcontent.cxx +++ b/ucb/source/ucp/ftp/ftpcontent.cxx diff --git a/ucb/source/ucp/ftp/ftpcontent.hxx b/ucb/source/ucp/ftp/ftpcontent.hxx index ee73d7f231..ee73d7f231 100644..100755 --- a/ucb/source/ucp/ftp/ftpcontent.hxx +++ b/ucb/source/ucp/ftp/ftpcontent.hxx diff --git a/ucb/source/ucp/ftp/ftpcontentcaps.cxx b/ucb/source/ucp/ftp/ftpcontentcaps.cxx index 73abe6cd45..73abe6cd45 100644..100755 --- a/ucb/source/ucp/ftp/ftpcontentcaps.cxx +++ b/ucb/source/ucp/ftp/ftpcontentcaps.cxx diff --git a/ucb/source/ucp/ftp/ftpcontentidentifier.cxx b/ucb/source/ucp/ftp/ftpcontentidentifier.cxx index 5c61a36937..5c61a36937 100644..100755 --- a/ucb/source/ucp/ftp/ftpcontentidentifier.cxx +++ b/ucb/source/ucp/ftp/ftpcontentidentifier.cxx diff --git a/ucb/source/ucp/ftp/ftpcontentidentifier.hxx b/ucb/source/ucp/ftp/ftpcontentidentifier.hxx index e4cb3d0778..e4cb3d0778 100644..100755 --- a/ucb/source/ucp/ftp/ftpcontentidentifier.hxx +++ b/ucb/source/ucp/ftp/ftpcontentidentifier.hxx diff --git a/ucb/source/ucp/ftp/ftpcontentprovider.cxx b/ucb/source/ucp/ftp/ftpcontentprovider.cxx index 3eef2d911d..3eef2d911d 100644..100755 --- a/ucb/source/ucp/ftp/ftpcontentprovider.cxx +++ b/ucb/source/ucp/ftp/ftpcontentprovider.cxx diff --git a/ucb/source/ucp/ftp/ftpcontentprovider.hxx b/ucb/source/ucp/ftp/ftpcontentprovider.hxx index 79d1fb83e1..79d1fb83e1 100644..100755 --- a/ucb/source/ucp/ftp/ftpcontentprovider.hxx +++ b/ucb/source/ucp/ftp/ftpcontentprovider.hxx diff --git a/ucb/source/ucp/ftp/ftpdirp.cxx b/ucb/source/ucp/ftp/ftpdirp.cxx index 4c8c2d5b1d..4c8c2d5b1d 100644..100755 --- a/ucb/source/ucp/ftp/ftpdirp.cxx +++ b/ucb/source/ucp/ftp/ftpdirp.cxx diff --git a/ucb/source/ucp/ftp/ftpdirp.hxx b/ucb/source/ucp/ftp/ftpdirp.hxx index b55727069c..b55727069c 100644..100755 --- a/ucb/source/ucp/ftp/ftpdirp.hxx +++ b/ucb/source/ucp/ftp/ftpdirp.hxx diff --git a/ucb/source/ucp/ftp/ftpdynresultset.cxx b/ucb/source/ucp/ftp/ftpdynresultset.cxx index 2e351f5023..2e351f5023 100644..100755 --- a/ucb/source/ucp/ftp/ftpdynresultset.cxx +++ b/ucb/source/ucp/ftp/ftpdynresultset.cxx diff --git a/ucb/source/ucp/ftp/ftpdynresultset.hxx b/ucb/source/ucp/ftp/ftpdynresultset.hxx index 5781aaf8e6..5781aaf8e6 100644..100755 --- a/ucb/source/ucp/ftp/ftpdynresultset.hxx +++ b/ucb/source/ucp/ftp/ftpdynresultset.hxx diff --git a/ucb/source/ucp/ftp/ftphandleprovider.hxx b/ucb/source/ucp/ftp/ftphandleprovider.hxx index b050601ea4..b050601ea4 100644..100755 --- a/ucb/source/ucp/ftp/ftphandleprovider.hxx +++ b/ucb/source/ucp/ftp/ftphandleprovider.hxx diff --git a/ucb/source/ucp/ftp/ftpinpstr.cxx b/ucb/source/ucp/ftp/ftpinpstr.cxx index c1f7558d45..c1f7558d45 100644..100755 --- a/ucb/source/ucp/ftp/ftpinpstr.cxx +++ b/ucb/source/ucp/ftp/ftpinpstr.cxx diff --git a/ucb/source/ucp/ftp/ftpinpstr.hxx b/ucb/source/ucp/ftp/ftpinpstr.hxx index cb6f4c8887..cb6f4c8887 100644..100755 --- a/ucb/source/ucp/ftp/ftpinpstr.hxx +++ b/ucb/source/ucp/ftp/ftpinpstr.hxx diff --git a/ucb/source/ucp/ftp/ftpintreq.cxx b/ucb/source/ucp/ftp/ftpintreq.cxx index ac668c4541..ac668c4541 100644..100755 --- a/ucb/source/ucp/ftp/ftpintreq.cxx +++ b/ucb/source/ucp/ftp/ftpintreq.cxx diff --git a/ucb/source/ucp/ftp/ftpintreq.hxx b/ucb/source/ucp/ftp/ftpintreq.hxx index 69b5f69850..69b5f69850 100644..100755 --- a/ucb/source/ucp/ftp/ftpintreq.hxx +++ b/ucb/source/ucp/ftp/ftpintreq.hxx diff --git a/ucb/source/ucp/ftp/ftploaderthread.cxx b/ucb/source/ucp/ftp/ftploaderthread.cxx index 100782b218..100782b218 100644..100755 --- a/ucb/source/ucp/ftp/ftploaderthread.cxx +++ b/ucb/source/ucp/ftp/ftploaderthread.cxx diff --git a/ucb/source/ucp/ftp/ftploaderthread.hxx b/ucb/source/ucp/ftp/ftploaderthread.hxx index 2ece821b42..2ece821b42 100644..100755 --- a/ucb/source/ucp/ftp/ftploaderthread.hxx +++ b/ucb/source/ucp/ftp/ftploaderthread.hxx diff --git a/ucb/source/ucp/ftp/ftpresultsetI.cxx b/ucb/source/ucp/ftp/ftpresultsetI.cxx index 056a87ed61..056a87ed61 100644..100755 --- a/ucb/source/ucp/ftp/ftpresultsetI.cxx +++ b/ucb/source/ucp/ftp/ftpresultsetI.cxx diff --git a/ucb/source/ucp/ftp/ftpresultsetI.hxx b/ucb/source/ucp/ftp/ftpresultsetI.hxx index a0ea618a6a..a0ea618a6a 100644..100755 --- a/ucb/source/ucp/ftp/ftpresultsetI.hxx +++ b/ucb/source/ucp/ftp/ftpresultsetI.hxx diff --git a/ucb/source/ucp/ftp/ftpresultsetbase.cxx b/ucb/source/ucp/ftp/ftpresultsetbase.cxx index 210d7d4167..210d7d4167 100644..100755 --- a/ucb/source/ucp/ftp/ftpresultsetbase.cxx +++ b/ucb/source/ucp/ftp/ftpresultsetbase.cxx diff --git a/ucb/source/ucp/ftp/ftpresultsetbase.hxx b/ucb/source/ucp/ftp/ftpresultsetbase.hxx index f257dc96a2..f257dc96a2 100644..100755 --- a/ucb/source/ucp/ftp/ftpresultsetbase.hxx +++ b/ucb/source/ucp/ftp/ftpresultsetbase.hxx diff --git a/ucb/source/ucp/ftp/ftpresultsetfactory.hxx b/ucb/source/ucp/ftp/ftpresultsetfactory.hxx index a6b9066532..a6b9066532 100644..100755 --- a/ucb/source/ucp/ftp/ftpresultsetfactory.hxx +++ b/ucb/source/ucp/ftp/ftpresultsetfactory.hxx diff --git a/ucb/source/ucp/ftp/ftpservices.cxx b/ucb/source/ucp/ftp/ftpservices.cxx index c229ad8928..86ccaaf142 100644..100755 --- a/ucb/source/ucp/ftp/ftpservices.cxx +++ b/ucb/source/ucp/ftp/ftpservices.cxx @@ -37,45 +37,6 @@ using namespace com::sun::star; using namespace ftp; //========================================================================= -static sal_Bool writeInfo( void * pRegistryKey, - const rtl::OUString & rImplementationName, - uno::Sequence< rtl::OUString > const & rServiceNames ) -{ - rtl::OUString aKeyName( RTL_CONSTASCII_USTRINGPARAM("/") ); - aKeyName += rImplementationName; - aKeyName += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); - - uno::Reference< registry::XRegistryKey > xKey; - try - { - xKey = static_cast< registry::XRegistryKey * >( - pRegistryKey )->createKey( aKeyName ); - } - catch ( 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 ( registry::InvalidRegistryException const & ) - { - bSuccess = sal_False; - break; - } - } - return bSuccess; -} - -//========================================================================= extern "C" void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) { @@ -83,21 +44,6 @@ extern "C" void SAL_CALL component_getImplementationEnvironment( } //========================================================================= -extern "C" sal_Bool SAL_CALL component_writeInfo( - void * /*pServiceManager*/, void * pRegistryKey ) -{ - return pRegistryKey && - - ////////////////////////////////////////////////////////////////////// - // FTP Content Provider. - ////////////////////////////////////////////////////////////////////// - - writeInfo( pRegistryKey, - FTPContentProvider::getImplementationName_Static(), - FTPContentProvider::getSupportedServiceNames_Static() ); -} - -//========================================================================= extern "C" void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ ) { diff --git a/ucb/source/ucp/ftp/ftpstrcont.hxx b/ucb/source/ucp/ftp/ftpstrcont.hxx index 1afadd3cd9..1afadd3cd9 100644..100755 --- a/ucb/source/ucp/ftp/ftpstrcont.hxx +++ b/ucb/source/ucp/ftp/ftpstrcont.hxx diff --git a/ucb/source/ucp/ftp/ftpurl.cxx b/ucb/source/ucp/ftp/ftpurl.cxx index 376c77205b..376c77205b 100644..100755 --- a/ucb/source/ucp/ftp/ftpurl.cxx +++ b/ucb/source/ucp/ftp/ftpurl.cxx diff --git a/ucb/source/ucp/ftp/ftpurl.hxx b/ucb/source/ucp/ftp/ftpurl.hxx index bc94e8ed57..bc94e8ed57 100644..100755 --- a/ucb/source/ucp/ftp/ftpurl.hxx +++ b/ucb/source/ucp/ftp/ftpurl.hxx diff --git a/ucb/source/ucp/ftp/makefile.mk b/ucb/source/ucp/ftp/makefile.mk index a0f1410040..6f55fed25f 100644..100755 --- a/ucb/source/ucp/ftp/makefile.mk +++ b/ucb/source/ucp/ftp/makefile.mk @@ -92,15 +92,10 @@ DEF1NAME=$(SHL1TARGET) .ENDIF # L10N_framework .INCLUDE: target.mk +ALLTAR : $(MISC)/ucpftp1.component - - - - - - - - - - - +$(MISC)/ucpftp1.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + ucpftp1.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt ucpftp1.component diff --git a/ucb/source/ucp/ftp/test.cxx b/ucb/source/ucp/ftp/test.cxx index e3d89e43fc..e3d89e43fc 100644..100755 --- a/ucb/source/ucp/ftp/test.cxx +++ b/ucb/source/ucp/ftp/test.cxx diff --git a/ucb/source/ucp/ftp/test.py b/ucb/source/ucp/ftp/test.py index 931d9a3ec8..931d9a3ec8 100644..100755 --- a/ucb/source/ucp/ftp/test.py +++ b/ucb/source/ucp/ftp/test.py diff --git a/ucb/source/ucp/ftp/test_activedatasink.cxx b/ucb/source/ucp/ftp/test_activedatasink.cxx index 29798c671b..29798c671b 100644..100755 --- a/ucb/source/ucp/ftp/test_activedatasink.cxx +++ b/ucb/source/ucp/ftp/test_activedatasink.cxx diff --git a/ucb/source/ucp/ftp/test_activedatasink.hxx b/ucb/source/ucp/ftp/test_activedatasink.hxx index b9930babcb..b9930babcb 100644..100755 --- a/ucb/source/ucp/ftp/test_activedatasink.hxx +++ b/ucb/source/ucp/ftp/test_activedatasink.hxx diff --git a/ucb/source/ucp/ftp/test_ftpurl.cxx b/ucb/source/ucp/ftp/test_ftpurl.cxx index 8cb80dc97c..8cb80dc97c 100644..100755 --- a/ucb/source/ucp/ftp/test_ftpurl.cxx +++ b/ucb/source/ucp/ftp/test_ftpurl.cxx diff --git a/ucb/source/ucp/ftp/test_ftpurl.hxx b/ucb/source/ucp/ftp/test_ftpurl.hxx index 1f7356a690..1f7356a690 100644..100755 --- a/ucb/source/ucp/ftp/test_ftpurl.hxx +++ b/ucb/source/ucp/ftp/test_ftpurl.hxx diff --git a/ucb/source/ucp/ftp/test_interactionhandler.hxx b/ucb/source/ucp/ftp/test_interactionhandler.hxx index 6a0f4f6013..6a0f4f6013 100644..100755 --- a/ucb/source/ucp/ftp/test_interactionhandler.hxx +++ b/ucb/source/ucp/ftp/test_interactionhandler.hxx diff --git a/ucb/source/ucp/ftp/test_multiservicefac.cxx b/ucb/source/ucp/ftp/test_multiservicefac.cxx index 82452f316b..82452f316b 100644..100755 --- a/ucb/source/ucp/ftp/test_multiservicefac.cxx +++ b/ucb/source/ucp/ftp/test_multiservicefac.cxx diff --git a/ucb/source/ucp/ftp/test_multiservicefac.hxx b/ucb/source/ucp/ftp/test_multiservicefac.hxx index 7947962946..7947962946 100644..100755 --- a/ucb/source/ucp/ftp/test_multiservicefac.hxx +++ b/ucb/source/ucp/ftp/test_multiservicefac.hxx diff --git a/ucb/source/ucp/ftp/ucpftp.xml b/ucb/source/ucp/ftp/ucpftp.xml index ce9bfe35f9..ce9bfe35f9 100644..100755 --- a/ucb/source/ucp/ftp/ucpftp.xml +++ b/ucb/source/ucp/ftp/ucpftp.xml diff --git a/ucb/source/ucp/ftp/ucpftp1.component b/ucb/source/ucp/ftp/ucpftp1.component new file mode 100755 index 0000000000..fa4cfe6e75 --- /dev/null +++ b/ucb/source/ucp/ftp/ucpftp1.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.FTPContentProvider"> + <service name="com.sun.star.ucb.FTPContentProvider"/> + </implementation> +</component> diff --git a/ucb/source/ucp/gio/gio_content.cxx b/ucb/source/ucp/gio/gio_content.cxx index 612ea7fff4..612ea7fff4 100644..100755 --- a/ucb/source/ucp/gio/gio_content.cxx +++ b/ucb/source/ucp/gio/gio_content.cxx diff --git a/ucb/source/ucp/gio/gio_content.hxx b/ucb/source/ucp/gio/gio_content.hxx index 9e6ed77602..9e6ed77602 100644..100755 --- a/ucb/source/ucp/gio/gio_content.hxx +++ b/ucb/source/ucp/gio/gio_content.hxx diff --git a/ucb/source/ucp/gio/gio_datasupplier.cxx b/ucb/source/ucp/gio/gio_datasupplier.cxx index 93c66947c7..93c66947c7 100644..100755 --- a/ucb/source/ucp/gio/gio_datasupplier.cxx +++ b/ucb/source/ucp/gio/gio_datasupplier.cxx diff --git a/ucb/source/ucp/gio/gio_datasupplier.hxx b/ucb/source/ucp/gio/gio_datasupplier.hxx index b68a24f704..b68a24f704 100644..100755 --- a/ucb/source/ucp/gio/gio_datasupplier.hxx +++ b/ucb/source/ucp/gio/gio_datasupplier.hxx diff --git a/ucb/source/ucp/gio/gio_inputstream.cxx b/ucb/source/ucp/gio/gio_inputstream.cxx index 3519ccc581..3519ccc581 100644..100755 --- a/ucb/source/ucp/gio/gio_inputstream.cxx +++ b/ucb/source/ucp/gio/gio_inputstream.cxx diff --git a/ucb/source/ucp/gio/gio_inputstream.hxx b/ucb/source/ucp/gio/gio_inputstream.hxx index 154d803602..154d803602 100644..100755 --- a/ucb/source/ucp/gio/gio_inputstream.hxx +++ b/ucb/source/ucp/gio/gio_inputstream.hxx diff --git a/ucb/source/ucp/gio/gio_mount.cxx b/ucb/source/ucp/gio/gio_mount.cxx index fb721303dd..fb721303dd 100644..100755 --- a/ucb/source/ucp/gio/gio_mount.cxx +++ b/ucb/source/ucp/gio/gio_mount.cxx diff --git a/ucb/source/ucp/gio/gio_mount.hxx b/ucb/source/ucp/gio/gio_mount.hxx index 31d1a749ce..31d1a749ce 100644..100755 --- a/ucb/source/ucp/gio/gio_mount.hxx +++ b/ucb/source/ucp/gio/gio_mount.hxx diff --git a/ucb/source/ucp/gio/gio_outputstream.cxx b/ucb/source/ucp/gio/gio_outputstream.cxx index 492126e385..492126e385 100644..100755 --- a/ucb/source/ucp/gio/gio_outputstream.cxx +++ b/ucb/source/ucp/gio/gio_outputstream.cxx diff --git a/ucb/source/ucp/gio/gio_outputstream.hxx b/ucb/source/ucp/gio/gio_outputstream.hxx index f330e401a1..f330e401a1 100644..100755 --- a/ucb/source/ucp/gio/gio_outputstream.hxx +++ b/ucb/source/ucp/gio/gio_outputstream.hxx diff --git a/ucb/source/ucp/gio/gio_provider.cxx b/ucb/source/ucp/gio/gio_provider.cxx index 951a895440..3b9b4fc39b 100644..100755 --- a/ucb/source/ucp/gio/gio_provider.cxx +++ b/ucb/source/ucp/gio/gio_provider.cxx @@ -103,55 +103,12 @@ ONE_INSTANCE_SERVICE_FACTORY_IMPL( ContentProvider ); } -static sal_Bool writeInfo( void *pRegistryKey, - const rtl::OUString &rImplementationName, uno::Sequence< rtl::OUString > const &rServiceNames ) -{ - rtl::OUString aKeyName( RTL_CONSTASCII_USTRINGPARAM("/") ); - aKeyName += rImplementationName; - aKeyName += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); - - uno::Reference< registry::XRegistryKey > xKey; - try - { - xKey = static_cast< registry::XRegistryKey * > (pRegistryKey )->createKey( aKeyName ); - } - catch ( 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 ( registry::InvalidRegistryException const & ) - { - bSuccess = sal_False; - break; - } - } - return bSuccess; -} - extern "C" void SAL_CALL component_getImplementationEnvironment( const sal_Char **ppEnvTypeName, uno_Environment **) { *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -extern "C" sal_Bool SAL_CALL component_writeInfo( void *, void *pRegistryKey ) -{ - return pRegistryKey && - writeInfo( pRegistryKey, - ::gio::ContentProvider::getImplementationName_Static(), - ::gio::ContentProvider::getSupportedServiceNames_Static() ); -} - extern "C" void * SAL_CALL component_getFactory( const sal_Char *pImplName, void *pServiceManager, void * ) { diff --git a/ucb/source/ucp/gio/gio_provider.hxx b/ucb/source/ucp/gio/gio_provider.hxx index 03cd826080..03cd826080 100644..100755 --- a/ucb/source/ucp/gio/gio_provider.hxx +++ b/ucb/source/ucp/gio/gio_provider.hxx diff --git a/ucb/source/ucp/gio/gio_resultset.cxx b/ucb/source/ucp/gio/gio_resultset.cxx index a0f9505182..a0f9505182 100644..100755 --- a/ucb/source/ucp/gio/gio_resultset.cxx +++ b/ucb/source/ucp/gio/gio_resultset.cxx diff --git a/ucb/source/ucp/gio/gio_resultset.hxx b/ucb/source/ucp/gio/gio_resultset.hxx index ca32febd40..ca32febd40 100644..100755 --- a/ucb/source/ucp/gio/gio_resultset.hxx +++ b/ucb/source/ucp/gio/gio_resultset.hxx diff --git a/ucb/source/ucp/gio/gio_seekable.cxx b/ucb/source/ucp/gio/gio_seekable.cxx index e3c9a0ae33..e3c9a0ae33 100644..100755 --- a/ucb/source/ucp/gio/gio_seekable.cxx +++ b/ucb/source/ucp/gio/gio_seekable.cxx diff --git a/ucb/source/ucp/gio/gio_seekable.hxx b/ucb/source/ucp/gio/gio_seekable.hxx index e41b37ee95..e41b37ee95 100644..100755 --- a/ucb/source/ucp/gio/gio_seekable.hxx +++ b/ucb/source/ucp/gio/gio_seekable.hxx diff --git a/ucb/source/ucp/gio/makefile.mk b/ucb/source/ucp/gio/makefile.mk index 86b32fbc07..4cca611c7e 100644..100755 --- a/ucb/source/ucp/gio/makefile.mk +++ b/ucb/source/ucp/gio/makefile.mk @@ -37,8 +37,6 @@ NO_BSYMBOLIC=TRUE .INCLUDE: settings.mk .IF "$(L10N_framework)"=="" -UNIXTEXT=$(MISC)/$(TARGET)-ucd.txt - .IF "$(ENABLE_GIO)"!="" COMPILER_WARN_ALL=TRUE PKGCONFIG_MODULES=gio-2.0 @@ -79,3 +77,11 @@ SHL1VERSIONMAP=$(SOLARENV)/src/component.map .ENDIF # L10N_framework .INCLUDE: target.mk + +ALLTAR : $(MISC)/ucpgio.component + +$(MISC)/ucpgio.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + ucpgio.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt ucpgio.component diff --git a/ucb/source/ucp/gio/ucpgio-ucd.txt b/ucb/source/ucp/gio/ucpgio-ucd.txt deleted file mode 100644 index ce7657fa73..0000000000 --- a/ucb/source/ucp/gio/ucpgio-ucd.txt +++ /dev/null @@ -1,6 +0,0 @@ -[ComponentDescriptor] -ImplementationName=com.sun.star.comp.GIOContentProvider -ComponentName=ucpgio1.uno.so -LoaderName=com.sun.star.loader.SharedLibrary -[SupportedServices] -com.sun.star.ucb.GIOContentProvider diff --git a/ucb/source/ucp/gio/ucpgio.component b/ucb/source/ucp/gio/ucpgio.component new file mode 100755 index 0000000000..caa8fc361f --- /dev/null +++ b/ucb/source/ucp/gio/ucpgio.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.GIOContentProvider"> + <service name="com.sun.star.ucb.GIOContentProvider"/> + </implementation> +</component> diff --git a/ucb/source/ucp/gio/ucpgio.xml b/ucb/source/ucp/gio/ucpgio.xml index c77118476b..c77118476b 100644..100755 --- a/ucb/source/ucp/gio/ucpgio.xml +++ b/ucb/source/ucp/gio/ucpgio.xml diff --git a/ucb/source/ucp/gvfs/gvfs_content.cxx b/ucb/source/ucp/gvfs/gvfs_content.cxx index ce73cef471..ce73cef471 100644..100755 --- a/ucb/source/ucp/gvfs/gvfs_content.cxx +++ b/ucb/source/ucp/gvfs/gvfs_content.cxx diff --git a/ucb/source/ucp/gvfs/gvfs_content.hxx b/ucb/source/ucp/gvfs/gvfs_content.hxx index cb59674a6a..cb59674a6a 100644..100755 --- a/ucb/source/ucp/gvfs/gvfs_content.hxx +++ b/ucb/source/ucp/gvfs/gvfs_content.hxx diff --git a/ucb/source/ucp/gvfs/gvfs_directory.cxx b/ucb/source/ucp/gvfs/gvfs_directory.cxx index fe2763e515..fe2763e515 100644..100755 --- a/ucb/source/ucp/gvfs/gvfs_directory.cxx +++ b/ucb/source/ucp/gvfs/gvfs_directory.cxx diff --git a/ucb/source/ucp/gvfs/gvfs_directory.hxx b/ucb/source/ucp/gvfs/gvfs_directory.hxx index f5ba511f26..f5ba511f26 100644..100755 --- a/ucb/source/ucp/gvfs/gvfs_directory.hxx +++ b/ucb/source/ucp/gvfs/gvfs_directory.hxx diff --git a/ucb/source/ucp/gvfs/gvfs_provider.cxx b/ucb/source/ucp/gvfs/gvfs_provider.cxx index 86c9bda2d2..d6fdcf194b 100644..100755 --- a/ucb/source/ucp/gvfs/gvfs_provider.cxx +++ b/ucb/source/ucp/gvfs/gvfs_provider.cxx @@ -144,42 +144,6 @@ ContentProvider::queryContent( //============================ shlib entry points ============================================= - -// cut and paste verbatim from webdav (that sucks). -static sal_Bool -writeInfo( void *pRegistryKey, - const rtl::OUString &rImplementationName, - uno::Sequence< rtl::OUString > const &rServiceNames ) -{ - rtl::OUString aKeyName( RTL_CONSTASCII_USTRINGPARAM("/") ); - aKeyName += rImplementationName; - aKeyName += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); - - uno::Reference< registry::XRegistryKey > xKey; - try { - xKey = static_cast< registry::XRegistryKey * > - (pRegistryKey )->createKey( aKeyName ); - } - catch ( 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 ( registry::InvalidRegistryException const & ) { - bSuccess = sal_False; - break; - } - } - return bSuccess; -} - extern "C" void SAL_CALL component_getImplementationEnvironment( const sal_Char **ppEnvTypeName, uno_Environment **/*ppEnv*/ ) @@ -187,15 +151,6 @@ component_getImplementationEnvironment( const sal_Char **ppEnvTypeName, *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -extern "C" sal_Bool SAL_CALL -component_writeInfo( void */*pServiceManager*/, - void *pRegistryKey ) -{ - return pRegistryKey && - writeInfo( pRegistryKey, - ::gvfs::ContentProvider::getImplementationName_Static(), - ::gvfs::ContentProvider::getSupportedServiceNames_Static() ); -} extern "C" void * SAL_CALL component_getFactory( const sal_Char *pImplName, void *pServiceManager, diff --git a/ucb/source/ucp/gvfs/gvfs_provider.hxx b/ucb/source/ucp/gvfs/gvfs_provider.hxx index 884dd648c5..884dd648c5 100644..100755 --- a/ucb/source/ucp/gvfs/gvfs_provider.hxx +++ b/ucb/source/ucp/gvfs/gvfs_provider.hxx diff --git a/ucb/source/ucp/gvfs/gvfs_stream.cxx b/ucb/source/ucp/gvfs/gvfs_stream.cxx index 9ead4bc64e..9ead4bc64e 100644..100755 --- a/ucb/source/ucp/gvfs/gvfs_stream.cxx +++ b/ucb/source/ucp/gvfs/gvfs_stream.cxx diff --git a/ucb/source/ucp/gvfs/gvfs_stream.hxx b/ucb/source/ucp/gvfs/gvfs_stream.hxx index 6a20606f10..6a20606f10 100644..100755 --- a/ucb/source/ucp/gvfs/gvfs_stream.hxx +++ b/ucb/source/ucp/gvfs/gvfs_stream.hxx diff --git a/ucb/source/ucp/gvfs/makefile.mk b/ucb/source/ucp/gvfs/makefile.mk index a0e8a0bda3..87fcca87cf 100644..100755 --- a/ucb/source/ucp/gvfs/makefile.mk +++ b/ucb/source/ucp/gvfs/makefile.mk @@ -37,8 +37,6 @@ NO_BSYMBOLIC=TRUE .INCLUDE: settings.mk .IF "$(L10N_framework)"=="" -UNIXTEXT=$(MISC)/$(TARGET)-ucd.txt - .IF "$(ENABLE_GNOMEVFS)"!="" COMPILER_WARN_ALL=TRUE PKGCONFIG_MODULES=gnome-vfs-2.0 @@ -84,3 +82,10 @@ SHL1VERSIONMAP=$(SOLARENV)/src/component.map .INCLUDE: target.mk +ALLTAR : $(MISC)/ucpgvfs.component + +$(MISC)/ucpgvfs.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + ucpgvfs.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt ucpgvfs.component diff --git a/ucb/source/ucp/gvfs/ucpgvfs-ucd.txt b/ucb/source/ucp/gvfs/ucpgvfs-ucd.txt deleted file mode 100644 index e9ecce6eff..0000000000 --- a/ucb/source/ucp/gvfs/ucpgvfs-ucd.txt +++ /dev/null @@ -1,6 +0,0 @@ -[ComponentDescriptor] -ImplementationName=com.sun.star.comp.GnomeVFSContentProvider -ComponentName=ucpgvfs1.uno.so -LoaderName=com.sun.star.loader.SharedLibrary -[SupportedServices] -com.sun.star.ucb.GnomeVFSContentProvider diff --git a/ucb/source/ucp/gvfs/ucpgvfs.component b/ucb/source/ucp/gvfs/ucpgvfs.component new file mode 100755 index 0000000000..cec3e4d1e2 --- /dev/null +++ b/ucb/source/ucp/gvfs/ucpgvfs.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.GnomeVFSContentProvider"> + <service name="com.sun.star.ucb.GnomeVFSContentProvider"/> + </implementation> +</component> diff --git a/ucb/source/ucp/gvfs/ucpgvfs.xml b/ucb/source/ucp/gvfs/ucpgvfs.xml index dc761d6a22..dc761d6a22 100644..100755 --- a/ucb/source/ucp/gvfs/ucpgvfs.xml +++ b/ucb/source/ucp/gvfs/ucpgvfs.xml diff --git a/ucb/source/ucp/hierarchy/dynamicresultset.cxx b/ucb/source/ucp/hierarchy/dynamicresultset.cxx index 6b03e98e78..6b03e98e78 100644..100755 --- a/ucb/source/ucp/hierarchy/dynamicresultset.cxx +++ b/ucb/source/ucp/hierarchy/dynamicresultset.cxx diff --git a/ucb/source/ucp/hierarchy/dynamicresultset.hxx b/ucb/source/ucp/hierarchy/dynamicresultset.hxx index 1775801b21..1775801b21 100644..100755 --- a/ucb/source/ucp/hierarchy/dynamicresultset.hxx +++ b/ucb/source/ucp/hierarchy/dynamicresultset.hxx diff --git a/ucb/source/ucp/hierarchy/hierarchycontent.cxx b/ucb/source/ucp/hierarchy/hierarchycontent.cxx index 42322a745c..42322a745c 100644..100755 --- a/ucb/source/ucp/hierarchy/hierarchycontent.cxx +++ b/ucb/source/ucp/hierarchy/hierarchycontent.cxx diff --git a/ucb/source/ucp/hierarchy/hierarchycontent.hxx b/ucb/source/ucp/hierarchy/hierarchycontent.hxx index e9ad79cd28..e9ad79cd28 100644..100755 --- a/ucb/source/ucp/hierarchy/hierarchycontent.hxx +++ b/ucb/source/ucp/hierarchy/hierarchycontent.hxx diff --git a/ucb/source/ucp/hierarchy/hierarchycontentcaps.cxx b/ucb/source/ucp/hierarchy/hierarchycontentcaps.cxx index f5d0912abd..f5d0912abd 100644..100755 --- a/ucb/source/ucp/hierarchy/hierarchycontentcaps.cxx +++ b/ucb/source/ucp/hierarchy/hierarchycontentcaps.cxx diff --git a/ucb/source/ucp/hierarchy/hierarchydata.cxx b/ucb/source/ucp/hierarchy/hierarchydata.cxx index 20acffd829..20acffd829 100644..100755 --- a/ucb/source/ucp/hierarchy/hierarchydata.cxx +++ b/ucb/source/ucp/hierarchy/hierarchydata.cxx diff --git a/ucb/source/ucp/hierarchy/hierarchydata.hxx b/ucb/source/ucp/hierarchy/hierarchydata.hxx index a20db23348..a20db23348 100644..100755 --- a/ucb/source/ucp/hierarchy/hierarchydata.hxx +++ b/ucb/source/ucp/hierarchy/hierarchydata.hxx diff --git a/ucb/source/ucp/hierarchy/hierarchydatasource.cxx b/ucb/source/ucp/hierarchy/hierarchydatasource.cxx index d4b9967682..d4b9967682 100644..100755 --- a/ucb/source/ucp/hierarchy/hierarchydatasource.cxx +++ b/ucb/source/ucp/hierarchy/hierarchydatasource.cxx diff --git a/ucb/source/ucp/hierarchy/hierarchydatasource.hxx b/ucb/source/ucp/hierarchy/hierarchydatasource.hxx index f221c110d8..f221c110d8 100644..100755 --- a/ucb/source/ucp/hierarchy/hierarchydatasource.hxx +++ b/ucb/source/ucp/hierarchy/hierarchydatasource.hxx diff --git a/ucb/source/ucp/hierarchy/hierarchydatasupplier.cxx b/ucb/source/ucp/hierarchy/hierarchydatasupplier.cxx index 456b59ad87..456b59ad87 100644..100755 --- a/ucb/source/ucp/hierarchy/hierarchydatasupplier.cxx +++ b/ucb/source/ucp/hierarchy/hierarchydatasupplier.cxx diff --git a/ucb/source/ucp/hierarchy/hierarchydatasupplier.hxx b/ucb/source/ucp/hierarchy/hierarchydatasupplier.hxx index 504ba68fc5..504ba68fc5 100644..100755 --- a/ucb/source/ucp/hierarchy/hierarchydatasupplier.hxx +++ b/ucb/source/ucp/hierarchy/hierarchydatasupplier.hxx diff --git a/ucb/source/ucp/hierarchy/hierarchyprovider.cxx b/ucb/source/ucp/hierarchy/hierarchyprovider.cxx index e040babf18..e040babf18 100644..100755 --- a/ucb/source/ucp/hierarchy/hierarchyprovider.cxx +++ b/ucb/source/ucp/hierarchy/hierarchyprovider.cxx diff --git a/ucb/source/ucp/hierarchy/hierarchyprovider.hxx b/ucb/source/ucp/hierarchy/hierarchyprovider.hxx index e714e6af8c..e714e6af8c 100644..100755 --- a/ucb/source/ucp/hierarchy/hierarchyprovider.hxx +++ b/ucb/source/ucp/hierarchy/hierarchyprovider.hxx diff --git a/ucb/source/ucp/hierarchy/hierarchyservices.cxx b/ucb/source/ucp/hierarchy/hierarchyservices.cxx index 6247b68566..132fc55217 100644..100755 --- a/ucb/source/ucp/hierarchy/hierarchyservices.cxx +++ b/ucb/source/ucp/hierarchy/hierarchyservices.cxx @@ -30,7 +30,6 @@ #include "precompiled_ucb.hxx" #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/lang/XSingleServiceFactory.hpp> -#include <com/sun/star/registry/XRegistryKey.hpp> #include "hierarchyprovider.hxx" #include "hierarchydatasource.hxx" @@ -38,45 +37,6 @@ using namespace com::sun::star; using namespace hierarchy_ucp; //========================================================================= -static sal_Bool writeInfo( void * pRegistryKey, - const rtl::OUString & rImplementationName, - uno::Sequence< rtl::OUString > const & rServiceNames ) -{ - rtl::OUString aKeyName( RTL_CONSTASCII_USTRINGPARAM("/") ); - aKeyName += rImplementationName; - aKeyName += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); - - uno::Reference< registry::XRegistryKey > xKey; - try - { - xKey = static_cast< registry::XRegistryKey * >( - pRegistryKey )->createKey( aKeyName ); - } - catch ( 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 ( registry::InvalidRegistryException const & ) - { - bSuccess = sal_False; - break; - } - } - return bSuccess; -} - -//========================================================================= extern "C" void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) { @@ -84,29 +44,6 @@ extern "C" void SAL_CALL component_getImplementationEnvironment( } //========================================================================= -extern "C" sal_Bool SAL_CALL component_writeInfo( - void * /*pServiceManager*/, void * pRegistryKey ) -{ - return pRegistryKey && - - ////////////////////////////////////////////////////////////////////// - // Hierarchy Content Provider. - ////////////////////////////////////////////////////////////////////// - - writeInfo( pRegistryKey, - HierarchyContentProvider::getImplementationName_Static(), - HierarchyContentProvider::getSupportedServiceNames_Static() ) && - - ////////////////////////////////////////////////////////////////////// - // Hierarchy Data Source. - ////////////////////////////////////////////////////////////////////// - - writeInfo( pRegistryKey, - HierarchyDataSource::getImplementationName_Static(), - HierarchyDataSource::getSupportedServiceNames_Static() ); -} - -//========================================================================= extern "C" void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ ) { diff --git a/ucb/source/ucp/hierarchy/hierarchyuri.cxx b/ucb/source/ucp/hierarchy/hierarchyuri.cxx index 9891d8c96e..9891d8c96e 100644..100755 --- a/ucb/source/ucp/hierarchy/hierarchyuri.cxx +++ b/ucb/source/ucp/hierarchy/hierarchyuri.cxx diff --git a/ucb/source/ucp/hierarchy/hierarchyuri.hxx b/ucb/source/ucp/hierarchy/hierarchyuri.hxx index a1c9265697..a1c9265697 100644..100755 --- a/ucb/source/ucp/hierarchy/hierarchyuri.hxx +++ b/ucb/source/ucp/hierarchy/hierarchyuri.hxx diff --git a/ucb/source/ucp/hierarchy/makefile.mk b/ucb/source/ucp/hierarchy/makefile.mk index 00b481b5e7..9263faa24b 100644..100755 --- a/ucb/source/ucp/hierarchy/makefile.mk +++ b/ucb/source/ucp/hierarchy/makefile.mk @@ -82,3 +82,11 @@ DEF1NAME=$(SHL1TARGET) .ENDIF # L10N_framework .INCLUDE: target.mk + +ALLTAR : $(MISC)/ucphier1.component + +$(MISC)/ucphier1.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + ucphier1.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt ucphier1.component diff --git a/ucb/source/ucp/hierarchy/ucphier.xml b/ucb/source/ucp/hierarchy/ucphier.xml index 7fd75b1d5e..7fd75b1d5e 100644..100755 --- a/ucb/source/ucp/hierarchy/ucphier.xml +++ b/ucb/source/ucp/hierarchy/ucphier.xml diff --git a/ucb/source/ucp/hierarchy/ucphier1.component b/ucb/source/ucp/hierarchy/ucphier1.component new file mode 100755 index 0000000000..5483187d86 --- /dev/null +++ b/ucb/source/ucp/hierarchy/ucphier1.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.ucb.HierarchyContentProvider"> + <service name="com.sun.star.ucb.HierarchyContentProvider"/> + </implementation> + <implementation name="com.sun.star.comp.ucb.HierarchyDataSource"> + <service name="com.sun.star.ucb.DefaultHierarchyDataSource"/> + <service name="com.sun.star.ucb.HierarchyDataSource"/> + </implementation> +</component> diff --git a/ucb/source/ucp/inc/urihelper.hxx b/ucb/source/ucp/inc/urihelper.hxx index bc0e17e2a6..bc0e17e2a6 100644..100755 --- a/ucb/source/ucp/inc/urihelper.hxx +++ b/ucb/source/ucp/inc/urihelper.hxx diff --git a/ucb/source/ucp/odma/makefile.mk b/ucb/source/ucp/odma/makefile.mk index 643b4fa278..643b4fa278 100644..100755 --- a/ucb/source/ucp/odma/makefile.mk +++ b/ucb/source/ucp/odma/makefile.mk diff --git a/ucb/source/ucp/odma/odma.h b/ucb/source/ucp/odma/odma.h index a46c38f7d9..a46c38f7d9 100644..100755 --- a/ucb/source/ucp/odma/odma.h +++ b/ucb/source/ucp/odma/odma.h diff --git a/ucb/source/ucp/odma/odma_content.cxx b/ucb/source/ucp/odma/odma_content.cxx index e578ebd78f..e578ebd78f 100644..100755 --- a/ucb/source/ucp/odma/odma_content.cxx +++ b/ucb/source/ucp/odma/odma_content.cxx diff --git a/ucb/source/ucp/odma/odma_content.hxx b/ucb/source/ucp/odma/odma_content.hxx index a0b567ec30..a0b567ec30 100644..100755 --- a/ucb/source/ucp/odma/odma_content.hxx +++ b/ucb/source/ucp/odma/odma_content.hxx diff --git a/ucb/source/ucp/odma/odma_contentcaps.cxx b/ucb/source/ucp/odma/odma_contentcaps.cxx index b745670c61..b745670c61 100644..100755 --- a/ucb/source/ucp/odma/odma_contentcaps.cxx +++ b/ucb/source/ucp/odma/odma_contentcaps.cxx diff --git a/ucb/source/ucp/odma/odma_contentprops.hxx b/ucb/source/ucp/odma/odma_contentprops.hxx index a4b65726a7..a4b65726a7 100644..100755 --- a/ucb/source/ucp/odma/odma_contentprops.hxx +++ b/ucb/source/ucp/odma/odma_contentprops.hxx diff --git a/ucb/source/ucp/odma/odma_datasupplier.cxx b/ucb/source/ucp/odma/odma_datasupplier.cxx index b7154c9988..b7154c9988 100644..100755 --- a/ucb/source/ucp/odma/odma_datasupplier.cxx +++ b/ucb/source/ucp/odma/odma_datasupplier.cxx diff --git a/ucb/source/ucp/odma/odma_datasupplier.hxx b/ucb/source/ucp/odma/odma_datasupplier.hxx index 5d64fede70..5d64fede70 100644..100755 --- a/ucb/source/ucp/odma/odma_datasupplier.hxx +++ b/ucb/source/ucp/odma/odma_datasupplier.hxx diff --git a/ucb/source/ucp/odma/odma_inputstream.cxx b/ucb/source/ucp/odma/odma_inputstream.cxx index 81cc385d1b..81cc385d1b 100644..100755 --- a/ucb/source/ucp/odma/odma_inputstream.cxx +++ b/ucb/source/ucp/odma/odma_inputstream.cxx diff --git a/ucb/source/ucp/odma/odma_inputstream.hxx b/ucb/source/ucp/odma/odma_inputstream.hxx index 39ffd440c1..39ffd440c1 100644..100755 --- a/ucb/source/ucp/odma/odma_inputstream.hxx +++ b/ucb/source/ucp/odma/odma_inputstream.hxx diff --git a/ucb/source/ucp/odma/odma_lib.cxx b/ucb/source/ucp/odma/odma_lib.cxx index 0038a17edb..e83962feef 100644..100755 --- a/ucb/source/ucp/odma/odma_lib.cxx +++ b/ucb/source/ucp/odma/odma_lib.cxx @@ -80,9 +80,6 @@ namespace odma return bLoaded; ::rtl::OUString sPath; - #ifdef WIN - sPath = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ODMA.DLL")); - #endif #ifdef WNT sPath = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ODMA32.DLL")); #endif diff --git a/ucb/source/ucp/odma/odma_lib.hxx b/ucb/source/ucp/odma/odma_lib.hxx index 72ee5162ab..72ee5162ab 100644..100755 --- a/ucb/source/ucp/odma/odma_lib.hxx +++ b/ucb/source/ucp/odma/odma_lib.hxx diff --git a/ucb/source/ucp/odma/odma_main.cxx b/ucb/source/ucp/odma/odma_main.cxx index 974c95035b..974c95035b 100644..100755 --- a/ucb/source/ucp/odma/odma_main.cxx +++ b/ucb/source/ucp/odma/odma_main.cxx diff --git a/ucb/source/ucp/odma/odma_provider.cxx b/ucb/source/ucp/odma/odma_provider.cxx index b52d7df268..b52d7df268 100644..100755 --- a/ucb/source/ucp/odma/odma_provider.cxx +++ b/ucb/source/ucp/odma/odma_provider.cxx diff --git a/ucb/source/ucp/odma/odma_provider.hxx b/ucb/source/ucp/odma/odma_provider.hxx index ce0e3d179f..ce0e3d179f 100644..100755 --- a/ucb/source/ucp/odma/odma_provider.hxx +++ b/ucb/source/ucp/odma/odma_provider.hxx diff --git a/ucb/source/ucp/odma/odma_resultset.cxx b/ucb/source/ucp/odma/odma_resultset.cxx index d176d881c6..d176d881c6 100644..100755 --- a/ucb/source/ucp/odma/odma_resultset.cxx +++ b/ucb/source/ucp/odma/odma_resultset.cxx diff --git a/ucb/source/ucp/odma/odma_resultset.hxx b/ucb/source/ucp/odma/odma_resultset.hxx index d0b32a5541..d0b32a5541 100644..100755 --- a/ucb/source/ucp/odma/odma_resultset.hxx +++ b/ucb/source/ucp/odma/odma_resultset.hxx diff --git a/ucb/source/ucp/odma/odma_services.cxx b/ucb/source/ucp/odma/odma_services.cxx index 83eabab41d..d6c5106533 100644..100755 --- a/ucb/source/ucp/odma/odma_services.cxx +++ b/ucb/source/ucp/odma/odma_services.cxx @@ -39,45 +39,6 @@ using namespace com::sun::star::lang; using namespace com::sun::star::registry; //========================================================================= -static sal_Bool writeInfo( void * pRegistryKey, - const rtl::OUString & rImplementationName, - Sequence< rtl::OUString > const & rServiceNames ) -{ - rtl::OUString aKeyName( RTL_CONSTASCII_USTRINGPARAM("/") ); - aKeyName += rImplementationName; - aKeyName += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); - - Reference< XRegistryKey > xKey; - try - { - xKey = static_cast< XRegistryKey * >( - pRegistryKey )->createKey( aKeyName ); - } - catch ( InvalidRegistryException const & ) - { - } - - if ( !xKey.is() ) - return sal_False; - - sal_Bool bSuccess = sal_True; - - for ( sal_Int32 n = 0; n < rServiceNames.getLength(); ++n ) - { - try - { - xKey->createKey( rServiceNames[ n ] ); - } - catch ( InvalidRegistryException const & ) - { - bSuccess = sal_False; - break; - } - } - return bSuccess; -} - -//========================================================================= extern "C" void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) { diff --git a/ucb/source/ucp/odma/ucpodma.xml b/ucb/source/ucp/odma/ucpodma.xml index 390245e41a..390245e41a 100644..100755 --- a/ucb/source/ucp/odma/ucpodma.xml +++ b/ucb/source/ucp/odma/ucpodma.xml diff --git a/ucb/source/ucp/package/makefile.mk b/ucb/source/ucp/package/makefile.mk index a8cdf74307..b78150aed2 100644..100755 --- a/ucb/source/ucp/package/makefile.mk +++ b/ucb/source/ucp/package/makefile.mk @@ -87,3 +87,11 @@ DEF1NAME=$(SHL1TARGET) .ENDIF # L10N_framework .INCLUDE: target.mk + +ALLTAR : $(MISC)/ucppkg1.component + +$(MISC)/ucppkg1.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + ucppkg1.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt ucppkg1.component diff --git a/ucb/source/ucp/package/pkgcontent.cxx b/ucb/source/ucp/package/pkgcontent.cxx index 8242315b02..8242315b02 100644..100755 --- a/ucb/source/ucp/package/pkgcontent.cxx +++ b/ucb/source/ucp/package/pkgcontent.cxx diff --git a/ucb/source/ucp/package/pkgcontent.hxx b/ucb/source/ucp/package/pkgcontent.hxx index e93726daa6..e93726daa6 100644..100755 --- a/ucb/source/ucp/package/pkgcontent.hxx +++ b/ucb/source/ucp/package/pkgcontent.hxx diff --git a/ucb/source/ucp/package/pkgcontentcaps.cxx b/ucb/source/ucp/package/pkgcontentcaps.cxx index 276e47fa50..276e47fa50 100644..100755 --- a/ucb/source/ucp/package/pkgcontentcaps.cxx +++ b/ucb/source/ucp/package/pkgcontentcaps.cxx diff --git a/ucb/source/ucp/package/pkgdatasupplier.cxx b/ucb/source/ucp/package/pkgdatasupplier.cxx index 631eeabfbd..631eeabfbd 100644..100755 --- a/ucb/source/ucp/package/pkgdatasupplier.cxx +++ b/ucb/source/ucp/package/pkgdatasupplier.cxx diff --git a/ucb/source/ucp/package/pkgdatasupplier.hxx b/ucb/source/ucp/package/pkgdatasupplier.hxx index a888275854..a888275854 100644..100755 --- a/ucb/source/ucp/package/pkgdatasupplier.hxx +++ b/ucb/source/ucp/package/pkgdatasupplier.hxx diff --git a/ucb/source/ucp/package/pkgprovider.cxx b/ucb/source/ucp/package/pkgprovider.cxx index ba9a13b112..ba9a13b112 100644..100755 --- a/ucb/source/ucp/package/pkgprovider.cxx +++ b/ucb/source/ucp/package/pkgprovider.cxx diff --git a/ucb/source/ucp/package/pkgprovider.hxx b/ucb/source/ucp/package/pkgprovider.hxx index e02d1b25d2..e02d1b25d2 100644..100755 --- a/ucb/source/ucp/package/pkgprovider.hxx +++ b/ucb/source/ucp/package/pkgprovider.hxx diff --git a/ucb/source/ucp/package/pkgresultset.cxx b/ucb/source/ucp/package/pkgresultset.cxx index 0f19ac5d6d..0f19ac5d6d 100644..100755 --- a/ucb/source/ucp/package/pkgresultset.cxx +++ b/ucb/source/ucp/package/pkgresultset.cxx diff --git a/ucb/source/ucp/package/pkgresultset.hxx b/ucb/source/ucp/package/pkgresultset.hxx index 40115f9c43..40115f9c43 100644..100755 --- a/ucb/source/ucp/package/pkgresultset.hxx +++ b/ucb/source/ucp/package/pkgresultset.hxx diff --git a/ucb/source/ucp/package/pkgservices.cxx b/ucb/source/ucp/package/pkgservices.cxx index 559a9fbcb4..36a43dee8f 100644..100755 --- a/ucb/source/ucp/package/pkgservices.cxx +++ b/ucb/source/ucp/package/pkgservices.cxx @@ -35,50 +35,6 @@ using namespace com::sun::star; -namespace { - -//========================================================================= -sal_Bool writeInfo( - void * pRegistryKey, - const rtl::OUString & rImplementationName, - uno::Sequence< rtl::OUString > const & rServiceNames ) -{ - rtl::OUString aKeyName( RTL_CONSTASCII_USTRINGPARAM("/") ); - aKeyName += rImplementationName; - aKeyName += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); - - uno::Reference< registry::XRegistryKey > xKey; - try - { - xKey = static_cast< registry::XRegistryKey * >( - pRegistryKey )->createKey( aKeyName ); - } - catch ( 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 ( registry::InvalidRegistryException const & ) - { - bSuccess = sal_False; - break; - } - } - return bSuccess; -} - -} // namespace - //========================================================================= extern "C" void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) @@ -87,21 +43,6 @@ extern "C" void SAL_CALL component_getImplementationEnvironment( } //========================================================================= -extern "C" sal_Bool SAL_CALL component_writeInfo( - void * /*pServiceManager*/, void * pRegistryKey ) -{ - return pRegistryKey && - - ////////////////////////////////////////////////////////////////////// - // Write info into registry. - ////////////////////////////////////////////////////////////////////// - - writeInfo( pRegistryKey, - ::package_ucp::ContentProvider::getImplementationName_Static(), - ::package_ucp::ContentProvider::getSupportedServiceNames_Static() ); -} - -//========================================================================= extern "C" void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ ) { diff --git a/ucb/source/ucp/package/pkguri.cxx b/ucb/source/ucp/package/pkguri.cxx index 67d1c13d0d..67d1c13d0d 100644..100755 --- a/ucb/source/ucp/package/pkguri.cxx +++ b/ucb/source/ucp/package/pkguri.cxx diff --git a/ucb/source/ucp/package/pkguri.hxx b/ucb/source/ucp/package/pkguri.hxx index 0adb48074f..0adb48074f 100644..100755 --- a/ucb/source/ucp/package/pkguri.hxx +++ b/ucb/source/ucp/package/pkguri.hxx diff --git a/ucb/source/ucp/package/ucppkg.xml b/ucb/source/ucp/package/ucppkg.xml index 5d23c3cb68..5d23c3cb68 100644..100755 --- a/ucb/source/ucp/package/ucppkg.xml +++ b/ucb/source/ucp/package/ucppkg.xml diff --git a/ucb/source/ucp/package/ucppkg1.component b/ucb/source/ucp/package/ucppkg1.component new file mode 100755 index 0000000000..a2e2418b56 --- /dev/null +++ b/ucb/source/ucp/package/ucppkg1.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.ucb.PackageContentProvider"> + <service name="com.sun.star.ucb.PackageContentProvider"/> + </implementation> +</component> diff --git a/ucb/source/ucp/tdoc/makefile.mk b/ucb/source/ucp/tdoc/makefile.mk index 83e9599eed..82c76b34b2 100644..100755 --- a/ucb/source/ucp/tdoc/makefile.mk +++ b/ucb/source/ucp/tdoc/makefile.mk @@ -92,3 +92,11 @@ DEF1NAME=$(SHL1TARGET) .INCLUDE: target.mk + +ALLTAR : $(MISC)/ucptdoc1.component + +$(MISC)/ucptdoc1.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + ucptdoc1.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt ucptdoc1.component diff --git a/ucb/source/ucp/tdoc/tdoc_content.cxx b/ucb/source/ucp/tdoc/tdoc_content.cxx index 8ffdcb0116..8ffdcb0116 100644..100755 --- a/ucb/source/ucp/tdoc/tdoc_content.cxx +++ b/ucb/source/ucp/tdoc/tdoc_content.cxx diff --git a/ucb/source/ucp/tdoc/tdoc_content.hxx b/ucb/source/ucp/tdoc/tdoc_content.hxx index 5877c0d783..5877c0d783 100644..100755 --- a/ucb/source/ucp/tdoc/tdoc_content.hxx +++ b/ucb/source/ucp/tdoc/tdoc_content.hxx diff --git a/ucb/source/ucp/tdoc/tdoc_contentcaps.cxx b/ucb/source/ucp/tdoc/tdoc_contentcaps.cxx index dbc61176f4..dbc61176f4 100644..100755 --- a/ucb/source/ucp/tdoc/tdoc_contentcaps.cxx +++ b/ucb/source/ucp/tdoc/tdoc_contentcaps.cxx diff --git a/ucb/source/ucp/tdoc/tdoc_datasupplier.cxx b/ucb/source/ucp/tdoc/tdoc_datasupplier.cxx index bed9e49bcb..bed9e49bcb 100644..100755 --- a/ucb/source/ucp/tdoc/tdoc_datasupplier.cxx +++ b/ucb/source/ucp/tdoc/tdoc_datasupplier.cxx diff --git a/ucb/source/ucp/tdoc/tdoc_datasupplier.hxx b/ucb/source/ucp/tdoc/tdoc_datasupplier.hxx index 403f372ac1..403f372ac1 100644..100755 --- a/ucb/source/ucp/tdoc/tdoc_datasupplier.hxx +++ b/ucb/source/ucp/tdoc/tdoc_datasupplier.hxx diff --git a/ucb/source/ucp/tdoc/tdoc_docmgr.cxx b/ucb/source/ucp/tdoc/tdoc_docmgr.cxx index be75f490ff..ae46e4a739 100644..100755 --- a/ucb/source/ucp/tdoc/tdoc_docmgr.cxx +++ b/ucb/source/ucp/tdoc/tdoc_docmgr.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * 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 @@ -28,14 +28,11 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_ucb.hxx" + /************************************************************************** TODO ************************************************************************** - - filter unwanted models notified by global document event broadcaster - - help documents - - others, which I don't know yet - *************************************************************************/ #include "osl/diagnose.h" @@ -45,12 +42,13 @@ #include "comphelper/namedvaluecollection.hxx" #include "comphelper/documentinfo.hxx" +#include "com/sun/star/awt/XTopWindow.hpp" #include "com/sun/star/beans/XPropertySet.hpp" #include "com/sun/star/container/XEnumerationAccess.hpp" +#include "com/sun/star/document/XStorageBasedDocument.hpp" #include "com/sun/star/frame/XStorable.hpp" #include "com/sun/star/lang/DisposedException.hpp" -#include "com/sun/star/document/XStorageBasedDocument.hpp" -#include "com/sun/star/awt/XTopWindow.hpp" +#include "com/sun/star/util/XCloseBroadcaster.hpp" #include "tdoc_docmgr.hxx" @@ -61,6 +59,53 @@ using ::comphelper::DocumentInfo; //========================================================================= //========================================================================= // +// OfficeDocumentsCloseListener Implementation. +// +//========================================================================= +//========================================================================= + +//========================================================================= +// +// util::XCloseListener +// +//========================================================================= + +// virtual +void SAL_CALL OfficeDocumentsManager::OfficeDocumentsCloseListener::queryClosing( + const lang::EventObject& /*Source*/, sal_Bool /*GetsOwnership*/ ) + throw ( util::CloseVetoException, + uno::RuntimeException ) +{ +} + +//========================================================================= +void SAL_CALL OfficeDocumentsManager::OfficeDocumentsCloseListener::notifyClosing( + const lang::EventObject& Source ) + throw ( uno::RuntimeException ) +{ + document::EventObject aDocEvent; + aDocEvent.Source = Source.Source; + aDocEvent.EventName = rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( "OfficeDocumentsListener::notifyClosing" ) ); + m_pManager->notifyEvent( aDocEvent ); +} + +//========================================================================= +// +// lang::XEventListener (base of util::XCloseListener) +// +//========================================================================= + +// virtual +void SAL_CALL OfficeDocumentsManager::OfficeDocumentsCloseListener::disposing( + const lang::EventObject& /*Source*/ ) + throw ( uno::RuntimeException ) +{ +} + +//========================================================================= +//========================================================================= +// // OfficeDocumentsManager Implementation. // //========================================================================= @@ -71,7 +116,8 @@ OfficeDocumentsManager::OfficeDocumentsManager( OfficeDocumentsEventListener * pDocEventListener ) : m_xSMgr( xSMgr ), m_xDocEvtNotifier( createDocumentEventNotifier( xSMgr ) ), - m_pDocEventListener( pDocEventListener ) + m_pDocEventListener( pDocEventListener ), + m_xDocCloseListener( new OfficeDocumentsCloseListener( this ) ) { if ( m_xDocEvtNotifier.is() ) { @@ -189,10 +235,19 @@ void SAL_CALL OfficeDocumentsManager::notifyEvent( OSL_ENSURE( xStorage.is(), "Got no document storage!" ); rtl:: OUString aDocId = getDocumentId( Event.Source ); - rtl:: OUString aTitle = DocumentInfo::getDocumentTitle( uno::Reference< frame::XModel >( Event.Source, uno::UNO_QUERY ) ); + rtl:: OUString aTitle = DocumentInfo::getDocumentTitle( + uno::Reference< frame::XModel >( Event.Source, uno::UNO_QUERY ) ); m_aDocs[ aDocId ] = StorageInfo( aTitle, xStorage, xModel ); + uno::Reference< util::XCloseBroadcaster > xCloseBroadcaster( + Event.Source, uno::UNO_QUERY ); + OSL_ENSURE( xCloseBroadcaster.is(), + "OnLoadFinished/OnCreate event: got no close broadcaster!" ); + + if ( xCloseBroadcaster.is() ) + xCloseBroadcaster->addCloseListener( m_xDocCloseListener ); + // Propagate document closure. OSL_ENSURE( m_pDocEventListener, "OnLoadFinished/OnCreate event: no owner for insert event propagation!" ); @@ -203,12 +258,18 @@ void SAL_CALL OfficeDocumentsManager::notifyEvent( } } else if ( Event.EventName.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM( "OnUnload" ) ) ) + RTL_CONSTASCII_STRINGPARAM( "OfficeDocumentsListener::notifyClosing" ) ) ) { if ( isOfficeDocument( Event.Source ) ) { // Document has been closed (unloaded) + // #163732# - Official event "OnUnload" does not work here. Event + // gets fired to early. Other OnUnload listeners called after this + // listener may still need TDOC access to the document. Remove the + // document from TDOC docs list on XCloseListener::notifyClosing. + // See OfficeDocumentsManager::OfficeDocumentsListener::notifyClosing. + osl::MutexGuard aGuard( m_aMtx ); uno::Reference< frame::XModel > @@ -229,8 +290,6 @@ void SAL_CALL OfficeDocumentsManager::notifyEvent( rtl::OUString aDocId( (*it).first ); m_pDocEventListener->notifyDocumentClosed( aDocId ); } - - break; } ++it; @@ -239,8 +298,18 @@ void SAL_CALL OfficeDocumentsManager::notifyEvent( OSL_ENSURE( it != m_aDocs.end(), "OnUnload event notified for unknown document!" ); - if( it != m_aDocs.end() ) + if ( it != m_aDocs.end() ) + { + uno::Reference< util::XCloseBroadcaster > xCloseBroadcaster( + Event.Source, uno::UNO_QUERY ); + OSL_ENSURE( xCloseBroadcaster.is(), + "OnUnload event: got no XCloseBroadcaster from XModel" ); + + if ( xCloseBroadcaster.is() ) + xCloseBroadcaster->removeCloseListener( m_xDocCloseListener ); + m_aDocs.erase( it ); + } } } else if ( Event.EventName.equalsAsciiL( @@ -308,7 +377,7 @@ void SAL_CALL OfficeDocumentsManager::notifyEvent( (*it).second.xStorage = xStorage; // Adjust title. - (*it).second.aTitle = DocumentInfo::getDocumentTitle( uno::Reference< frame::XModel >( Event.Source, uno::UNO_QUERY ) ); + (*it).second.aTitle = DocumentInfo::getDocumentTitle( xModel ); break; } ++it; @@ -335,7 +404,7 @@ void SAL_CALL OfficeDocumentsManager::notifyEvent( if ( (*it).second.xModel == xModel ) { // Adjust title. - rtl:: OUString aTitle = DocumentInfo::getDocumentTitle( uno::Reference< frame::XModel >( Event.Source, uno::UNO_QUERY ) ); + rtl:: OUString aTitle = DocumentInfo::getDocumentTitle( xModel ); (*it).second.aTitle = aTitle; // Adjust storage. @@ -476,6 +545,14 @@ void OfficeDocumentsManager::buildDocumentsList() m_aDocs[ aDocId ] = StorageInfo( aTitle, xStorage, xModel ); + + uno::Reference< util::XCloseBroadcaster > xCloseBroadcaster( + xModel, uno::UNO_QUERY ); + OSL_ENSURE( xCloseBroadcaster.is(), + "buildDocumentsList: got no close broadcaster!" ); + + if ( xCloseBroadcaster.is() ) + xCloseBroadcaster->addCloseListener( m_xDocCloseListener ); } } } diff --git a/ucb/source/ucp/tdoc/tdoc_docmgr.hxx b/ucb/source/ucp/tdoc/tdoc_docmgr.hxx index cc1f3d3bac..e1e478bfcc 100644..100755 --- a/ucb/source/ucp/tdoc/tdoc_docmgr.hxx +++ b/ucb/source/ucp/tdoc/tdoc_docmgr.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * 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 @@ -40,6 +40,7 @@ #include "com/sun/star/embed/XStorage.hpp" #include "com/sun/star/frame/XModel.hpp" #include "com/sun/star/frame/XModuleManager.hpp" +#include "com/sun/star/util/XCloseListener.hpp" namespace tdoc_ucp { @@ -89,6 +90,33 @@ namespace tdoc_ucp { class OfficeDocumentsManager : public cppu::WeakImplHelper1< com::sun::star::document::XEventListener > { + class OfficeDocumentsCloseListener : + public cppu::WeakImplHelper1< com::sun::star::util::XCloseListener > + + { + public: + OfficeDocumentsCloseListener( OfficeDocumentsManager * pMgr ) + : m_pManager( pMgr ) {}; + + // util::XCloseListener + virtual void SAL_CALL queryClosing( + const ::com::sun::star::lang::EventObject& Source, + ::sal_Bool GetsOwnership ) + throw (::com::sun::star::util::CloseVetoException, + ::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL notifyClosing( + const ::com::sun::star::lang::EventObject& Source ) + throw (::com::sun::star::uno::RuntimeException); + + // lang::XEventListener (base of util::XCloseListener) + virtual void SAL_CALL disposing( + const com::sun::star::lang::EventObject & Source ) + throw ( com::sun::star::uno::RuntimeException ); + private: + OfficeDocumentsManager * m_pManager; + }; + public: OfficeDocumentsManager( const com::sun::star::uno::Reference< @@ -132,7 +160,9 @@ namespace tdoc_ucp { createDocumentEventNotifier( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rXSMgr ); + void buildDocumentsList(); + bool isOfficeDocument( const com::sun::star::uno::Reference< @@ -164,9 +194,11 @@ namespace tdoc_ucp { com::sun::star::uno::Reference< com::sun::star::document::XEventBroadcaster > m_xDocEvtNotifier; com::sun::star::uno::Reference< - com::sun::star::frame::XModuleManager > m_xModuleMgr; + com::sun::star::frame::XModuleManager > m_xModuleMgr; DocumentList m_aDocs; OfficeDocumentsEventListener * m_pDocEventListener; + com::sun::star::uno::Reference< + com::sun::star::util::XCloseListener > m_xDocCloseListener; }; } // namespace tdoc_ucp diff --git a/ucb/source/ucp/tdoc/tdoc_documentcontentfactory.cxx b/ucb/source/ucp/tdoc/tdoc_documentcontentfactory.cxx index fb99ca1811..fb99ca1811 100644..100755 --- a/ucb/source/ucp/tdoc/tdoc_documentcontentfactory.cxx +++ b/ucb/source/ucp/tdoc/tdoc_documentcontentfactory.cxx diff --git a/ucb/source/ucp/tdoc/tdoc_documentcontentfactory.hxx b/ucb/source/ucp/tdoc/tdoc_documentcontentfactory.hxx index 314820e9c8..314820e9c8 100644..100755 --- a/ucb/source/ucp/tdoc/tdoc_documentcontentfactory.hxx +++ b/ucb/source/ucp/tdoc/tdoc_documentcontentfactory.hxx diff --git a/ucb/source/ucp/tdoc/tdoc_passwordrequest.cxx b/ucb/source/ucp/tdoc/tdoc_passwordrequest.cxx index f3b340de04..f3b340de04 100644..100755 --- a/ucb/source/ucp/tdoc/tdoc_passwordrequest.cxx +++ b/ucb/source/ucp/tdoc/tdoc_passwordrequest.cxx diff --git a/ucb/source/ucp/tdoc/tdoc_passwordrequest.hxx b/ucb/source/ucp/tdoc/tdoc_passwordrequest.hxx index 1c4c49e56c..1c4c49e56c 100644..100755 --- a/ucb/source/ucp/tdoc/tdoc_passwordrequest.hxx +++ b/ucb/source/ucp/tdoc/tdoc_passwordrequest.hxx diff --git a/ucb/source/ucp/tdoc/tdoc_provider.cxx b/ucb/source/ucp/tdoc/tdoc_provider.cxx index cd06aabd82..cd06aabd82 100644..100755 --- a/ucb/source/ucp/tdoc/tdoc_provider.cxx +++ b/ucb/source/ucp/tdoc/tdoc_provider.cxx diff --git a/ucb/source/ucp/tdoc/tdoc_provider.hxx b/ucb/source/ucp/tdoc/tdoc_provider.hxx index 46c67081bf..46c67081bf 100644..100755 --- a/ucb/source/ucp/tdoc/tdoc_provider.hxx +++ b/ucb/source/ucp/tdoc/tdoc_provider.hxx diff --git a/ucb/source/ucp/tdoc/tdoc_resultset.cxx b/ucb/source/ucp/tdoc/tdoc_resultset.cxx index a584fec66c..a584fec66c 100644..100755 --- a/ucb/source/ucp/tdoc/tdoc_resultset.cxx +++ b/ucb/source/ucp/tdoc/tdoc_resultset.cxx diff --git a/ucb/source/ucp/tdoc/tdoc_resultset.hxx b/ucb/source/ucp/tdoc/tdoc_resultset.hxx index 7370709bd6..7370709bd6 100644..100755 --- a/ucb/source/ucp/tdoc/tdoc_resultset.hxx +++ b/ucb/source/ucp/tdoc/tdoc_resultset.hxx diff --git a/ucb/source/ucp/tdoc/tdoc_services.cxx b/ucb/source/ucp/tdoc/tdoc_services.cxx index 29fcd29625..46f11b0353 100644..100755 --- a/ucb/source/ucp/tdoc/tdoc_services.cxx +++ b/ucb/source/ucp/tdoc/tdoc_services.cxx @@ -40,45 +40,6 @@ using namespace com::sun::star; using namespace tdoc_ucp; //========================================================================= -static sal_Bool writeInfo( void * pRegistryKey, - const rtl::OUString & rImplementationName, - uno::Sequence< rtl::OUString > const & rServiceNames ) -{ - rtl::OUString aKeyName( RTL_CONSTASCII_USTRINGPARAM("/") ); - aKeyName += rImplementationName; - aKeyName += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); - - uno::Reference< registry::XRegistryKey > xKey; - try - { - xKey = static_cast< registry::XRegistryKey * >( - pRegistryKey )->createKey( aKeyName ); - } - catch ( 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 ( registry::InvalidRegistryException const & ) - { - bSuccess = sal_False; - break; - } - } - return bSuccess; -} - -//========================================================================= extern "C" void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) { @@ -86,29 +47,6 @@ extern "C" void SAL_CALL component_getImplementationEnvironment( } //========================================================================= -extern "C" sal_Bool SAL_CALL component_writeInfo( - void * /*pServiceManager*/, void * pRegistryKey ) -{ - return pRegistryKey && - - ////////////////////////////////////////////////////////////////////// - // Transient Documents Content Provider. - ////////////////////////////////////////////////////////////////////// - - writeInfo( pRegistryKey, - ContentProvider::getImplementationName_Static(), - ContentProvider::getSupportedServiceNames_Static() ) && - - ////////////////////////////////////////////////////////////////////// - // Transient Documents Document Content Factory. - ////////////////////////////////////////////////////////////////////// - - writeInfo( pRegistryKey, - DocumentContentFactory::getImplementationName_Static(), - DocumentContentFactory::getSupportedServiceNames_Static() ); -} - -//========================================================================= extern "C" void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ ) { diff --git a/ucb/source/ucp/tdoc/tdoc_stgelems.cxx b/ucb/source/ucp/tdoc/tdoc_stgelems.cxx index f9b65886f0..f9b65886f0 100644..100755 --- a/ucb/source/ucp/tdoc/tdoc_stgelems.cxx +++ b/ucb/source/ucp/tdoc/tdoc_stgelems.cxx diff --git a/ucb/source/ucp/tdoc/tdoc_stgelems.hxx b/ucb/source/ucp/tdoc/tdoc_stgelems.hxx index 05be27b5dc..05be27b5dc 100644..100755 --- a/ucb/source/ucp/tdoc/tdoc_stgelems.hxx +++ b/ucb/source/ucp/tdoc/tdoc_stgelems.hxx diff --git a/ucb/source/ucp/tdoc/tdoc_storage.cxx b/ucb/source/ucp/tdoc/tdoc_storage.cxx index c94b2f2209..c94b2f2209 100644..100755 --- a/ucb/source/ucp/tdoc/tdoc_storage.cxx +++ b/ucb/source/ucp/tdoc/tdoc_storage.cxx diff --git a/ucb/source/ucp/tdoc/tdoc_storage.hxx b/ucb/source/ucp/tdoc/tdoc_storage.hxx index 3249e04606..3249e04606 100644..100755 --- a/ucb/source/ucp/tdoc/tdoc_storage.hxx +++ b/ucb/source/ucp/tdoc/tdoc_storage.hxx diff --git a/ucb/source/ucp/tdoc/tdoc_uri.cxx b/ucb/source/ucp/tdoc/tdoc_uri.cxx index 9c9871584a..9c9871584a 100644..100755 --- a/ucb/source/ucp/tdoc/tdoc_uri.cxx +++ b/ucb/source/ucp/tdoc/tdoc_uri.cxx diff --git a/ucb/source/ucp/tdoc/tdoc_uri.hxx b/ucb/source/ucp/tdoc/tdoc_uri.hxx index 6352fe313b..6352fe313b 100644..100755 --- a/ucb/source/ucp/tdoc/tdoc_uri.hxx +++ b/ucb/source/ucp/tdoc/tdoc_uri.hxx diff --git a/ucb/source/ucp/tdoc/ucptdoc.xml b/ucb/source/ucp/tdoc/ucptdoc.xml index f1260a9c07..f1260a9c07 100644..100755 --- a/ucb/source/ucp/tdoc/ucptdoc.xml +++ b/ucb/source/ucp/tdoc/ucptdoc.xml diff --git a/ucb/source/ucp/tdoc/ucptdoc1.component b/ucb/source/ucp/tdoc/ucptdoc1.component new file mode 100755 index 0000000000..8ba1471bd9 --- /dev/null +++ b/ucb/source/ucp/tdoc/ucptdoc1.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.ucb.TransientDocumentsContentProvider"> + <service name="com.sun.star.ucb.TransientDocumentsContentProvider"/> + </implementation> + <implementation name="com.sun.star.comp.ucb.TransientDocumentsDocumentContentFactory"> + <service name="com.sun.star.frame.TransientDocumentsDocumentContentFactory"/> + </implementation> +</component> diff --git a/ucb/source/ucp/webdav/ContentProperties.cxx b/ucb/source/ucp/webdav/ContentProperties.cxx index 24bcaf9e71..5332f23533 100644..100755 --- a/ucb/source/ucp/webdav/ContentProperties.cxx +++ b/ucb/source/ucp/webdav/ContentProperties.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * 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 @@ -106,29 +106,29 @@ ContentProperties::ContentProperties( const DAVResource& rResource ) m_aEscapedTitle = aURI.GetPathBaseName(); (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")) ] - = PropertyValue( + = PropertyValue( uno::makeAny( aURI.GetPathBaseNameUnescaped() ), true ); } catch ( DAVException const & ) { (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")) ] - = PropertyValue( - uno::makeAny( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( "*** unknown ***" ) ) ), + = PropertyValue( + uno::makeAny( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( "*** unknown ***" ) ) ), true ); } std::vector< DAVPropertyValue >::const_iterator it = rResource.properties.begin(); - std::vector< DAVPropertyValue >::const_iterator end + std::vector< DAVPropertyValue >::const_iterator end = rResource.properties.end(); - while ( it != end ) - { + while ( it != end ) + { addProperty( (*it) ); ++it; - } + } if ( rResource.uri.getStr()[ rResource.uri.getLength() - 1 ] == sal_Unicode( '/' ) ) @@ -159,6 +159,13 @@ ContentProperties::ContentProperties( const rtl::OUString & rTitle ) } //========================================================================= +ContentProperties::ContentProperties() +: m_xProps( new PropertyValueMap ), + m_bTrailingSlash( sal_False ) +{ +} + +//========================================================================= ContentProperties::ContentProperties( const ContentProperties & rOther ) : m_aEscapedTitle( rOther.m_aEscapedTitle ), m_xProps( rOther.m_xProps.get() @@ -202,7 +209,7 @@ const PropertyValue * ContentProperties::get( { if ( (*it).first.equalsIgnoreAsciiCase( rName ) ) return &(*it).second; - + ++it; } return 0; @@ -255,7 +262,7 @@ void ContentProperties::UCBNamesToDAVNames( { if ( !bCreationDate ) { - propertyNames.push_back( DAVProperties::CREATIONDATE ); + propertyNames.push_back( DAVProperties::CREATIONDATE ); bCreationDate = sal_True; } } @@ -266,7 +273,7 @@ void ContentProperties::UCBNamesToDAVNames( { if ( !bLastModified ) { - propertyNames.push_back( + propertyNames.push_back( DAVProperties::GETLASTMODIFIED ); bLastModified = sal_True; } @@ -278,7 +285,7 @@ void ContentProperties::UCBNamesToDAVNames( { if ( !bContentType ) { - propertyNames.push_back( + propertyNames.push_back( DAVProperties::GETCONTENTTYPE ); bContentType = sal_True; } @@ -290,7 +297,7 @@ void ContentProperties::UCBNamesToDAVNames( { if ( !bContentLength ) { - propertyNames.push_back( + propertyNames.push_back( DAVProperties::GETCONTENTLENGTH ); bContentLength = sal_True; } @@ -308,7 +315,7 @@ void ContentProperties::UCBNamesToDAVNames( { if ( !bResourceType ) { - propertyNames.push_back( DAVProperties::RESOURCETYPE ); + propertyNames.push_back( DAVProperties::RESOURCETYPE ); bResourceType = sal_True; } } @@ -408,7 +415,7 @@ void ContentProperties::addProperties( { // Add it. addProperty( rName, pProp->value(), pProp->isCaseSensitive() ); - } + } else { addProperty( rName, uno::Any(), false ); @@ -423,27 +430,27 @@ void ContentProperties::addProperties( const ContentProperties & rProps ) { PropertyValueMap::const_iterator it = rProps.m_xProps->begin(); const PropertyValueMap::const_iterator end = rProps.m_xProps->end(); - + while ( it != end ) { - addProperty( + addProperty( (*it).first, (*it).second.value(), (*it).second.isCaseSensitive() ); ++it; } } //========================================================================= -void ContentProperties::addProperties( +void ContentProperties::addProperties( const std::vector< DAVPropertyValue > & rProps ) { std::vector< DAVPropertyValue >::const_iterator it = rProps.begin(); - std::vector< DAVPropertyValue >::const_iterator end = rProps.end(); - + const std::vector< DAVPropertyValue >::const_iterator end = rProps.end(); + while ( it != end ) { addProperty( (*it) ); ++it; - } + } } //========================================================================= @@ -464,7 +471,7 @@ void ContentProperties::addProperty( const rtl::OUString & rName, rValue >>= aValue; util::DateTime aDate; DateTimeHelper::convert( aValue, aDate ); - + (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DateCreated")) ] = PropertyValue( uno::makeAny( aDate ), true ); } @@ -475,11 +482,11 @@ void ContentProperties::addProperty( const rtl::OUString & rName, // { // } else if ( rName.equals( DAVProperties::GETCONTENTLENGTH ) ) - { + { // Map DAV:getcontentlength to UCP:Size rtl::OUString aValue; rValue >>= aValue; - + (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Size")) ] = PropertyValue( uno::makeAny( aValue.toInt64() ), true ); } @@ -488,11 +495,11 @@ void ContentProperties::addProperty( const rtl::OUString & rName, { // Do NOT map Content-Lenght entity header to DAV:getcontentlength! // Only DAV resources have this property. - + // Map Content-Length entity header to UCP:Size rtl::OUString aValue; rValue >>= aValue; - + (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Size")) ] = PropertyValue( uno::makeAny( aValue.toInt64() ), true ); } @@ -506,7 +513,7 @@ void ContentProperties::addProperty( const rtl::OUString & rName, { // Do NOT map Content-Type entity header to DAV:getcontenttype! // Only DAV resources have this property. - + // Map DAV:getcontenttype to UCP:MediaType (1:1) (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")) ] = PropertyValue( rValue, true ); @@ -521,7 +528,7 @@ void ContentProperties::addProperty( const rtl::OUString & rName, rValue >>= aValue; util::DateTime aDate; DateTimeHelper::convert( aValue, aDate ); - + (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DateModified")) ] = PropertyValue( uno::makeAny( aDate ), true ); } @@ -530,13 +537,13 @@ void ContentProperties::addProperty( const rtl::OUString & rName, { // Do not map Last-Modified entity header to DAV:getlastmodified! // Only DAV resources have this property. - + // Map the Last-Modified entity header to UCP:DateModified rtl::OUString aValue; rValue >>= aValue; util::DateTime aDate; DateTimeHelper::convert( aValue, aDate ); - + (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DateModified")) ] = PropertyValue( uno::makeAny( aDate ), true ); } @@ -547,12 +554,12 @@ void ContentProperties::addProperty( const rtl::OUString & rName, { rtl::OUString aValue; rValue >>= aValue; - + // Map DAV:resourceype to UCP:IsFolder, UCP:IsDocument, UCP:ContentType sal_Bool bFolder = aValue.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "collection" ) ); - + (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsFolder")) ] = PropertyValue( uno::makeAny( bFolder ), true ); (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDocument")) ] @@ -568,9 +575,102 @@ void ContentProperties::addProperty( const rtl::OUString & rName, // else if ( rName.equals( DAVProperties::SUPPORTEDLOCK ) ) // { // } - + // Save property. (*m_xProps)[ rName ] = PropertyValue( rValue, bIsCaseSensitive ); } +//========================================================================= +//========================================================================= +// +// CachableContentProperties Implementation. +// +//========================================================================= +//========================================================================= + +namespace +{ + bool isCachable( rtl::OUString const & rName, + bool isCaseSensitive ) + { + static rtl::OUString aNonCachableProps [] = + { + DAVProperties::LOCKDISCOVERY, + + DAVProperties::GETETAG, + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ETag" ) ), + + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DateModified" ) ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Last-Modified" ) ), + DAVProperties::GETLASTMODIFIED, + + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Size" ) ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Content-Length" ) ), + DAVProperties::GETCONTENTLENGTH, + + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Date" ) ) + }; + + for ( sal_uInt32 n = 0; + n < ( sizeof( aNonCachableProps ) + / sizeof( aNonCachableProps[ 0 ] ) ); + ++n ) + { + if ( isCaseSensitive ) + { + if ( rName.equals( aNonCachableProps[ n ] ) ) + return false; + } + else + if ( rName.equalsIgnoreAsciiCase( aNonCachableProps[ n ] ) ) + return false; + } + return true; + } + +} // namespace + +//========================================================================= +CachableContentProperties::CachableContentProperties( + const ContentProperties & rProps ) +{ + addProperties( rProps ); +} + +//========================================================================= +void CachableContentProperties::addProperties( + const ContentProperties & rProps ) +{ + const std::auto_ptr< PropertyValueMap > & props = rProps.getProperties(); + + PropertyValueMap::const_iterator it = props->begin(); + const PropertyValueMap::const_iterator end = props->end(); + + while ( it != end ) + { + if ( isCachable( (*it).first, (*it).second.isCaseSensitive() ) ) + m_aProps.addProperty( (*it).first, + (*it).second.value(), + (*it).second.isCaseSensitive() ); + + ++it; + } +} + +//========================================================================= +void CachableContentProperties::addProperties( + const std::vector< DAVPropertyValue > & rProps ) +{ + std::vector< DAVPropertyValue >::const_iterator it = rProps.begin(); + const std::vector< DAVPropertyValue >::const_iterator end = rProps.end(); + + while ( it != end ) + { + if ( isCachable( (*it).Name, (*it).IsCaseSensitive ) ) + m_aProps.addProperty( (*it) ); + + ++it; + } +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/webdav/ContentProperties.hxx b/ucb/source/ucp/webdav/ContentProperties.hxx index f2137a8abb..bf9af15f6b 100644..100755 --- a/ucb/source/ucp/webdav/ContentProperties.hxx +++ b/ucb/source/ucp/webdav/ContentProperties.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * 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 @@ -72,13 +72,13 @@ struct hashString class PropertyValue { private: - ::com::sun::star::uno::Any m_aValue; + ::com::sun::star::uno::Any m_aValue; bool m_bIsCaseSensitive; public: PropertyValue() : m_bIsCaseSensitive( true ) {} - + PropertyValue( const ::com::sun::star::uno::Any & rValue, bool bIsCaseSensitive ) : m_aValue( rValue), @@ -86,7 +86,7 @@ public: bool isCaseSensitive() const { return m_bIsCaseSensitive; } const ::com::sun::star::uno::Any & value() const { return m_aValue; } - + }; typedef boost::unordered_map @@ -103,10 +103,12 @@ struct DAVResource; class ContentProperties { public: - ContentProperties( const DAVResource& rResource ); + ContentProperties(); + + ContentProperties( const DAVResource& rResource ); // Mini props for transient contents. - ContentProperties( const rtl::OUString & rTitle, sal_Bool bFolder ); + ContentProperties( const rtl::OUString & rTitle, sal_Bool bFolder ); // Micro props for non-existing contents. ContentProperties( const rtl::OUString & rTitle ); @@ -168,10 +170,10 @@ public: void addProperty( const rtl::OUString & rName, const com::sun::star::uno::Any & rValue, bool bIsCaseSensitive ); - + // overwrites probably existing entry. void addProperty( const DAVPropertyValue & rProp ); - + bool isTrailingSlash() const { return m_bTrailingSlash; } const rtl::OUString & getEscapedTitle() const { return m_aEscapedTitle; } @@ -182,7 +184,7 @@ public: { return m_xProps; } private: - ::rtl::OUString m_aEscapedTitle; // escaped Title + ::rtl::OUString m_aEscapedTitle; std::auto_ptr< PropertyValueMap > m_xProps; bool m_bTrailingSlash; @@ -193,7 +195,35 @@ private: const PropertyValue * get( const rtl::OUString & rName ) const; }; -} +class CachableContentProperties +{ +private: + ContentProperties m_aProps; + + CachableContentProperties & operator=( const CachableContentProperties & ); // n.i. + CachableContentProperties( const CachableContentProperties & ); // n.i. + +public: + CachableContentProperties( const ContentProperties & rProps ); + + void addProperties( const ContentProperties & rProps ); + + void addProperties( const std::vector< DAVPropertyValue > & rProps ); + + bool containsAllNames( + const com::sun::star::uno::Sequence< + com::sun::star::beans::Property >& rProps, + std::vector< rtl::OUString > & rNamesNotContained ) const + { return m_aProps.containsAllNames( rProps, rNamesNotContained ); } + + const com::sun::star::uno::Any & + getValue( const rtl::OUString & rName ) const + { return m_aProps.getValue( rName ); } + + operator const ContentProperties & () const { return m_aProps; } +}; + +} // namespace webdav_ucp #endif /* !_WEBDAV_UCP_CONTENTPROPERTIES_HXX */ diff --git a/ucb/source/ucp/webdav/DAVAuthListener.hxx b/ucb/source/ucp/webdav/DAVAuthListener.hxx index 7e4a34b565..7e4a34b565 100644..100755 --- a/ucb/source/ucp/webdav/DAVAuthListener.hxx +++ b/ucb/source/ucp/webdav/DAVAuthListener.hxx diff --git a/ucb/source/ucp/webdav/DAVAuthListenerImpl.hxx b/ucb/source/ucp/webdav/DAVAuthListenerImpl.hxx index db5f446556..db5f446556 100644..100755 --- a/ucb/source/ucp/webdav/DAVAuthListenerImpl.hxx +++ b/ucb/source/ucp/webdav/DAVAuthListenerImpl.hxx diff --git a/ucb/source/ucp/webdav/DAVException.hxx b/ucb/source/ucp/webdav/DAVException.hxx index 014f864f1f..014f864f1f 100644..100755 --- a/ucb/source/ucp/webdav/DAVException.hxx +++ b/ucb/source/ucp/webdav/DAVException.hxx diff --git a/ucb/source/ucp/webdav/DAVProperties.cxx b/ucb/source/ucp/webdav/DAVProperties.cxx index aa3d380632..aa3d380632 100644..100755 --- a/ucb/source/ucp/webdav/DAVProperties.cxx +++ b/ucb/source/ucp/webdav/DAVProperties.cxx diff --git a/ucb/source/ucp/webdav/DAVProperties.hxx b/ucb/source/ucp/webdav/DAVProperties.hxx index 153148c16d..153148c16d 100644..100755 --- a/ucb/source/ucp/webdav/DAVProperties.hxx +++ b/ucb/source/ucp/webdav/DAVProperties.hxx diff --git a/ucb/source/ucp/webdav/DAVRequestEnvironment.hxx b/ucb/source/ucp/webdav/DAVRequestEnvironment.hxx index e19c6de2d2..e19c6de2d2 100644..100755 --- a/ucb/source/ucp/webdav/DAVRequestEnvironment.hxx +++ b/ucb/source/ucp/webdav/DAVRequestEnvironment.hxx diff --git a/ucb/source/ucp/webdav/DAVResource.hxx b/ucb/source/ucp/webdav/DAVResource.hxx index 45d9c9698d..45d9c9698d 100644..100755 --- a/ucb/source/ucp/webdav/DAVResource.hxx +++ b/ucb/source/ucp/webdav/DAVResource.hxx diff --git a/ucb/source/ucp/webdav/DAVResourceAccess.cxx b/ucb/source/ucp/webdav/DAVResourceAccess.cxx index 0024eb7340..0024eb7340 100644..100755 --- a/ucb/source/ucp/webdav/DAVResourceAccess.cxx +++ b/ucb/source/ucp/webdav/DAVResourceAccess.cxx diff --git a/ucb/source/ucp/webdav/DAVResourceAccess.hxx b/ucb/source/ucp/webdav/DAVResourceAccess.hxx index 89191971fc..89191971fc 100644..100755 --- a/ucb/source/ucp/webdav/DAVResourceAccess.hxx +++ b/ucb/source/ucp/webdav/DAVResourceAccess.hxx diff --git a/ucb/source/ucp/webdav/DAVSession.hxx b/ucb/source/ucp/webdav/DAVSession.hxx index 03cb6a23fe..03cb6a23fe 100644..100755 --- a/ucb/source/ucp/webdav/DAVSession.hxx +++ b/ucb/source/ucp/webdav/DAVSession.hxx diff --git a/ucb/source/ucp/webdav/DAVSessionFactory.cxx b/ucb/source/ucp/webdav/DAVSessionFactory.cxx index 6438c7eca8..6438c7eca8 100644..100755 --- a/ucb/source/ucp/webdav/DAVSessionFactory.cxx +++ b/ucb/source/ucp/webdav/DAVSessionFactory.cxx diff --git a/ucb/source/ucp/webdav/DAVSessionFactory.hxx b/ucb/source/ucp/webdav/DAVSessionFactory.hxx index 4dfd94e4ab..4dfd94e4ab 100644..100755 --- a/ucb/source/ucp/webdav/DAVSessionFactory.hxx +++ b/ucb/source/ucp/webdav/DAVSessionFactory.hxx diff --git a/ucb/source/ucp/webdav/DAVTypes.hxx b/ucb/source/ucp/webdav/DAVTypes.hxx index 647d7b81f1..647d7b81f1 100644..100755 --- a/ucb/source/ucp/webdav/DAVTypes.hxx +++ b/ucb/source/ucp/webdav/DAVTypes.hxx diff --git a/ucb/source/ucp/webdav/DateTimeHelper.cxx b/ucb/source/ucp/webdav/DateTimeHelper.cxx index 7547c01dc0..7547c01dc0 100644..100755 --- a/ucb/source/ucp/webdav/DateTimeHelper.cxx +++ b/ucb/source/ucp/webdav/DateTimeHelper.cxx diff --git a/ucb/source/ucp/webdav/DateTimeHelper.hxx b/ucb/source/ucp/webdav/DateTimeHelper.hxx index 6c598c9931..6c598c9931 100644..100755 --- a/ucb/source/ucp/webdav/DateTimeHelper.hxx +++ b/ucb/source/ucp/webdav/DateTimeHelper.hxx diff --git a/ucb/source/ucp/webdav/LinkSequence.cxx b/ucb/source/ucp/webdav/LinkSequence.cxx index 63faf0c088..f29a8b3a90 100644..100755 --- a/ucb/source/ucp/webdav/LinkSequence.cxx +++ b/ucb/source/ucp/webdav/LinkSequence.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * 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 @@ -167,11 +167,7 @@ bool LinkSequence::createFromXML( const rtl::OString & rInData, rInData.getStr() + nStart, nEnd - nStart + TOKEN_LENGTH ); -#if NEON_VERSION >= 0x0250 success = !ne_xml_failed( parser ); -#else - success = !!ne_xml_valid( parser ); -#endif ne_xml_destroy( parser ); diff --git a/ucb/source/ucp/webdav/LinkSequence.hxx b/ucb/source/ucp/webdav/LinkSequence.hxx index d9f82491ee..d9f82491ee 100644..100755 --- a/ucb/source/ucp/webdav/LinkSequence.hxx +++ b/ucb/source/ucp/webdav/LinkSequence.hxx diff --git a/ucb/source/ucp/webdav/LockEntrySequence.cxx b/ucb/source/ucp/webdav/LockEntrySequence.cxx index 28c59326df..8819111ef8 100644..100755 --- a/ucb/source/ucp/webdav/LockEntrySequence.cxx +++ b/ucb/source/ucp/webdav/LockEntrySequence.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * 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 @@ -216,11 +216,7 @@ bool LockEntrySequence::createFromXML( const rtl::OString & rInData, rInData.getStr() + nStart, nEnd - nStart + TOKEN_LENGTH ); -#if NEON_VERSION >= 0x0250 success = !ne_xml_failed( parser ); -#else - success = !!ne_xml_valid( parser ); -#endif ne_xml_destroy( parser ); diff --git a/ucb/source/ucp/webdav/LockEntrySequence.hxx b/ucb/source/ucp/webdav/LockEntrySequence.hxx index e28ee31dcd..e28ee31dcd 100644..100755 --- a/ucb/source/ucp/webdav/LockEntrySequence.hxx +++ b/ucb/source/ucp/webdav/LockEntrySequence.hxx diff --git a/ucb/source/ucp/webdav/LockSequence.cxx b/ucb/source/ucp/webdav/LockSequence.cxx index 61c414dfaf..896117152a 100644..100755 --- a/ucb/source/ucp/webdav/LockSequence.cxx +++ b/ucb/source/ucp/webdav/LockSequence.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * 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 @@ -36,6 +36,8 @@ using namespace webdav_ucp; using namespace com::sun::star; +#define BEEHIVE_BUGS_WORKAROUND + ////////////////////////////////////////////////////////////////////////// struct LockSequenceParseContext @@ -129,7 +131,11 @@ extern "C" int LockSequence_startelement_callback( extern "C" int LockSequence_chardata_callback( void *userdata, int state, +#ifdef BEEHIVE_BUGS_WORKAROUND + const char *buf1, +#else const char *buf, +#endif size_t len ) { LockSequenceParseContext * pCtx @@ -137,6 +143,15 @@ extern "C" int LockSequence_chardata_callback( if ( !pCtx->pLock ) pCtx->pLock = new ucb::Lock; +#ifdef BEEHIVE_BUGS_WORKAROUND + // Beehive sends XML values containing trailing newlines. + if ( buf1[ len - 1 ] == 0x0a ) + len--; + + char * buf = new char[ len + 1 ](); + strncpy( buf, buf1, len ); +#endif + switch ( state ) { case STATE_DEPTH: @@ -208,7 +223,7 @@ extern "C" int LockSequence_chardata_callback( pCtx->pLock->Timeout = sal_Int64( -1 ); pCtx->hasTimeout = true; OSL_ENSURE( sal_False, - "LockSequence_chardata_callback - Unknown timeout!" ); + "LockSequence_chardata_callback - Unknown timeout!" ); } break; @@ -224,6 +239,11 @@ extern "C" int LockSequence_chardata_callback( } } + +#ifdef BEEHIVE_BUGS_WORKAROUND + delete [] buf; +#endif + return 0; // zero to continue, non-zero to abort parsing } @@ -324,11 +344,7 @@ bool LockSequence::createFromXML( const rtl::OString & rInData, rInData.getStr() + nStart, nEnd - nStart + TOKEN_LENGTH ); -#if NEON_VERSION >= 0x0250 success = !ne_xml_failed( parser ); -#else - success = !!ne_xml_valid( parser ); -#endif ne_xml_destroy( parser ); diff --git a/ucb/source/ucp/webdav/LockSequence.hxx b/ucb/source/ucp/webdav/LockSequence.hxx index c5cff554e1..c5cff554e1 100644..100755 --- a/ucb/source/ucp/webdav/LockSequence.hxx +++ b/ucb/source/ucp/webdav/LockSequence.hxx diff --git a/ucb/source/ucp/webdav/NeonHeadRequest.cxx b/ucb/source/ucp/webdav/NeonHeadRequest.cxx index 877e903959..d33ff2a517 100644..100755 --- a/ucb/source/ucp/webdav/NeonHeadRequest.cxx +++ b/ucb/source/ucp/webdav/NeonHeadRequest.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * 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 @@ -38,16 +38,15 @@ using namespace com::sun::star; namespace { -#if NEON_VERSION >= 0x0250 -void process_headers(ne_request *req, - DAVResource &rResource, - const std::vector< ::rtl::OUString > &rHeaderNames) +void process_headers( ne_request * req, + DAVResource & rResource, + const std::vector< ::rtl::OUString > & rHeaderNames ) { - void *cursor = NULL; - const char *name, *value; + void * cursor = NULL; + const char * name, *value; - while ((cursor = ne_response_header_iterate(req, cursor, - &name, &value)) != NULL) { + while ( ( cursor = ne_response_header_iterate( req, cursor, + &name, &value ) ) != NULL ) { rtl::OUString aHeaderName( rtl::OUString::createFromAscii( name ) ); rtl::OUString aHeaderValue( rtl::OUString::createFromAscii( value ) ); @@ -87,69 +86,6 @@ void process_headers(ne_request *req, } } } -#else -struct NeonHeadRequestContext -{ - DAVResource * pResource; - const std::vector< ::rtl::OUString > * pHeaderNames; - - NeonHeadRequestContext( DAVResource * p, - const std::vector< ::rtl::OUString > * pHeaders ) - : pResource( p ), pHeaderNames( pHeaders ) {} -}; - -extern "C" void NHR_ResponseHeaderCatcher( void * userdata, - const char * value ) -{ - rtl::OUString aHeader( rtl::OUString::createFromAscii( value ) ); - sal_Int32 nPos = aHeader.indexOf( ':' ); - - if ( nPos != -1 ) - { - rtl::OUString aHeaderName( aHeader.copy( 0, nPos ) ); - - NeonHeadRequestContext * pCtx - = static_cast< NeonHeadRequestContext * >( userdata ); - - // Note: Empty vector means that all headers are requested. - bool bIncludeIt = ( pCtx->pHeaderNames->size() == 0 ); - - if ( !bIncludeIt ) - { - // Check whether this header was requested. - std::vector< ::rtl::OUString >::const_iterator it( - pCtx->pHeaderNames->begin() ); - const std::vector< ::rtl::OUString >::const_iterator end( - pCtx->pHeaderNames->end() ); - - while ( it != end ) - { - if ( (*it) == aHeaderName ) - break; - - ++it; - } - - if ( it != end ) - bIncludeIt = true; - } - - if ( bIncludeIt ) - { - // Create & set the PropertyValue - DAVPropertyValue thePropertyValue; - thePropertyValue.Name = aHeaderName; - thePropertyValue.IsCaseSensitive = false; - - if ( nPos < aHeader.getLength() ) - thePropertyValue.Value <<= aHeader.copy( nPos + 1 ).trim(); - - // Add the newly created PropertyValue - pCtx->pResource->properties.push_back( thePropertyValue ); - } - } -} -#endif } // namespace @@ -159,7 +95,7 @@ extern "C" void NHR_ResponseHeaderCatcher( void * userdata, extern osl::Mutex aGlobalNeonMutex; -NeonHeadRequest::NeonHeadRequest( HttpSession* inSession, +NeonHeadRequest::NeonHeadRequest( HttpSession * inSession, const rtl::OUString & inPath, const std::vector< ::rtl::OUString > & inHeaderNames, @@ -177,19 +113,12 @@ NeonHeadRequest::NeonHeadRequest( HttpSession* inSession, inPath, RTL_TEXTENCODING_UTF8 ) ); -#if NEON_VERSION < 0x0250 - NeonHeadRequestContext aCtx( &ioResource, &inHeaderNames ); - ne_add_response_header_catcher( req, NHR_ResponseHeaderCatcher, &aCtx ); -#endif - { osl::Guard< osl::Mutex > theGlobalGuard( aGlobalNeonMutex ); nError = ne_request_dispatch( req ); } -#if NEON_VERSION >= 0x0250 - process_headers(req, ioResource, inHeaderNames); -#endif + process_headers( req, ioResource, inHeaderNames ); if ( nError == NE_OK && ne_get_status( req )->klass != 2 ) nError = NE_ERROR; diff --git a/ucb/source/ucp/webdav/NeonHeadRequest.hxx b/ucb/source/ucp/webdav/NeonHeadRequest.hxx index 4f58a3e2cc..4f58a3e2cc 100644..100755 --- a/ucb/source/ucp/webdav/NeonHeadRequest.hxx +++ b/ucb/source/ucp/webdav/NeonHeadRequest.hxx diff --git a/ucb/source/ucp/webdav/NeonInputStream.cxx b/ucb/source/ucp/webdav/NeonInputStream.cxx index 53f816b4a1..53f816b4a1 100644..100755 --- a/ucb/source/ucp/webdav/NeonInputStream.cxx +++ b/ucb/source/ucp/webdav/NeonInputStream.cxx diff --git a/ucb/source/ucp/webdav/NeonInputStream.hxx b/ucb/source/ucp/webdav/NeonInputStream.hxx index 20d0c9c080..20d0c9c080 100644..100755 --- a/ucb/source/ucp/webdav/NeonInputStream.hxx +++ b/ucb/source/ucp/webdav/NeonInputStream.hxx diff --git a/ucb/source/ucp/webdav/NeonLockStore.cxx b/ucb/source/ucp/webdav/NeonLockStore.cxx index 7868a64816..7868a64816 100644..100755 --- a/ucb/source/ucp/webdav/NeonLockStore.cxx +++ b/ucb/source/ucp/webdav/NeonLockStore.cxx diff --git a/ucb/source/ucp/webdav/NeonLockStore.hxx b/ucb/source/ucp/webdav/NeonLockStore.hxx index c36f922c6a..c36f922c6a 100644..100755 --- a/ucb/source/ucp/webdav/NeonLockStore.hxx +++ b/ucb/source/ucp/webdav/NeonLockStore.hxx diff --git a/ucb/source/ucp/webdav/NeonPropFindRequest.cxx b/ucb/source/ucp/webdav/NeonPropFindRequest.cxx index 8256d97d49..7c1e2b07a3 100644..100755 --- a/ucb/source/ucp/webdav/NeonPropFindRequest.cxx +++ b/ucb/source/ucp/webdav/NeonPropFindRequest.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * 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 @@ -195,22 +195,13 @@ extern "C" int NPFR_propfind_iter( void* userdata, // ------------------------------------------------------------------- extern "C" void NPFR_propfind_results( void* userdata, -#if NEON_VERSION >= 0x0260 const ne_uri* uri, -#else - const char* href, -#endif const NeonPropFindResultSet* set ) { // @@@ href is not the uri! DAVResource ctor wants uri! -#if NEON_VERSION >= 0x0260 DAVResource theResource( OStringToOUString( uri->path, RTL_TEXTENCODING_UTF8 ) ); -#else - DAVResource theResource( - OStringToOUString( href, RTL_TEXTENCODING_UTF8 ) ); -#endif ne_propset_iterate( set, NPFR_propfind_iter, &theResource ); @@ -237,22 +228,13 @@ extern "C" int NPFR_propnames_iter( void* userdata, // ------------------------------------------------------------------- extern "C" void NPFR_propnames_results( void* userdata, -#if NEON_VERSION >= 0x0260 const ne_uri* uri, -#else - const char* href, -#endif const NeonPropFindResultSet* results ) { // @@@ href is not the uri! DAVResourceInfo ctor wants uri! // Create entry for the resource. -#if NEON_VERSION >= 0x0260 DAVResourceInfo theResource( OStringToOUString( uri->path, RTL_TEXTENCODING_UTF8 ) ); -#else - DAVResourceInfo theResource( - OStringToOUString( href, RTL_TEXTENCODING_UTF8 ) ); -#endif // Fill entry. ne_propset_iterate( results, NPFR_propnames_iter, &theResource ); diff --git a/ucb/source/ucp/webdav/NeonPropFindRequest.hxx b/ucb/source/ucp/webdav/NeonPropFindRequest.hxx index cd4b5ded17..cd4b5ded17 100644..100755 --- a/ucb/source/ucp/webdav/NeonPropFindRequest.hxx +++ b/ucb/source/ucp/webdav/NeonPropFindRequest.hxx diff --git a/ucb/source/ucp/webdav/NeonSession.cxx b/ucb/source/ucp/webdav/NeonSession.cxx index 9d3232b6e9..7df353ea85 100644..100755 --- a/ucb/source/ucp/webdav/NeonSession.cxx +++ b/ucb/source/ucp/webdav/NeonSession.cxx @@ -185,11 +185,7 @@ struct NeonRequestContext // A simple Neon response_block_reader for use with an XInputStream // ------------------------------------------------------------------- -#if NEON_VERSION >= 0x0250 extern "C" int NeonSession_ResponseBlockReader(void * inUserData, -#else -extern "C" void NeonSession_ResponseBlockReader(void * inUserData, -#endif const char * inBuf, size_t inLen ) { @@ -205,9 +201,7 @@ extern "C" void NeonSession_ResponseBlockReader(void * inUserData, if ( xInputStream.is() ) xInputStream->AddToStream( inBuf, inLen ); } -#if NEON_VERSION >= 0x0250 return 0; -#endif } // ------------------------------------------------------------------- @@ -215,11 +209,7 @@ extern "C" void NeonSession_ResponseBlockReader(void * inUserData, // A simple Neon response_block_reader for use with an XOutputStream // ------------------------------------------------------------------- -#if NEON_VERSION >= 0x0250 extern "C" int NeonSession_ResponseBlockWriter( void * inUserData, -#else -extern "C" void NeonSession_ResponseBlockWriter( void * inUserData, -#endif const char * inBuf, size_t inLen ) { @@ -237,9 +227,7 @@ extern "C" void NeonSession_ResponseBlockWriter( void * inUserData, xOutputStream->writeBytes( aSeq ); } } -#if NEON_VERSION >= 0x0250 return 0; -#endif } // ------------------------------------------------------------------- @@ -1923,11 +1911,6 @@ int NeonSession::GET( ne_session * sess, ne_request * req = ne_request_create( sess, "GET", uri ); int ret; -#if NEON_VERSION < 0x0250 - if ( getheaders ) - ne_add_response_header_catcher( - req, runResponseHeaderHandler, userdata ); -#endif ne_decompress * dc = ne_decompress_reader( req, ne_accept_2xx, reader, userdata ); @@ -1936,7 +1919,6 @@ int NeonSession::GET( ne_session * sess, ret = ne_request_dispatch( req ); } -#if NEON_VERSION >= 0x0250 if ( getheaders ) { void *cursor = NULL; @@ -1950,7 +1932,7 @@ int NeonSession::GET( ne_session * sess, runResponseHeaderHandler(userdata, buffer); } } -#endif + if ( ret == NE_OK && ne_get_status( req )->klass != 2 ) ret = NE_ERROR; diff --git a/ucb/source/ucp/webdav/NeonSession.hxx b/ucb/source/ucp/webdav/NeonSession.hxx index c6586ea4fd..c6586ea4fd 100644..100755 --- a/ucb/source/ucp/webdav/NeonSession.hxx +++ b/ucb/source/ucp/webdav/NeonSession.hxx diff --git a/ucb/source/ucp/webdav/NeonTypes.hxx b/ucb/source/ucp/webdav/NeonTypes.hxx index 5b77368697..5b77368697 100644..100755 --- a/ucb/source/ucp/webdav/NeonTypes.hxx +++ b/ucb/source/ucp/webdav/NeonTypes.hxx diff --git a/ucb/source/ucp/webdav/NeonUri.cxx b/ucb/source/ucp/webdav/NeonUri.cxx index e36965373f..fd88795bef 100644..100755 --- a/ucb/source/ucp/webdav/NeonUri.cxx +++ b/ucb/source/ucp/webdav/NeonUri.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * 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 @@ -60,36 +60,24 @@ using namespace webdav_ucp; namespace { const ne_uri g_sUriDefaultsHTTP = { "http", -#if NEON_VERSION >= 0x0260 NULL, -#endif NULL, DEFAULT_HTTP_PORT, -#if NEON_VERSION >= 0x0260 NULL, -#endif NULL, NULL }; const ne_uri g_sUriDefaultsHTTPS = { "https", -#if NEON_VERSION >= 0x0260 NULL, -#endif NULL, DEFAULT_HTTPS_PORT, -#if NEON_VERSION >= 0x0260 NULL, -#endif NULL, NULL }; const ne_uri g_sUriDefaultsFTP = { "ftp", -#if NEON_VERSION >= 0x0260 NULL, -#endif NULL, DEFAULT_FTP_PORT, -#if NEON_VERSION >= 0x0260 NULL, -#endif NULL, NULL }; } // namespace @@ -175,11 +163,7 @@ void NeonUri::init( const rtl::OString & rUri, const ne_uri * pUri ) pUri->scheme ? pUri->scheme : pUriDefs->scheme, RTL_TEXTENCODING_UTF8 ); mUserInfo = rtl::OStringToOUString( -#if NEON_VERSION >= 0x0260 pUri->userinfo ? pUri->userinfo : pUriDefs->userinfo, -#else - pUri->authinfo ? pUri->authinfo : pUriDefs->authinfo, -#endif RTL_TEXTENCODING_UTF8 ); mHostName = rtl::OStringToOUString( pUri->host ? pUri->host : pUriDefs->host, @@ -189,7 +173,6 @@ void NeonUri::init( const rtl::OString & rUri, const ne_uri * pUri ) pUri->path ? pUri->path : pUriDefs->path, RTL_TEXTENCODING_UTF8 ); -#if NEON_VERSION >= 0x0260 if ( pUri->query ) { mPath += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("?")); @@ -203,7 +186,6 @@ void NeonUri::init( const rtl::OString & rUri, const ne_uri * pUri ) mPath += rtl::OStringToOUString( pUri->fragment, RTL_TEXTENCODING_UTF8 ); } -#endif } // ------------------------------------------------------------------- diff --git a/ucb/source/ucp/webdav/NeonUri.hxx b/ucb/source/ucp/webdav/NeonUri.hxx index 47dd22a6ea..47dd22a6ea 100644..100755 --- a/ucb/source/ucp/webdav/NeonUri.hxx +++ b/ucb/source/ucp/webdav/NeonUri.hxx diff --git a/ucb/source/ucp/webdav/PropertyMap.hxx b/ucb/source/ucp/webdav/PropertyMap.hxx index 01d5dd0844..01d5dd0844 100644..100755 --- a/ucb/source/ucp/webdav/PropertyMap.hxx +++ b/ucb/source/ucp/webdav/PropertyMap.hxx diff --git a/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx b/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx index c89158b110..ef76f5784c 100644..100755 --- a/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx +++ b/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * 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 @@ -362,11 +362,7 @@ bool UCBDeadPropertyValue::createFromXML( const rtl::OString & rInData, ne_xml_parse( parser, rInData.getStr(), rInData.getLength() ); -#if NEON_VERSION >= 0x0250 success = !ne_xml_failed( parser ); -#else - success = !!ne_xml_valid( parser ); -#endif ne_xml_destroy( parser ); diff --git a/ucb/source/ucp/webdav/UCBDeadPropertyValue.hxx b/ucb/source/ucp/webdav/UCBDeadPropertyValue.hxx index 5720df28b4..5720df28b4 100644..100755 --- a/ucb/source/ucp/webdav/UCBDeadPropertyValue.hxx +++ b/ucb/source/ucp/webdav/UCBDeadPropertyValue.hxx diff --git a/ucb/source/ucp/webdav/makefile.mk b/ucb/source/ucp/webdav/makefile.mk index 73ee298697..162d582664 100644..100755 --- a/ucb/source/ucp/webdav/makefile.mk +++ b/ucb/source/ucp/webdav/makefile.mk @@ -158,3 +158,11 @@ DEF1NAME=$(SHL1TARGET) # --- Targets ---------------------------------------------------------- .INCLUDE: target.mk + +ALLTAR : $(MISC)/ucpdav1.component + +$(MISC)/ucpdav1.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + ucpdav1.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt ucpdav1.component diff --git a/ucb/source/ucp/webdav/ucpdav.xml b/ucb/source/ucp/webdav/ucpdav.xml index 3a462c21f7..3a462c21f7 100644..100755 --- a/ucb/source/ucp/webdav/ucpdav.xml +++ b/ucb/source/ucp/webdav/ucpdav.xml diff --git a/ucb/source/ucp/webdav/ucpdav1.component b/ucb/source/ucp/webdav/ucpdav1.component new file mode 100755 index 0000000000..4e18b566e1 --- /dev/null +++ b/ucb/source/ucp/webdav/ucpdav1.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.WebDAVContentProvider"> + <service name="com.sun.star.ucb.WebDAVContentProvider"/> + </implementation> +</component> diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx index 69f5a69d37..2f5adff8e2 100644..100755 --- a/ucb/source/ucp/webdav/webdavcontent.cxx +++ b/ucb/source/ucp/webdav/webdavcontent.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * 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 @@ -1163,7 +1163,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( std::auto_ptr< ContentProperties > xProps; std::auto_ptr< ContentProperties > xCachedProps; std::auto_ptr< DAVResourceAccess > xResAccess; - rtl::OUString aEscapedTitle; + rtl::OUString aUnescapedTitle; bool bHasAll = false; uno::Reference< lang::XMultiServiceFactory > xSMgr; uno::Reference< ucb::XContentIdentifier > xIdentifier; @@ -1172,7 +1172,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( { osl::Guard< osl::Mutex > aGuard( m_aMutex ); - aEscapedTitle = NeonUri::unescape( m_aEscapedTitle ); + aUnescapedTitle = NeonUri::unescape( m_aEscapedTitle ); xSMgr.set( m_xSMgr ); xIdentifier.set( m_xIdentifier ); xProvider.set( m_xProvider.get() ); @@ -1345,7 +1345,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( if ( m_eResourceType == NON_DAV ) xProps->addProperties( aMissingProps, ContentProperties( - aEscapedTitle, + aUnescapedTitle, false ) ); } catch ( DAVException const & e ) @@ -1366,32 +1366,33 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( // might trigger HTTP redirect. // Therefore, title must be updated here. NeonUri aUri( xResAccess->getURL() ); - aEscapedTitle = aUri.GetPathBaseName(); + aUnescapedTitle = aUri.GetPathBaseNameUnescaped(); - if ( UNKNOWN == rType ) + if ( rType == UNKNOWN ) { - xProps.reset( new ContentProperties( aEscapedTitle ) ); + xProps.reset( new ContentProperties( aUnescapedTitle ) ); } // For DAV resources we only know the Title, for non-DAV // resources we additionally know that it is a document. - if ( DAV == rType ) + + if ( rType == DAV ) { //xProps.reset( - // new ContentProperties( aEscapedTitle ) ); + // new ContentProperties( aUnescapedTitle ) ); xProps->addProperty( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) ), - uno::makeAny( aEscapedTitle ), + uno::makeAny( aUnescapedTitle ), true ); } else { if ( !xProps.get() ) - xProps.reset( new ContentProperties( aEscapedTitle, false ) ); + xProps.reset( new ContentProperties( aUnescapedTitle, false ) ); else xProps->addProperty( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) ), - uno::makeAny( aEscapedTitle ), + uno::makeAny( aUnescapedTitle ), true ); xProps->addProperty( @@ -1409,7 +1410,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( // No server access for just created (not yet committed) objects. // Only a minimal set of properties supported at this stage. if (m_bTransient) - xProps.reset( new ContentProperties( aEscapedTitle, + xProps.reset( new ContentProperties( aUnescapedTitle, m_bCollection ) ); } @@ -1455,12 +1456,12 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( osl::Guard< osl::Mutex > aGuard( m_aMutex ); if ( !m_xCachedProps.get() ) - m_xCachedProps.reset( new ContentProperties( *xProps.get() ) ); + m_xCachedProps.reset( new CachableContentProperties( *xProps.get() ) ); else m_xCachedProps->addProperties( *xProps.get() ); m_xResAccess.reset( new DAVResourceAccess( *xResAccess.get() ) ); - m_aEscapedTitle = aEscapedTitle; + m_aEscapedTitle = NeonUri::escapeSegment( aUnescapedTitle ); } return xResultRow; @@ -1991,7 +1992,7 @@ uno::Any Content::open( // cache headers. if ( !m_xCachedProps.get()) m_xCachedProps.reset( - new ContentProperties( aResource ) ); + new CachableContentProperties( aResource ) ); else m_xCachedProps->addProperties( aResource ); @@ -2037,7 +2038,7 @@ uno::Any Content::open( // cache headers. if ( !m_xCachedProps.get()) m_xCachedProps.reset( - new ContentProperties( aResource ) ); + new CachableContentProperties( aResource ) ); else m_xCachedProps->addProperties( aResource.properties ); @@ -2927,6 +2928,20 @@ uno::Any Content::MapDAVException( const DAVException & e, sal_Bool bWrite ) // Map DAVException... uno::Any aException; + rtl::OUString aURL; + if ( m_bTransient ) + { + aURL = getParentURL(); + if ( aURL.lastIndexOf( '/' ) != ( aURL.getLength() - 1 ) ) + aURL += rtl::OUString::createFromAscii( "/" ); + + aURL += m_aEscapedTitle; + } + else + { + aURL = m_xIdentifier->getContentIdentifier(); + } + switch ( e.getStatus() ) { case SC_NOT_FOUND: @@ -2934,7 +2949,7 @@ uno::Any Content::MapDAVException( const DAVException & e, sal_Bool bWrite ) uno::Sequence< uno::Any > aArgs( 1 ); aArgs[ 0 ] <<= beans::PropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Uri")), -1, - uno::makeAny(m_xIdentifier->getContentIdentifier()), + uno::makeAny(aURL), beans::PropertyState_DIRECT_VALUE); aException <<= @@ -3024,14 +3039,14 @@ uno::Any Content::MapDAVException( const DAVException & e, sal_Bool bWrite ) rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Locked!")), static_cast< cppu::OWeakObject * >( this ), task::InteractionClassification_ERROR, - m_xIdentifier->getContentIdentifier(), - sal_True ); + aURL, + sal_False ); // not SelfOwned #else { uno::Sequence< uno::Any > aArgs( 1 ); aArgs[ 0 ] <<= beans::PropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Uri")), -1, - uno::makeAny(m_xIdentifier->getContentIdentifier()), + uno::makeAny(aURL), beans::PropertyState_DIRECT_VALUE); aException <<= @@ -3051,8 +3066,8 @@ uno::Any Content::MapDAVException( const DAVException & e, sal_Bool bWrite ) rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Locked (self)!")), static_cast< cppu::OWeakObject * >( this ), task::InteractionClassification_ERROR, - m_xIdentifier->getContentIdentifier(), - sal_True ); + aURL, + sal_True ); // SelfOwned break; case DAVException::DAV_NOT_LOCKED: @@ -3061,7 +3076,7 @@ uno::Any Content::MapDAVException( const DAVException & e, sal_Bool bWrite ) rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Not locked!")), static_cast< cppu::OWeakObject * >( this ), task::InteractionClassification_ERROR, - m_xIdentifier->getContentIdentifier() ); + aURL ); break; case DAVException::DAV_LOCK_EXPIRED: @@ -3070,7 +3085,7 @@ uno::Any Content::MapDAVException( const DAVException & e, sal_Bool bWrite ) rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Lock expired!")), static_cast< cppu::OWeakObject * >( this ), task::InteractionClassification_ERROR, - m_xIdentifier->getContentIdentifier() ); + aURL ); break; default: @@ -3194,7 +3209,7 @@ const Content::ResourceType & Content::getResourceType( if ( resources.size() == 1 ) { m_xCachedProps.reset( - new ContentProperties( resources[ 0 ] ) ); + new CachableContentProperties( resources[ 0 ] ) ); m_xCachedProps->containsAllNames( aProperties, m_aFailedPropNames ); } diff --git a/ucb/source/ucp/webdav/webdavcontent.hxx b/ucb/source/ucp/webdav/webdavcontent.hxx index b18369866f..051e6382e7 100644..100755 --- a/ucb/source/ucp/webdav/webdavcontent.hxx +++ b/ucb/source/ucp/webdav/webdavcontent.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * 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 @@ -69,6 +69,7 @@ namespace webdav_ucp class ContentProvider; class ContentProperties; +class CachableContentProperties; class Content : public ::ucbhelper::ContentImplHelper, public com::sun::star::ucb::XContentCreator @@ -82,7 +83,8 @@ class Content : public ::ucbhelper::ContentImplHelper, }; std::auto_ptr< DAVResourceAccess > m_xResAccess; - std::auto_ptr< ContentProperties > m_xCachedProps; // locally cached props + std::auto_ptr< CachableContentProperties > + m_xCachedProps; // locally cached props rtl::OUString m_aEscapedTitle; ResourceType m_eResourceType; ContentProvider* m_pProvider; // No need for a ref, base class holds object diff --git a/ucb/source/ucp/webdav/webdavcontentcaps.cxx b/ucb/source/ucp/webdav/webdavcontentcaps.cxx index 412e883a44..412e883a44 100644..100755 --- a/ucb/source/ucp/webdav/webdavcontentcaps.cxx +++ b/ucb/source/ucp/webdav/webdavcontentcaps.cxx diff --git a/ucb/source/ucp/webdav/webdavdatasupplier.cxx b/ucb/source/ucp/webdav/webdavdatasupplier.cxx index cfafcdbd84..cfafcdbd84 100644..100755 --- a/ucb/source/ucp/webdav/webdavdatasupplier.cxx +++ b/ucb/source/ucp/webdav/webdavdatasupplier.cxx diff --git a/ucb/source/ucp/webdav/webdavdatasupplier.hxx b/ucb/source/ucp/webdav/webdavdatasupplier.hxx index 8b2d9e1a20..8b2d9e1a20 100644..100755 --- a/ucb/source/ucp/webdav/webdavdatasupplier.hxx +++ b/ucb/source/ucp/webdav/webdavdatasupplier.hxx diff --git a/ucb/source/ucp/webdav/webdavprovider.cxx b/ucb/source/ucp/webdav/webdavprovider.cxx index 000de00c4b..000de00c4b 100644..100755 --- a/ucb/source/ucp/webdav/webdavprovider.cxx +++ b/ucb/source/ucp/webdav/webdavprovider.cxx diff --git a/ucb/source/ucp/webdav/webdavprovider.hxx b/ucb/source/ucp/webdav/webdavprovider.hxx index aeff294269..aeff294269 100644..100755 --- a/ucb/source/ucp/webdav/webdavprovider.hxx +++ b/ucb/source/ucp/webdav/webdavprovider.hxx diff --git a/ucb/source/ucp/webdav/webdavresultset.cxx b/ucb/source/ucp/webdav/webdavresultset.cxx index c60e55a58c..c60e55a58c 100644..100755 --- a/ucb/source/ucp/webdav/webdavresultset.cxx +++ b/ucb/source/ucp/webdav/webdavresultset.cxx diff --git a/ucb/source/ucp/webdav/webdavresultset.hxx b/ucb/source/ucp/webdav/webdavresultset.hxx index 84d9d92d2e..84d9d92d2e 100644..100755 --- a/ucb/source/ucp/webdav/webdavresultset.hxx +++ b/ucb/source/ucp/webdav/webdavresultset.hxx diff --git a/ucb/source/ucp/webdav/webdavservices.cxx b/ucb/source/ucp/webdav/webdavservices.cxx index deaec146fc..a3acc8d3b1 100644..100755 --- a/ucb/source/ucp/webdav/webdavservices.cxx +++ b/ucb/source/ucp/webdav/webdavservices.cxx @@ -36,45 +36,6 @@ using namespace com::sun::star; //========================================================================= -static sal_Bool writeInfo( void * pRegistryKey, - const rtl::OUString & rImplementationName, - uno::Sequence< rtl::OUString > const & rServiceNames ) -{ - rtl::OUString aKeyName( RTL_CONSTASCII_USTRINGPARAM("/") ); - aKeyName += rImplementationName; - aKeyName += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); - - uno::Reference< registry::XRegistryKey > xKey; - try - { - xKey = static_cast< registry::XRegistryKey * >( - pRegistryKey )->createKey( aKeyName ); - } - catch ( 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 ( registry::InvalidRegistryException const & ) - { - bSuccess = sal_False; - break; - } - } - return bSuccess; -} - -//========================================================================= extern "C" void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) { @@ -82,21 +43,6 @@ extern "C" void SAL_CALL component_getImplementationEnvironment( } //========================================================================= -extern "C" sal_Bool SAL_CALL component_writeInfo( - void * /*pServiceManager*/, void * pRegistryKey ) -{ - return pRegistryKey && - - ////////////////////////////////////////////////////////////////////// - // WebDAV Content Provider. - ////////////////////////////////////////////////////////////////////// - - writeInfo( pRegistryKey, - ::webdav_ucp::ContentProvider::getImplementationName_Static(), - ::webdav_ucp::ContentProvider::getSupportedServiceNames_Static() ); -} - -//========================================================================= extern "C" void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ ) { |