summaryrefslogtreecommitdiff
path: root/ucb/source/ucp/webdav
diff options
context:
space:
mode:
authorSzabolcs Dezsi <dezsiszabi@hotmail.com>2012-04-06 19:49:53 +0200
committerJan Holesovsky <kendy@suse.cz>2012-04-06 20:03:42 +0200
commitd6bc02f8c4cd0f50f0a2631ac7634dab408efc1f (patch)
treeb5a12df1fcae025715633469b75ab4c9b6f6d279 /ucb/source/ucp/webdav
parent0e1c0587617e0a6e4295a13599e97cdf6d1d2ea9 (diff)
Replaced equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(...)) with == operator
Diffstat (limited to 'ucb/source/ucp/webdav')
-rw-r--r--ucb/source/ucp/webdav/ContentProperties.cxx49
-rw-r--r--ucb/source/ucp/webdav/NeonSession.cxx3
-rw-r--r--ucb/source/ucp/webdav/NeonUri.cxx9
-rw-r--r--ucb/source/ucp/webdav/webdavcontent.cxx96
-rw-r--r--ucb/source/ucp/webdav/webdavcontentcaps.cxx41
-rw-r--r--ucb/source/ucp/webdav/webdavprovider.cxx23
6 files changed, 59 insertions, 162 deletions
diff --git a/ucb/source/ucp/webdav/ContentProperties.cxx b/ucb/source/ucp/webdav/ContentProperties.cxx
index 0147bb745e65..39d0a1980fb7 100644
--- a/ucb/source/ucp/webdav/ContentProperties.cxx
+++ b/ucb/source/ucp/webdav/ContentProperties.cxx
@@ -247,16 +247,12 @@ void ContentProperties::UCBNamesToDAVNames(
{
const beans::Property & rProp = rProps[ n ];
- if ( rProp.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "Title" ) ) )
+ if ( rProp.Name == "Title" )
{
// Title is always obtained from resource's URI.
continue;
}
- else if ( rProp.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "DateCreated" ) )
- ||
- ( rProp.Name == DAVProperties::CREATIONDATE ) )
+ else if ( rProp.Name == "DateCreated" || rProp.Name == DAVProperties::CREATIONDATE )
{
if ( !bCreationDate )
{
@@ -264,10 +260,7 @@ void ContentProperties::UCBNamesToDAVNames(
bCreationDate = sal_True;
}
}
- else if ( rProp.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "DateModified" ) )
- ||
- ( rProp.Name == DAVProperties::GETLASTMODIFIED ) )
+ else if ( rProp.Name == "DateModified" || rProp.Name == DAVProperties::GETLASTMODIFIED )
{
if ( !bLastModified )
{
@@ -276,10 +269,7 @@ void ContentProperties::UCBNamesToDAVNames(
bLastModified = sal_True;
}
}
- else if ( rProp.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "MediaType" ) )
- ||
- ( rProp.Name == DAVProperties::GETCONTENTTYPE ) )
+ else if ( rProp.Name == "MediaType" || rProp.Name == DAVProperties::GETCONTENTTYPE )
{
if ( !bContentType )
{
@@ -288,10 +278,7 @@ void ContentProperties::UCBNamesToDAVNames(
bContentType = sal_True;
}
}
- else if ( rProp.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "Size" ) )
- ||
- ( rProp.Name == DAVProperties::GETCONTENTLENGTH ) )
+ else if ( rProp.Name == "Size" || rProp.Name == DAVProperties::GETCONTENTLENGTH )
{
if ( !bContentLength )
{
@@ -300,16 +287,7 @@ void ContentProperties::UCBNamesToDAVNames(
bContentLength = sal_True;
}
}
- else if ( rProp.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "ContentType" ) )
- ||
- rProp.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "IsDocument" ) )
- ||
- rProp.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "IsFolder" ) )
- ||
- ( rProp.Name == DAVProperties::RESOURCETYPE ) )
+ else if ( rProp.Name == "ContentType" || rProp.Name == "IsDocument" || rProp.Name == "IsFolder" || rProp.Name == DAVProperties::RESOURCETYPE )
{
if ( !bResourceType )
{
@@ -347,20 +325,17 @@ void ContentProperties::UCBNamesToHTTPNames(
{
const beans::Property & rProp = rProps[ n ];
- if ( rProp.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "DateModified" ) ) )
+ if ( rProp.Name == "DateModified" )
{
propertyNames.push_back(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Last-Modified")) );
}
- else if ( rProp.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "MediaType" ) ) )
+ else if ( rProp.Name == "MediaType" )
{
propertyNames.push_back(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Content-Type")) );
}
- else if ( rProp.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "Size" ) ) )
+ else if ( rProp.Name == "Size" )
{
propertyNames.push_back(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Content-Length")) );
@@ -460,8 +435,7 @@ void ContentProperties::addProperty( const rtl::OUString & rName,
(*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Size")) ]
= PropertyValue( uno::makeAny( aValue.toInt64() ), true );
}
- else if ( rName.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "Content-Length" ) ) )
+ else if ( rName == "Content-Length" )
{
// Do NOT map Content-Lenght entity header to DAV:getcontentlength!
// Only DAV resources have this property.
@@ -502,8 +476,7 @@ void ContentProperties::addProperty( const rtl::OUString & rName,
(*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DateModified")) ]
= PropertyValue( uno::makeAny( aDate ), true );
}
- else if ( rName.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "Last-Modified" ) ) )
+ else if ( rName == "Last-Modified" )
{
// Do not map Last-Modified entity header to DAV:getlastmodified!
// Only DAV resources have this property.
diff --git a/ucb/source/ucp/webdav/NeonSession.cxx b/ucb/source/ucp/webdav/NeonSession.cxx
index b80d665aeaca..e69aaf94cf07 100644
--- a/ucb/source/ucp/webdav/NeonSession.cxx
+++ b/ucb/source/ucp/webdav/NeonSession.cxx
@@ -1677,8 +1677,7 @@ void NeonSession::abort()
// -------------------------------------------------------------------
const ucbhelper::InternetProxyServer & NeonSession::getProxySettings() const
{
- if ( m_aScheme.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "http" ) ) ||
- m_aScheme.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "https" ) ) )
+ if ( m_aScheme == "http" || m_aScheme == "https" )
{
return m_rProxyDecider.getProxy( m_aScheme,
m_aHostName,
diff --git a/ucb/source/ucp/webdav/NeonUri.cxx b/ucb/source/ucp/webdav/NeonUri.cxx
index 6acfb4e51bf1..897e8a6e9c3a 100644
--- a/ucb/source/ucp/webdav/NeonUri.cxx
+++ b/ucb/source/ucp/webdav/NeonUri.cxx
@@ -221,18 +221,15 @@ void NeonUri::calculateURI ()
switch ( mPort )
{
case DEFAULT_HTTP_PORT:
- bAppendPort
- = !mScheme.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "http" ) );
+ bAppendPort = mScheme != "http";
break;
case DEFAULT_HTTPS_PORT:
- bAppendPort
- = !mScheme.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "https" ) );
+ bAppendPort = mScheme != "https";
break;
case DEFAULT_FTP_PORT:
- bAppendPort
- = !mScheme.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ftp" ) );
+ bAppendPort = mScheme != "ftp";
break;
}
if ( bAppendPort )
diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx
index f5636225fa73..50c182018d10 100644
--- a/ucb/source/ucp/webdav/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav/webdavcontent.cxx
@@ -409,8 +409,7 @@ uno::Any SAL_CALL Content::execute(
uno::Any aRet;
- if ( aCommand.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "getPropertyValues" ) ) )
+ if ( aCommand.Name == "getPropertyValues" )
{
//////////////////////////////////////////////////////////////////
// getPropertyValues
@@ -431,8 +430,7 @@ uno::Any SAL_CALL Content::execute(
aRet <<= getPropertyValues( Properties, Environment );
}
- else if ( aCommand.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "setPropertyValues" ) ) )
+ else if ( aCommand.Name == "setPropertyValues" )
{
//////////////////////////////////////////////////////////////////
// setPropertyValues
@@ -465,8 +463,7 @@ uno::Any SAL_CALL Content::execute(
aRet <<= setPropertyValues( aProperties, Environment );
}
- else if ( aCommand.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "getPropertySetInfo" ) ) )
+ else if ( aCommand.Name == "getPropertySetInfo" )
{
//////////////////////////////////////////////////////////////////
// getPropertySetInfo
@@ -476,8 +473,7 @@ uno::Any SAL_CALL Content::execute(
aRet <<= getPropertySetInfo( Environment,
sal_False /* don't cache data */ );
}
- else if ( aCommand.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "getCommandInfo" ) ) )
+ else if ( aCommand.Name == "getCommandInfo" )
{
//////////////////////////////////////////////////////////////////
// getCommandInfo
@@ -486,8 +482,7 @@ uno::Any SAL_CALL Content::execute(
// Note: Implemented by base class.
aRet <<= getCommandInfo( Environment, sal_False );
}
- else if ( aCommand.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "open" ) ) )
+ else if ( aCommand.Name == "open" )
{
//////////////////////////////////////////////////////////////////
// open
@@ -518,8 +513,7 @@ uno::Any SAL_CALL Content::execute(
aRet = open( aOpenCommand, Environment );
}
- else if ( aCommand.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "insert" ) ) )
+ else if ( aCommand.Name == "insert" )
{
//////////////////////////////////////////////////////////////////
// insert
@@ -540,8 +534,7 @@ uno::Any SAL_CALL Content::execute(
insert( arg.Data, arg.ReplaceExisting, Environment );
}
- else if ( aCommand.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "delete" ) ) )
+ else if ( aCommand.Name == "delete" )
{
//////////////////////////////////////////////////////////////////
// delete
@@ -583,9 +576,7 @@ uno::Any SAL_CALL Content::execute(
// Remove own and all children's Additional Core Properties.
removeAdditionalPropertySet( sal_True );
}
- else if ( aCommand.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "transfer" ) )
- && isFolder( Environment ) )
+ else if ( aCommand.Name == "transfer" && isFolder( Environment ) )
{
//////////////////////////////////////////////////////////////////
// transfer
@@ -607,8 +598,7 @@ uno::Any SAL_CALL Content::execute(
transfer( transferArgs, Environment );
}
- else if ( aCommand.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "post" ) ) )
+ else if ( aCommand.Name == "post" )
{
//////////////////////////////////////////////////////////////////
// post
@@ -629,9 +619,7 @@ uno::Any SAL_CALL Content::execute(
post( aArg, Environment );
}
- else if ( aCommand.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "lock" ) ) &&
- supportsExclusiveWriteLock( Environment ) )
+ else if ( aCommand.Name == "lock" && supportsExclusiveWriteLock( Environment ) )
{
//////////////////////////////////////////////////////////////////
// lock
@@ -639,9 +627,7 @@ uno::Any SAL_CALL Content::execute(
lock( Environment );
}
- else if ( aCommand.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "unlock" ) ) &&
- supportsExclusiveWriteLock( Environment ) )
+ else if ( aCommand.Name == "unlock" && supportsExclusiveWriteLock( Environment ) )
{
//////////////////////////////////////////////////////////////////
// unlock
@@ -649,9 +635,7 @@ uno::Any SAL_CALL Content::execute(
unlock( Environment );
}
- else if ( aCommand.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "createNewContent" ) ) &&
- isFolder( Environment ) )
+ else if ( aCommand.Name == "createNewContent" && isFolder( Environment ) )
{
//////////////////////////////////////////////////////////////////
// createNewContent
@@ -997,11 +981,7 @@ Content::createNewContent( const ucb::ContentInfo& Info )
if ( Info.Type.isEmpty() )
return uno::Reference< ucb::XContent >();
- if ( ( !Info.Type.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( WEBDAV_COLLECTION_TYPE ) ) )
- &&
- ( !Info.Type.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( WEBDAV_CONTENT_TYPE ) ) ) )
+ if ( ( Info.Type != WEBDAV_COLLECTION_TYPE ) && ( Info.Type != WEBDAV_CONTENT_TYPE ) )
return uno::Reference< ucb::XContent >();
rtl::OUString aURL = m_xIdentifier->getContentIdentifier();
@@ -1013,8 +993,7 @@ Content::createNewContent( const ucb::ContentInfo& Info )
aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
sal_Bool isCollection;
- if ( Info.Type.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( WEBDAV_COLLECTION_TYPE ) ) )
+ if ( Info.Type == WEBDAV_COLLECTION_TYPE )
{
aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("New_Collection"));
isCollection = sal_True;
@@ -1430,8 +1409,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
for ( sal_Int32 n = 0; n < nCount; ++n )
{
const rtl::OUString rName = rProperties[ n ].Name;
- if ( rName.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "BaseURI" ) ) )
+ if ( rName == "BaseURI" )
{
// Add BaseURI property, if requested.
xProps->addProperty(
@@ -1439,8 +1417,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
uno::makeAny( getBaseURI( xResAccess ) ),
true );
}
- else if ( rName.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "CreatableContentsInfo" ) ) )
+ else if ( rName == "CreatableContentsInfo" )
{
// Add CreatableContentsInfo property, if requested.
sal_Bool bFolder = sal_False;
@@ -1560,8 +1537,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
"Property is read-only!" )),
static_cast< cppu::OWeakObject * >( this ) );
}
- else if ( rName.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "IsDocument" ) ) )
+ else if ( rName == "IsDocument" )
{
// Read-only property!
aRet[ n ] <<= lang::IllegalAccessException(
@@ -1569,8 +1545,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
"Property is read-only!" )),
static_cast< cppu::OWeakObject * >( this ) );
}
- else if ( rName.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "IsFolder" ) ) )
+ else if ( rName == "IsFolder" )
{
// Read-only property!
aRet[ n ] <<= lang::IllegalAccessException(
@@ -1661,8 +1636,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
"Property is read-only!" )),
static_cast< cppu::OWeakObject * >( this ) );
}
- else if ( rName.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "DateCreated" ) ) )
+ else if ( rName == "DateCreated" )
{
// Read-only property!
aRet[ n ] <<= lang::IllegalAccessException(
@@ -1670,8 +1644,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
"Property is read-only!" )),
static_cast< cppu::OWeakObject * >( this ) );
}
- else if ( rName.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "DateModified" ) ) )
+ else if ( rName == "DateModified" )
{
// Read-only property!
aRet[ n ] <<= lang::IllegalAccessException(
@@ -1679,8 +1652,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
"Property is read-only!" )),
static_cast< cppu::OWeakObject * >( this ) );
}
- else if ( rName.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "MediaType" ) ) )
+ else if ( rName == "MediaType" )
{
// Read-only property!
// (but could be writable, if 'getcontenttype' would be)
@@ -1689,8 +1661,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
"Property is read-only!" )),
static_cast< cppu::OWeakObject * >( this ) );
}
- if ( rName.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "CreatableContentsInfo" ) ) )
+ if ( rName == "CreatableContentsInfo" )
{
// Read-only property!
aRet[ n ] <<= lang::IllegalAccessException(
@@ -2513,30 +2484,24 @@ void Content::transfer(
// Check source's and target's URL scheme
//
const rtl::OUString aScheme = sourceURI.GetScheme().toAsciiLowerCase();
- if ( aScheme.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( WEBDAV_URL_SCHEME ) ) )
+ if ( aScheme == WEBDAV_URL_SCHEME )
{
sourceURI.SetScheme(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( HTTP_URL_SCHEME )) );
}
- else if ( aScheme.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( DAV_URL_SCHEME ) ) )
+ else if ( aScheme == DAV_URL_SCHEME )
{
sourceURI.SetScheme(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( HTTP_URL_SCHEME )) );
}
- else if ( aScheme.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( DAVS_URL_SCHEME ) ) )
+ else if ( aScheme == DAVS_URL_SCHEME )
{
sourceURI.SetScheme(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( HTTPS_URL_SCHEME )) );
}
else
{
- if ( !aScheme.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( HTTP_URL_SCHEME ) ) &&
- !aScheme.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( HTTPS_URL_SCHEME ) ) )
+ if ( aScheme != HTTP_URL_SCHEME && aScheme != HTTPS_URL_SCHEME )
{
ucbhelper::cancelCommandExecution(
uno::makeAny(
@@ -2549,12 +2514,10 @@ void Content::transfer(
}
}
- if ( targetURI.GetScheme().toAsciiLowerCase().equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( WEBDAV_URL_SCHEME ) ) )
+ if ( targetURI.GetScheme().toAsciiLowerCase() == WEBDAV_URL_SCHEME )
targetURI.SetScheme(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( HTTP_URL_SCHEME )) );
- else if ( targetURI.GetScheme().toAsciiLowerCase().equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( DAV_URL_SCHEME ) ) )
+ else if ( targetURI.GetScheme().toAsciiLowerCase() == DAV_URL_SCHEME )
targetURI.SetScheme(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( HTTP_URL_SCHEME )) );
@@ -3205,8 +3168,7 @@ const Content::ResourceType & Content::getResourceType(
const rtl::OUString aScheme(
rURL.copy( 0, rURL.indexOf( ':' ) ).toAsciiLowerCase() );
- if ( aScheme.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( FTP_URL_SCHEME ) ) )
+ if ( aScheme == FTP_URL_SCHEME )
{
eResourceType = FTP;
}
diff --git a/ucb/source/ucp/webdav/webdavcontentcaps.cxx b/ucb/source/ucp/webdav/webdavcontentcaps.cxx
index db1047168be7..478dc66a4bb4 100644
--- a/ucb/source/ucp/webdav/webdavcontentcaps.cxx
+++ b/ucb/source/ucp/webdav/webdavcontentcaps.cxx
@@ -384,64 +384,43 @@ uno::Sequence< beans::Property > Content::getProperties(
{
bHasGetContentLength = sal_True;
}
- else if ( !bHasContentType &&
- (*it).equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "ContentType" ) ) )
+ else if ( !bHasContentType && (*it) == "ContentType" )
{
bHasContentType = sal_True;
}
- else if ( !bHasIsDocument &&
- (*it).equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "IsDocument" ) ) )
+ else if ( !bHasIsDocument && (*it) == "IsDocument" )
{
bHasIsDocument = sal_True;
}
- else if ( !bHasIsFolder &&
- (*it).equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "IsFolder" ) ) )
+ else if ( !bHasIsFolder && (*it) == "IsFolder" )
{
bHasIsFolder = sal_True;
}
- else if ( !bHasTitle &&
- (*it).equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "Title" ) ) )
+ else if ( !bHasTitle && (*it) == "Title" )
{
bHasTitle = sal_True;
}
- else if ( !bHasBaseURI &&
- (*it).equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "BaseURI" ) ) )
+ else if ( !bHasBaseURI && (*it) == "BaseURI" )
{
bHasBaseURI = sal_True;
}
- else if ( !bHasDateCreated &&
- (*it).equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "DateCreated" ) ) )
+ else if ( !bHasDateCreated && (*it) == "DateCreated" )
{
bHasDateCreated = sal_True;
}
- else if ( !bHasDateModified &&
- (*it).equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "DateModified" ) ) )
+ else if ( !bHasDateModified && (*it) == "DateModified" )
{
bHasDateModified = sal_True;
}
- else if ( !bHasMediaType &&
- (*it).equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "MediaType" ) ) )
+ else if ( !bHasMediaType && (*it) == "MediaType" )
{
bHasMediaType = sal_True;
}
- else if ( !bHasSize &&
- (*it).equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "Size" ) ) )
+ else if ( !bHasSize && (*it) == "Size" )
{
bHasSize = sal_True;
}
- else if ( !bHasCreatableInfos &&
- (*it).equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM(
- "CreatableContentsInfo" ) ) )
+ else if ( !bHasCreatableInfos && (*it) == "CreatableContentsInfo" )
{
bHasCreatableInfos = sal_True;
}
diff --git a/ucb/source/ucp/webdav/webdavprovider.cxx b/ucb/source/ucp/webdav/webdavprovider.cxx
index ba24d632c276..c789e120e595 100644
--- a/ucb/source/ucp/webdav/webdavprovider.cxx
+++ b/ucb/source/ucp/webdav/webdavprovider.cxx
@@ -124,18 +124,8 @@ ContentProvider::queryContent(
const rtl::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 ) ) &&
- !aScheme.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( DAV_URL_SCHEME ) ) &&
- !aScheme.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( DAVS_URL_SCHEME ) ) &&
- !aScheme.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( FTP_URL_SCHEME ) ) )
+ if ( aScheme != HTTP_URL_SCHEME && aScheme != HTTPS_URL_SCHEME && aScheme != WEBDAV_URL_SCHEME
+ && aScheme != DAV_URL_SCHEME && aScheme != DAVS_URL_SCHEME && aScheme != FTP_URL_SCHEME )
throw ucb::IllegalIdentifierException();
// Normalize URL and create new Id, if nessacary.
@@ -153,8 +143,7 @@ ContentProvider::queryContent(
uno::Reference< ucb::XContentIdentifier > xCanonicId;
bool bNewId = false;
- if ( aScheme.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( WEBDAV_URL_SCHEME ) ) )
+ if ( aScheme == WEBDAV_URL_SCHEME )
{
aURL = aURL.replaceAt( 0,
WEBDAV_URL_SCHEME_LENGTH,
@@ -162,8 +151,7 @@ ContentProvider::queryContent(
HTTP_URL_SCHEME )) );
bNewId = true;
}
- else if ( aScheme.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( DAV_URL_SCHEME ) ) )
+ else if ( aScheme == DAV_URL_SCHEME )
{
aURL = aURL.replaceAt( 0,
DAV_URL_SCHEME_LENGTH,
@@ -171,8 +159,7 @@ ContentProvider::queryContent(
HTTP_URL_SCHEME )) );
bNewId = true;
}
- else if ( aScheme.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( DAVS_URL_SCHEME ) ) )
+ else if ( aScheme == DAVS_URL_SCHEME )
{
aURL = aURL.replaceAt( 0,
DAVS_URL_SCHEME_LENGTH,