diff options
author | Kai Sommerfeld <kso@openoffice.org> | 2001-05-17 08:15:49 +0000 |
---|---|---|
committer | Kai Sommerfeld <kso@openoffice.org> | 2001-05-17 08:15:49 +0000 |
commit | 388a712510d216f6a1dbe4f43c7b20688516dd31 (patch) | |
tree | d2721c3bc3aa18cf13586310954fcdf306e7676b /ucb | |
parent | 9472185a918f24355f0fe4e00c0527914a309fc0 (diff) |
Adapted to changed RTL string interfaces.
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/ucp/webdav/DAVProperties.cxx | 8 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/LockSequence.cxx | 16 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/NeonPropFindRequest.cxx | 17 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/NeonUri.cxx | 6 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx | 25 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/webdavcontent.cxx | 34 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/webdavprovider.cxx | 19 |
7 files changed, 65 insertions, 60 deletions
diff --git a/ucb/source/ucp/webdav/DAVProperties.cxx b/ucb/source/ucp/webdav/DAVProperties.cxx index 89ec39e928ea..24ee923a9614 100644 --- a/ucb/source/ucp/webdav/DAVProperties.cxx +++ b/ucb/source/ucp/webdav/DAVProperties.cxx @@ -2,9 +2,9 @@ * * $RCSfile: DAVProperties.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: kso $ $Date: 2001-05-16 15:29:59 $ + * last change: $Author: kso $ $Date: 2001-05-17 09:15:49 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -206,6 +206,6 @@ void DAVProperties::createUCBPropName( const char * nspace, // static bool DAVProperties::isUCBDeadProperty( const NeonPropName & rName ) { - return rtl_str_equalsIgnoreCase( rName.nspace, - "http://ucb.openoffice.org/dav/props/" ); + return ( rtl_str_compareIgnoreAsciiCase( + rName.nspace, "http://ucb.openoffice.org/dav/props/" ) == 0 ); } diff --git a/ucb/source/ucp/webdav/LockSequence.cxx b/ucb/source/ucp/webdav/LockSequence.cxx index e2dbcb18edbb..3731187117dd 100644 --- a/ucb/source/ucp/webdav/LockSequence.cxx +++ b/ucb/source/ucp/webdav/LockSequence.cxx @@ -2,9 +2,9 @@ * * $RCSfile: LockSequence.cxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: kso $ $Date: 2001-05-16 14:58:06 $ + * last change: $Author: kso $ $Date: 2001-05-17 09:15:49 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -186,11 +186,11 @@ int LockSequence::endelement_callback( void * userdata, switch ( s->id ) { case DAV_ELM_depth: - if ( rtl_str_equalsIgnoreCase( cdata, "0" ) ) + if ( rtl_str_compareIgnoreAsciiCase( cdata, "0" ) == 0 ) pCtx->pLock->Depth = ucb::LockDepth_ZERO; - else if ( rtl_str_equalsIgnoreCase( cdata, "1" ) ) + else if ( rtl_str_compareIgnoreAsciiCase( cdata, "1" ) == 0 ) pCtx->pLock->Depth = ucb::LockDepth_ONE; - else if ( rtl_str_equalsIgnoreCase( cdata, "infinity" ) ) + else if ( rtl_str_compareIgnoreAsciiCase( cdata, "infinity" ) == 0 ) pCtx->pLock->Depth = ucb::LockDepth_INFINITY; else OSL_ENSURE( sal_False, @@ -215,12 +215,12 @@ int LockSequence::endelement_callback( void * userdata, of token, separators, and quoted-string> */ - if ( rtl_str_equalsIgnoreCase( cdata, "Infinite" ) ) + if ( rtl_str_compareIgnoreAsciiCase( cdata, "Infinite" ) == 0 ) { pCtx->pLock->Timeout = sal_Int64( -1 ); } - else if ( rtl_str_equalsIgnoreCase_WithLength( - cdata, 7, "Second-", 7 ) ) + else if ( rtl_str_compareIgnoreAsciiCase_WithLength( + cdata, 7, "Second-", 7 ) == 0 ) { pCtx->pLock->Timeout = rtl::OUString::createFromAscii( cdata + 7 ).toInt64(); diff --git a/ucb/source/ucp/webdav/NeonPropFindRequest.cxx b/ucb/source/ucp/webdav/NeonPropFindRequest.cxx index d9580eb86158..244e28da3bbc 100644 --- a/ucb/source/ucp/webdav/NeonPropFindRequest.cxx +++ b/ucb/source/ucp/webdav/NeonPropFindRequest.cxx @@ -2,9 +2,9 @@ * * $RCSfile: NeonPropFindRequest.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: kso $ $Date: 2001-05-16 15:29:59 $ + * last change: $Author: kso $ $Date: 2001-05-17 09:15:49 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -238,12 +238,13 @@ int NeonPropFindRequest::propfind_iter( void* userdata, if ( !bHasValue ) { - if ( rtl_str_equalsIgnoreCase( pname->name, "resourcetype" ) ) + if ( rtl_str_compareIgnoreAsciiCase( + pname->name, "resourcetype" ) == 0 ) { OString aValue( value ); if ( aValue.getLength() ) { - aValue = aValue.toLowerCase(); + aValue = aValue.toAsciiLowerCase(); if ( aValue.compareTo( RTL_CONSTASCII_STRINGPARAM( "<collection" ) ) == 0 ) { @@ -261,19 +262,21 @@ int NeonPropFindRequest::propfind_iter( void* userdata, thePropertyValue.Value <<= OUString(); } } - else if ( rtl_str_equalsIgnoreCase( pname->name, "supportedlock" ) ) + else if ( rtl_str_compareIgnoreAsciiCase( + pname->name, "supportedlock" ) == 0 ) { Sequence< LockEntry > aEntries; LockEntrySequence::createFromXML( value, aEntries ); thePropertyValue.Value <<= aEntries; } - else if ( rtl_str_equalsIgnoreCase( pname->name, "lockdiscovery" ) ) + else if ( rtl_str_compareIgnoreAsciiCase( + pname->name, "lockdiscovery" ) == 0 ) { Sequence< Lock > aLocks; LockSequence::createFromXML( value, aLocks ); thePropertyValue.Value <<= aLocks; } - else if ( rtl_str_equalsIgnoreCase( pname->name, "source" ) ) + else if ( rtl_str_compareIgnoreAsciiCase( pname->name, "source" ) == 0 ) { Sequence< Link > aLinks; LinkSequence::createFromXML( value, aLinks ); diff --git a/ucb/source/ucp/webdav/NeonUri.cxx b/ucb/source/ucp/webdav/NeonUri.cxx index 2a975de4bc9d..717027a54fa8 100644 --- a/ucb/source/ucp/webdav/NeonUri.cxx +++ b/ucb/source/ucp/webdav/NeonUri.cxx @@ -2,9 +2,9 @@ * * $RCSfile: NeonUri.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: kso $ $Date: 2001-05-16 15:30:00 $ + * last change: $Author: kso $ $Date: 2001-05-17 09:15:49 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -629,7 +629,7 @@ NeonUri::NeonUri( const OUString & inUri ) = theInputUri.copy( 0, RTL_CONSTASCII_LENGTH( "https:" ) ); uri theUri; - uri* pUriDefs = aProtocol.equalsIgnoreCase( "https:" ) + uri* pUriDefs = aProtocol.equalsIgnoreAsciiCase( "https:" ) ? &sUriDefaultsHTTPS : &sUriDefaultsHTTP; if ( uri_parse( theInputUri.getStr(), &theUri, pUriDefs ) != 0 ) diff --git a/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx b/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx index 90701deaa3f3..490c662d768d 100644 --- a/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx +++ b/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx @@ -2,9 +2,9 @@ * * $RCSfile: UCBDeadPropertyValue.cxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: kso $ $Date: 2001-05-16 14:58:06 $ + * last change: $Author: kso $ $Date: 2001-05-17 09:15:49 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -340,44 +340,43 @@ bool UCBDeadPropertyValue::createFromXML( const rtl::OString & rInData, { // Decode aCtx.pValue! It may contain XML reserved chars. rtl::OUString aStringValue = decodeValue( *aCtx.pValue ); - - if ( aCtx.pType->equalsIgnoreCase( aTypeString ) ) + if ( aCtx.pType->equalsIgnoreAsciiCase( aTypeString ) ) { rOutData <<= aStringValue; } - else if ( aCtx.pType->equalsIgnoreCase( aTypeLong ) ) + else if ( aCtx.pType->equalsIgnoreAsciiCase( aTypeLong ) ) { rOutData <<= aStringValue.toInt32(); } - else if ( aCtx.pType->equalsIgnoreCase( aTypeShort ) ) + else if ( aCtx.pType->equalsIgnoreAsciiCase( aTypeShort ) ) { rOutData <<= sal_Int16( aStringValue.toInt32() ); } - else if ( aCtx.pType->equalsIgnoreCase( aTypeBoolean ) ) + else if ( aCtx.pType->equalsIgnoreAsciiCase( aTypeBoolean ) ) { - if ( aStringValue.equalsIgnoreCase( + if ( aStringValue.equalsIgnoreAsciiCase( rtl::OUString::createFromAscii( "true" ) ) ) rOutData <<= sal_Bool( sal_True ); else rOutData <<= sal_Bool( sal_False ); } - else if ( aCtx.pType->equalsIgnoreCase( aTypeChar ) ) + else if ( aCtx.pType->equalsIgnoreAsciiCase( aTypeChar ) ) { rOutData <<= aStringValue.toChar(); } - else if ( aCtx.pType->equalsIgnoreCase( aTypeByte ) ) + else if ( aCtx.pType->equalsIgnoreAsciiCase( aTypeByte ) ) { rOutData <<= sal_Int8( aStringValue.toChar() ); } - else if ( aCtx.pType->equalsIgnoreCase( aTypeHyper ) ) + else if ( aCtx.pType->equalsIgnoreAsciiCase( aTypeHyper ) ) { rOutData <<= aStringValue.toInt64(); } - else if ( aCtx.pType->equalsIgnoreCase( aTypeFloat ) ) + else if ( aCtx.pType->equalsIgnoreAsciiCase( aTypeFloat ) ) { rOutData <<= aStringValue.toFloat(); } - else if ( aCtx.pType->equalsIgnoreCase( aTypeDouble ) ) + else if ( aCtx.pType->equalsIgnoreAsciiCase( aTypeDouble ) ) { rOutData <<= aStringValue.toDouble(); } diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx index 70d4da46cc0f..5618323107e5 100644 --- a/ucb/source/ucp/webdav/webdavcontent.cxx +++ b/ucb/source/ucp/webdav/webdavcontent.cxx @@ -2,9 +2,9 @@ * * $RCSfile: webdavcontent.cxx,v $ * - * $Revision: 1.19 $ + * $Revision: 1.20 $ * - * last change: $Author: kso $ $Date: 2001-05-16 15:30:00 $ + * last change: $Author: kso $ $Date: 2001-05-17 09:15:49 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -589,26 +589,28 @@ Any SAL_CALL Content::execute( const Command& aCommand, NeonUri sourceURI( transferArgs.SourceURL ); NeonUri targetURI( m_xIdentifier->getContentIdentifier() ); - // Check scheme + // Check source's and target's URL scheme // - const OUString aHttpScheme - = OUString::createFromAscii( HTTP_URL_SCHEME ); - const OUString aDavScheme - = OUString::createFromAscii( WEBDAV_URL_SCHEME ); - - const OUString aScheme = sourceURI.GetScheme(); - if ( aScheme.equalsIgnoreCase( aDavScheme ) ) - sourceURI.SetScheme( aHttpScheme ); + const OUString aScheme = sourceURI.GetScheme().toAsciiLowerCase(); + if ( aScheme.equalsAsciiL( + RTL_CONSTASCII_STRINGPARAM( WEBDAV_URL_SCHEME ) ) ) + { + sourceURI.SetScheme( + OUString::createFromAscii( HTTP_URL_SCHEME ) ); + } else { - if ( !aScheme.equalsIgnoreCase( aHttpScheme ) && - !aScheme.equalsIgnoreCase( - OUString::createFromAscii( HTTPS_URL_SCHEME ) ) ) + if ( !aScheme.equalsAsciiL( + RTL_CONSTASCII_STRINGPARAM( HTTP_URL_SCHEME ) ) && + !aScheme.equalsAsciiL( + RTL_CONSTASCII_STRINGPARAM( HTTPS_URL_SCHEME ) ) ) throw InteractiveBadTransferURLException(); } - if ( targetURI.GetScheme().equalsIgnoreCase( aDavScheme ) ) - targetURI.SetScheme( aHttpScheme ); + if ( targetURI.GetScheme().toAsciiLowerCase().equalsAsciiL( + RTL_CONSTASCII_STRINGPARAM( WEBDAV_URL_SCHEME ) ) ) + targetURI.SetScheme( + OUString::createFromAscii( HTTP_URL_SCHEME ) ); // @@@ This implementation of 'transfer' only works // if the source and target are located at same host. diff --git a/ucb/source/ucp/webdav/webdavprovider.cxx b/ucb/source/ucp/webdav/webdavprovider.cxx index bc97f75ea150..730a55b4a555 100644 --- a/ucb/source/ucp/webdav/webdavprovider.cxx +++ b/ucb/source/ucp/webdav/webdavprovider.cxx @@ -2,9 +2,9 @@ * * $RCSfile: webdavprovider.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: kso $ $Date: 2001-05-16 15:30:00 $ + * last change: $Author: kso $ $Date: 2001-05-17 09:15:49 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -175,13 +175,14 @@ Reference< XContent > SAL_CALL ContentProvider::queryContent( // Check URL scheme... - const OUString aScheme = Identifier->getContentProviderScheme(); - if ( !aScheme.equalsIgnoreCase( - OUString::createFromAscii( WEBDAV_URL_SCHEME ) ) && - !aScheme.equalsIgnoreCase( - OUString::createFromAscii( HTTP_URL_SCHEME ) ) && - !aScheme.equalsIgnoreCase( - OUString::createFromAscii( HTTPS_URL_SCHEME ) ) ) + const OUString aScheme + = Identifier->getContentProviderScheme().toAsciiLowerCase(); + if ( !aScheme.equalsAsciiL( + RTL_CONSTASCII_STRINGPARAM( HTTP_URL_SCHEME ) ) && + !aScheme.equalsAsciiL( + RTL_CONSTASCII_STRINGPARAM( HTTPS_URL_SCHEME ) ) && + !aScheme.equalsAsciiL( + RTL_CONSTASCII_STRINGPARAM( WEBDAV_URL_SCHEME ) ) ) throw IllegalIdentifierException(); // Normalize URL and create new Id, if nessacary. |