diff options
author | sb <sb@openoffice.org> | 2010-09-16 16:45:57 +0200 |
---|---|---|
committer | sb <sb@openoffice.org> | 2010-09-16 16:45:57 +0200 |
commit | 56c2cd6dc5b2545336ee0777a81132d2fed2d973 (patch) | |
tree | a337120bcd0eca7ba75802463946701f6c6c8c8b /ucb | |
parent | e96293e65a972a440aa5435bf22268a7ae4cef23 (diff) | |
parent | b12644eb20d8153243943d22e5923e06afebd637 (diff) |
sb126: merged in DEV300_m87
Diffstat (limited to 'ucb')
-rwxr-xr-x[-rw-r--r--] | ucb/source/core/cmdenv.cxx | 2 | ||||
-rw-r--r-- | ucb/source/ucp/odma/odma_lib.cxx | 4 | ||||
-rw-r--r-- | ucb/source/ucp/package/makefile.mk | 1 | ||||
-rw-r--r-- | ucb/source/ucp/package/pkguri.cxx | 36 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/DAVResourceAccess.cxx | 3 |
5 files changed, 23 insertions, 23 deletions
diff --git a/ucb/source/core/cmdenv.cxx b/ucb/source/core/cmdenv.cxx index 0f425e814400..5c0136fab063 100644..100755 --- a/ucb/source/core/cmdenv.cxx +++ b/ucb/source/core/cmdenv.cxx @@ -183,7 +183,7 @@ UcbCommandEnvironment::createServiceFactory( const uno::Reference< lang::XMultiServiceFactory >& rxServiceMgr ) { return uno::Reference< lang::XSingleServiceFactory >( - cppu::createOneInstanceFactory( + cppu::createSingleFactory( rxServiceMgr, UcbCommandEnvironment::getImplementationName_Static(), UcbCommandEnvironment_CreateInstance, diff --git a/ucb/source/ucp/odma/odma_lib.cxx b/ucb/source/ucp/odma/odma_lib.cxx index 774bcf5f6323..cf9da3a2b942 100644 --- a/ucb/source/ucp/odma/odma_lib.cxx +++ b/ucb/source/ucp/odma/odma_lib.cxx @@ -78,10 +78,6 @@ namespace odma if (bLoaded) return sal_True; ::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/package/makefile.mk b/ucb/source/ucp/package/makefile.mk index 8c6dcda31829..a8cdf7430703 100644 --- a/ucb/source/ucp/package/makefile.mk +++ b/ucb/source/ucp/package/makefile.mk @@ -68,6 +68,7 @@ SHL1IMPLIB=i$(TARGET) SHL1VERSIONMAP=$(SOLARENV)/src/component.map SHL1STDLIBS=\ + $(COMPHELPERLIB) \ $(CPPUHELPERLIB) \ $(CPPULIB) \ $(SALLIB) \ diff --git a/ucb/source/ucp/package/pkguri.cxx b/ucb/source/ucp/package/pkguri.cxx index feb8daec7905..8424ed906e92 100644 --- a/ucb/source/ucp/package/pkguri.cxx +++ b/ucb/source/ucp/package/pkguri.cxx @@ -36,6 +36,7 @@ #include "rtl/ustrbuf.hxx" #include "osl/diagnose.h" +#include "comphelper/storagehelper.hxx" #include "../inc/urihelper.hxx" @@ -85,7 +86,7 @@ void PackageUri::init() const if ( ( m_aUri.getLength() < PACKAGE_URL_SCHEME_LENGTH + 4 ) ) { // error, but remember that we did a init(). - m_aPath = rtl::OUString::createFromAscii( "/" ); + m_aPath = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/" ) ); return; } @@ -100,7 +101,7 @@ void PackageUri::init() const != sal_Unicode( '/' ) ) ) { // error, but remember that we did a init(). - m_aPath = rtl::OUString::createFromAscii( "/" ); + m_aPath = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/" ) ); return; } @@ -128,8 +129,8 @@ void PackageUri::init() const { m_aParam += ( m_aParam.getLength() - ? ::rtl::OUString::createFromAscii( "&purezip" ) - : ::rtl::OUString::createFromAscii( "?purezip" ) ); + ? ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "&purezip" ) ) + : ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "?purezip" ) ) ); } aPureUri = aPureUri.replaceAt( 0, @@ -143,7 +144,7 @@ void PackageUri::init() const // Only <scheme>:/// - Empty authority // error, but remember that we did a init(). - m_aPath = rtl::OUString::createFromAscii( "/" ); + m_aPath = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/" ) ); return; } else if ( nEnd == ( aPureUri.getLength() - 1 ) ) @@ -154,7 +155,7 @@ void PackageUri::init() const // Only <scheme>://// or <scheme>://<something>// // error, but remember that we did a init(). - m_aPath = rtl::OUString::createFromAscii( "/" ); + m_aPath = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/" ) ); return; } @@ -175,7 +176,7 @@ void PackageUri::init() const nStart, aPureUri.getLength() - nStart, aNormPackage ); m_aPackage = ::ucb_impl::urihelper::decodeSegment( aNormPackage ); - m_aPath = rtl::OUString::createFromAscii( "/" ); + m_aPath = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/" ) ); m_aUri = m_aUri.replaceAt( 0, ( nParam >= 0 ) ? nParam @@ -193,16 +194,19 @@ void PackageUri::init() const { m_aPath = aPureUri.copy( nEnd + 1 ); - // Empty path segments or encoded slashes? - if ( m_aPath.indexOf( - rtl::OUString::createFromAscii( "//" ) ) != -1 - || m_aPath.indexOf( - rtl::OUString::createFromAscii( "%2F" ) ) != -1 - || m_aPath.indexOf( - rtl::OUString::createFromAscii( "%2f" ) ) != -1 ) + // Unexpected sequences of characters: + // - empty path segments + // - encoded slashes + // - parent folder segments ".." + // - current folder segments "." + if ( m_aPath.indexOf( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "//" ) ) ) != -1 + || m_aPath.indexOf( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "%2F" ) ) ) != -1 + || m_aPath.indexOf( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "%2f" ) ) ) != -1 + || ::comphelper::OStorageHelper::PathHasSegment( m_aPath, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".." ) ) ) + || ::comphelper::OStorageHelper::PathHasSegment( m_aPath, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "." ) ) ) ) { // error, but remember that we did a init(). - m_aPath = rtl::OUString::createFromAscii( "/" ); + m_aPath = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/" ) ); return; } @@ -239,7 +243,7 @@ void PackageUri::init() const else { // error, but remember that we did a init(). - m_aPath = rtl::OUString::createFromAscii( "/" ); + m_aPath = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/" ) ); } } } diff --git a/ucb/source/ucp/webdav/DAVResourceAccess.cxx b/ucb/source/ucp/webdav/DAVResourceAccess.cxx index 872d45405735..e4617b7b9ea7 100644 --- a/ucb/source/ucp/webdav/DAVResourceAccess.cxx +++ b/ucb/source/ucp/webdav/DAVResourceAccess.cxx @@ -1201,8 +1201,7 @@ sal_Bool DAVResourceAccess::handleException( DAVException & e, int errorCount ) // if we have a bad connection try again. Up to three times. case DAVException::DAV_HTTP_ERROR: // retry up to three times, if not a client-side error. - if ( e.getStatus() > 0 && - ( e.getStatus() < 400 || e.getStatus() > 499 ) && + if ( ( e.getStatus() < 400 || e.getStatus() >= 500 ) && errorCount < 3 ) { return sal_True; |