summaryrefslogtreecommitdiff
path: root/ucb/source/ucp/webdav/ContentProperties.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'ucb/source/ucp/webdav/ContentProperties.cxx')
-rw-r--r--ucb/source/ucp/webdav/ContentProperties.cxx61
1 files changed, 20 insertions, 41 deletions
diff --git a/ucb/source/ucp/webdav/ContentProperties.cxx b/ucb/source/ucp/webdav/ContentProperties.cxx
index 3df9f0cc7766..4c6e217ac39f 100644
--- a/ucb/source/ucp/webdav/ContentProperties.cxx
+++ b/ucb/source/ucp/webdav/ContentProperties.cxx
@@ -231,15 +231,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" ) )
- ||
+ else if ( rProp.Name == "DateCreated" ||
( rProp.Name == DAVProperties::CREATIONDATE ) )
{
if ( !bCreationDate )
@@ -248,9 +245,7 @@ void ContentProperties::UCBNamesToDAVNames(
bCreationDate = sal_True;
}
}
- else if ( rProp.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "DateModified" ) )
- ||
+ else if ( rProp.Name == "DateModified" ||
( rProp.Name == DAVProperties::GETLASTMODIFIED ) )
{
if ( !bLastModified )
@@ -260,9 +255,7 @@ void ContentProperties::UCBNamesToDAVNames(
bLastModified = sal_True;
}
}
- else if ( rProp.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "MediaType" ) )
- ||
+ else if ( rProp.Name == "MediaType" ||
( rProp.Name == DAVProperties::GETCONTENTTYPE ) )
{
if ( !bContentType )
@@ -272,9 +265,7 @@ void ContentProperties::UCBNamesToDAVNames(
bContentType = sal_True;
}
}
- else if ( rProp.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "Size" ) )
- ||
+ else if ( rProp.Name == "Size" ||
( rProp.Name == DAVProperties::GETCONTENTLENGTH ) )
{
if ( !bContentLength )
@@ -284,15 +275,9 @@ 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" ) )
- ||
+ else if ( rProp.Name == "ContentType" ||
+ rProp.Name == "IsDocument" ||
+ rProp.Name == "IsFolder" ||
( rProp.Name == DAVProperties::RESOURCETYPE ) )
{
if ( !bResourceType )
@@ -331,20 +316,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::createFromAscii( "Last-Modified" ) );
}
- else if ( rProp.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "MediaType" ) ) )
+ else if ( rProp.Name == "MediaType" )
{
propertyNames.push_back(
rtl::OUString::createFromAscii( "Content-Type" ) );
}
- else if ( rProp.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "Size" ) ) )
+ else if ( rProp.Name == "Size" )
{
propertyNames.push_back(
rtl::OUString::createFromAscii( "Content-Length" ) );
@@ -446,7 +428,7 @@ void ContentProperties::addProperty( const rtl::OUString & rName,
const com::sun::star::uno::Any & rValue,
bool bIsCaseSensitive )
{
- if ( rName.equals( DAVProperties::CREATIONDATE ) )
+ if ( rName == DAVProperties::CREATIONDATE ) )
{
// Map DAV:creationdate to UCP:DateCreated
rtl::OUString aValue;
@@ -463,7 +445,7 @@ void ContentProperties::addProperty( const rtl::OUString & rName,
// else if ( rName.equals( DAVProperties::GETCONTENTLANGUAGE ) )
// {
// }
- else if ( rName.equals( DAVProperties::GETCONTENTLENGTH ) )
+ else if ( rName == DAVProperties::GETCONTENTLENGTH ) )
{
// Map DAV:getcontentlength to UCP:Size
rtl::OUString aValue;
@@ -472,8 +454,7 @@ void ContentProperties::addProperty( const rtl::OUString & rName,
(*m_xProps)[ rtl::OUString::createFromAscii( "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-Length entity header to DAV:getcontentlength!
// Only DAV resources have this property.
@@ -485,13 +466,13 @@ void ContentProperties::addProperty( const rtl::OUString & rName,
(*m_xProps)[ rtl::OUString::createFromAscii( "Size" ) ]
= PropertyValue( uno::makeAny( aValue.toInt64() ), true );
}
- else if ( rName.equals( DAVProperties::GETCONTENTTYPE ) )
+ else if ( rName == DAVProperties::GETCONTENTTYPE ) )
{
// Map DAV:getcontenttype to UCP:MediaType (1:1)
(*m_xProps)[ rtl::OUString::createFromAscii( "MediaType" ) ]
= PropertyValue( rValue, true );
}
- else if ( rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Content-Type" ) ) )
+ else if ( rName == "Content-Type" )
{
// Do NOT map Content-Type entity header to DAV:getcontenttype!
// Only DAV resources have this property.
@@ -503,7 +484,7 @@ void ContentProperties::addProperty( const rtl::OUString & rName,
// else if ( rName.equals( DAVProperties::GETETAG ) )
// {
// }
- else if ( rName.equals( DAVProperties::GETLASTMODIFIED ) )
+ else if ( rName == DAVProperties::GETLASTMODIFIED )
{
// Map the DAV:getlastmodified entity header to UCP:DateModified
rtl::OUString aValue;
@@ -514,8 +495,7 @@ void ContentProperties::addProperty( const rtl::OUString & rName,
(*m_xProps)[ rtl::OUString::createFromAscii( "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.
@@ -532,15 +512,14 @@ void ContentProperties::addProperty( const rtl::OUString & rName,
// else if ( rName.equals( DAVProperties::LOCKDISCOVERY ) )
// {
// }
- else if ( rName.equals( DAVProperties::RESOURCETYPE ) )
+ else if ( rName == DAVProperties::RESOURCETYPE ) )
{
rtl::OUString aValue;
rValue >>= aValue;
// Map DAV:resourceype to UCP:IsFolder, UCP:IsDocument, UCP:ContentType
sal_Bool bFolder =
- aValue.equalsIgnoreAsciiCaseAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "collection" ) );
+ aValue.equalsIgnoreAsciiCase( "collection" );
(*m_xProps)[ rtl::OUString::createFromAscii( "IsFolder" ) ]
= PropertyValue( uno::makeAny( bFolder ), true );