summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-11-20 16:21:34 +0200
committerNoel Grandin <noel@peralex.com>2013-11-21 13:29:29 +0200
commit89633c6da1cde46983926dcc2e0f8e08de0e9378 (patch)
tree243f049b51b9f404e8697781dfada6c20ff0fee1 /ucb
parent2a46a01902bccd1f025cce92ce6d32efbabf6825 (diff)
remove unnecessary use of OUString::createFromAscii
Convert code like this: OUString aStrSpacing(OUString::createFromAscii("spacing")); to: OUString aStrSpacing("spacing"); Change-Id: Ia2b7d6b42f35d33cfe587a0d6668030f3537fa6d
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/ucp/webdav/ContentProperties.cxx45
-rw-r--r--ucb/source/ucp/webdav/DAVProperties.cxx29
-rw-r--r--ucb/source/ucp/webdav/SerfPropFindReqProcImpl.cxx10
-rw-r--r--ucb/source/ucp/webdav/SerfSession.cxx4
-rw-r--r--ucb/source/ucp/webdav/SerfUri.cxx8
-rw-r--r--ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx26
-rw-r--r--ucb/source/ucp/webdav/webdavcontent.cxx158
-rw-r--r--ucb/source/ucp/webdav/webdavdatasupplier.cxx4
-rw-r--r--ucb/source/ucp/webdav/webdavprovider.cxx17
-rw-r--r--ucb/source/ucp/webdav/webdavresponseparser.cxx73
10 files changed, 158 insertions, 216 deletions
diff --git a/ucb/source/ucp/webdav/ContentProperties.cxx b/ucb/source/ucp/webdav/ContentProperties.cxx
index e8416a212586..d04aa071077f 100644
--- a/ucb/source/ucp/webdav/ContentProperties.cxx
+++ b/ucb/source/ucp/webdav/ContentProperties.cxx
@@ -88,13 +88,13 @@ ContentProperties::ContentProperties( const DAVResource& rResource )
SerfUri aURI( rResource.uri );
m_aEscapedTitle = aURI.GetPathBaseName();
- (*m_xProps)[ OUString::createFromAscii( "Title" ) ]
+ (*m_xProps)[ OUString( "Title" ) ]
= PropertyValue(
uno::makeAny( aURI.GetPathBaseNameUnescaped() ), true );
}
catch ( DAVException const & )
{
- (*m_xProps)[ OUString::createFromAscii( "Title" ) ]
+ (*m_xProps)[ OUString( "Title" ) ]
= PropertyValue(
uno::makeAny(
OUString( "*** unknown ***" ) ),
@@ -122,11 +122,11 @@ ContentProperties::ContentProperties(
: m_xProps( new PropertyValueMap ),
m_bTrailingSlash( sal_False )
{
- (*m_xProps)[ OUString::createFromAscii( "Title" ) ]
+ (*m_xProps)[ OUString( "Title" ) ]
= PropertyValue( uno::makeAny( rTitle ), true );
- (*m_xProps)[ OUString::createFromAscii( "IsFolder" ) ]
+ (*m_xProps)[ OUString( "IsFolder" ) ]
= PropertyValue( uno::makeAny( bFolder ), true );
- (*m_xProps)[ OUString::createFromAscii( "IsDocument" ) ]
+ (*m_xProps)[ OUString( "IsDocument" ) ]
= PropertyValue( uno::makeAny( sal_Bool( !bFolder ) ), true );
}
@@ -135,7 +135,7 @@ ContentProperties::ContentProperties( const OUString & rTitle )
: m_xProps( new PropertyValueMap ),
m_bTrailingSlash( sal_False )
{
- (*m_xProps)[ OUString::createFromAscii( "Title" ) ]
+ (*m_xProps)[ OUString( "Title" ) ]
= PropertyValue( uno::makeAny( rTitle ), true );
}
@@ -317,18 +317,15 @@ void ContentProperties::UCBNamesToHTTPNames(
if ( rProp.Name == "DateModified" )
{
- propertyNames.push_back(
- OUString::createFromAscii( "Last-Modified" ) );
+ propertyNames.push_back( OUString( "Last-Modified" ) );
}
else if ( rProp.Name == "MediaType" )
{
- propertyNames.push_back(
- OUString::createFromAscii( "Content-Type" ) );
+ propertyNames.push_back( OUString( "Content-Type" ) );
}
else if ( rProp.Name == "Size" )
{
- propertyNames.push_back(
- OUString::createFromAscii( "Content-Length" ) );
+ propertyNames.push_back( OUString( "Content-Length" ) );
}
else
{
@@ -435,7 +432,7 @@ void ContentProperties::addProperty( const OUString & rName,
util::DateTime aDate;
DateTimeHelper::convert( aValue, aDate );
- (*m_xProps)[ OUString::createFromAscii( "DateCreated" ) ]
+ (*m_xProps)[ OUString( "DateCreated" ) ]
= PropertyValue( uno::makeAny( aDate ), true );
}
// else if ( rName.equals( DAVProperties::DISPLAYNAME ) )
@@ -450,7 +447,7 @@ void ContentProperties::addProperty( const OUString & rName,
OUString aValue;
rValue >>= aValue;
- (*m_xProps)[ OUString::createFromAscii( "Size" ) ]
+ (*m_xProps)[ OUString( "Size" ) ]
= PropertyValue( uno::makeAny( aValue.toInt64() ), true );
}
else if ( rName == "Content-Length" )
@@ -462,13 +459,13 @@ void ContentProperties::addProperty( const OUString & rName,
OUString aValue;
rValue >>= aValue;
- (*m_xProps)[ OUString::createFromAscii( "Size" ) ]
+ (*m_xProps)[ OUString( "Size" ) ]
= PropertyValue( uno::makeAny( aValue.toInt64() ), true );
}
else if ( rName == DAVProperties::GETCONTENTTYPE ) )
{
// Map DAV:getcontenttype to UCP:MediaType (1:1)
- (*m_xProps)[ OUString::createFromAscii( "MediaType" ) ]
+ (*m_xProps)[ OUString( "MediaType" ) ]
= PropertyValue( rValue, true );
}
else if ( rName == "Content-Type" )
@@ -477,7 +474,7 @@ void ContentProperties::addProperty( const OUString & rName,
// Only DAV resources have this property.
// Map DAV:getcontenttype to UCP:MediaType (1:1)
- (*m_xProps)[ OUString::createFromAscii( "MediaType" ) ]
+ (*m_xProps)[ OUString( "MediaType" ) ]
= PropertyValue( rValue, true );
}
// else if ( rName.equals( DAVProperties::GETETAG ) )
@@ -491,7 +488,7 @@ void ContentProperties::addProperty( const OUString & rName,
util::DateTime aDate;
DateTimeHelper::convert( aValue, aDate );
- (*m_xProps)[ OUString::createFromAscii( "DateModified" ) ]
+ (*m_xProps)[ OUString( "DateModified" ) ]
= PropertyValue( uno::makeAny( aDate ), true );
}
else if ( rName == "Last-Modified" )
@@ -505,7 +502,7 @@ void ContentProperties::addProperty( const OUString & rName,
util::DateTime aDate;
DateTimeHelper::convert( aValue, aDate );
- (*m_xProps)[ OUString::createFromAscii( "DateModified" ) ]
+ (*m_xProps)[ OUString( "DateModified" ) ]
= PropertyValue( uno::makeAny( aDate ), true );
}
// else if ( rName.equals( DAVProperties::LOCKDISCOVERY ) )
@@ -520,14 +517,14 @@ void ContentProperties::addProperty( const OUString & rName,
sal_Bool bFolder =
aValue.equalsIgnoreAsciiCase( "collection" );
- (*m_xProps)[ OUString::createFromAscii( "IsFolder" ) ]
+ (*m_xProps)[ OUString( "IsFolder" ) ]
= PropertyValue( uno::makeAny( bFolder ), true );
- (*m_xProps)[ OUString::createFromAscii( "IsDocument" ) ]
+ (*m_xProps)[ OUString( "IsDocument" ) ]
= PropertyValue( uno::makeAny( sal_Bool( !bFolder ) ), true );
- (*m_xProps)[ OUString::createFromAscii( "ContentType" ) ]
+ (*m_xProps)[ OUString( "ContentType" ) ]
= PropertyValue( uno::makeAny( bFolder
- ? OUString::createFromAscii( WEBDAV_COLLECTION_TYPE )
- : OUString::createFromAscii( WEBDAV_CONTENT_TYPE ) ), true );
+ ? OUString( WEBDAV_COLLECTION_TYPE )
+ : OUString( WEBDAV_CONTENT_TYPE ) ), true );
}
// else if ( rName.equals( DAVProperties::SUPPORTEDLOCK ) )
// {
diff --git a/ucb/source/ucp/webdav/DAVProperties.cxx b/ucb/source/ucp/webdav/DAVProperties.cxx
index 33b10a0af9f8..e4e254d8fc28 100644
--- a/ucb/source/ucp/webdav/DAVProperties.cxx
+++ b/ucb/source/ucp/webdav/DAVProperties.cxx
@@ -24,29 +24,28 @@
using namespace http_dav_ucp;
const OUString DAVProperties::CREATIONDATE =
- OUString::createFromAscii( "DAV:creationdate" );
+ OUString( "DAV:creationdate" );
const OUString DAVProperties::DISPLAYNAME =
- OUString::createFromAscii( "DAV:displayname" );
+ OUString( "DAV:displayname" );
const OUString DAVProperties::GETCONTENTLANGUAGE =
- OUString::createFromAscii( "DAV:getcontentlanguage" );
+ OUString( "DAV:getcontentlanguage" );
const OUString DAVProperties::GETCONTENTLENGTH =
- OUString::createFromAscii( "DAV:getcontentlength" );
+ OUString( "DAV:getcontentlength" );
const OUString DAVProperties::GETCONTENTTYPE =
- OUString::createFromAscii( "DAV:getcontenttype" );
+ OUString( "DAV:getcontenttype" );
const OUString DAVProperties::GETETAG =
- OUString::createFromAscii( "DAV:getetag" );
+ OUString( "DAV:getetag" );
const OUString DAVProperties::GETLASTMODIFIED =
- OUString::createFromAscii( "DAV:getlastmodified" );
+ OUString( "DAV:getlastmodified" );
const OUString DAVProperties::LOCKDISCOVERY =
- OUString::createFromAscii( "DAV:lockdiscovery" );
+ OUString( "DAV:lockdiscovery" );
const OUString DAVProperties::RESOURCETYPE =
- OUString::createFromAscii( "DAV:resourcetype" );
+ OUString( "DAV:resourcetype" );
const OUString DAVProperties::SUPPORTEDLOCK =
- OUString::createFromAscii( "DAV:supportedlock" );
+ OUString( "DAV:supportedlock" );
const OUString DAVProperties::EXECUTABLE =
- OUString::createFromAscii(
- "http://apache.org/dav/props/executable" );
+ OUString( "http://apache.org/dav/props/executable" );
// -------------------------------------------------------------------
// static
@@ -163,11 +162,11 @@ void DAVProperties::createUCBPropName( const char * nspace,
else
{
// Create property name that encodes, namespace and name ( XML ).
- rFullName = OUString::createFromAscii( "<prop:" );
+ rFullName = "<prop:";
rFullName += aName;
- rFullName += OUString::createFromAscii( " xmlns:prop=\"" );
+ rFullName += " xmlns:prop=\"";
rFullName += aNameSpace;
- rFullName += OUString::createFromAscii( "\">" );
+ rFullName += "\">";
}
}
diff --git a/ucb/source/ucp/webdav/SerfPropFindReqProcImpl.cxx b/ucb/source/ucp/webdav/SerfPropFindReqProcImpl.cxx
index d3f9faa72ccf..637337a92959 100644
--- a/ucb/source/ucp/webdav/SerfPropFindReqProcImpl.cxx
+++ b/ucb/source/ucp/webdav/SerfPropFindReqProcImpl.cxx
@@ -113,16 +113,14 @@ serf_bucket_t * SerfPropFindReqProcImpl::createSerfRequestBucket( serf_request_t
thePropName );
/* <*propname* xmlns="*propns*" /> */
- aBodyText += OUString::createFromAscii( "<" );
+ aBodyText += "<";
aBodyText += OUString::createFromAscii( thePropName.name );
- aBodyText += OUString::createFromAscii( " xmlnx=\"" );
+ aBodyText += " xmlnx=\"";
aBodyText += OUString::createFromAscii( thePropName.nspace );
- aBodyText += OUString::createFromAscii( "\"/>" );
+ aBodyText += "\"/>";
}
- aBodyText = OUString::createFromAscii( "<prop>" ) +
- aBodyText +
- OUString::createFromAscii( "</prop>" );
+ aBodyText = "<prop>" + aBodyText + "</prop>" );
}
else
{
diff --git a/ucb/source/ucp/webdav/SerfSession.cxx b/ucb/source/ucp/webdav/SerfSession.cxx
index 266c19bf119f..0df25d3769de 100644
--- a/ucb/source/ucp/webdav/SerfSession.cxx
+++ b/ucb/source/ucp/webdav/SerfSession.cxx
@@ -347,7 +347,7 @@ namespace {
OUString GetHostnamePart( const OUString& _rRawString )
{
OUString sPart;
- OUString sPartId = OUString::createFromAscii( "CN=" );
+ OUString sPartId = "CN=";
sal_Int32 nContStart = _rRawString.indexOf( sPartId );
if ( nContStart != -1 )
{
@@ -386,7 +386,7 @@ apr_status_t SerfSession::verifySerfCertificateChain (
xSEInitializer = uno::Reference< xml::crypto::XSEInitializer >(
getMSF()->createInstance(
- OUString::createFromAscii( "com.sun.star.xml.crypto.SEInitializer" ) ),
+ OUString( "com.sun.star.xml.crypto.SEInitializer" ) ),
uno::UNO_QUERY_THROW);
xSecurityContext = xSEInitializer->createSecurityContext( OUString() );
diff --git a/ucb/source/ucp/webdav/SerfUri.cxx b/ucb/source/ucp/webdav/SerfUri.cxx
index eecc7a467a24..16a4b1748625 100644
--- a/ucb/source/ucp/webdav/SerfUri.cxx
+++ b/ucb/source/ucp/webdav/SerfUri.cxx
@@ -122,13 +122,13 @@ void SerfUri::init( const apr_uri_t * pUri )
if ( pUri->query )
{
- mPath += OUString::createFromAscii( "?" );
+ mPath += "?";
mPath += OStringToOUString( pUri->query, RTL_TEXTENCODING_UTF8 );
}
if ( pUri->fragment )
{
- mPath += OUString::createFromAscii( "#" );
+ mPath += "#";
mPath += OStringToOUString( pUri->fragment, RTL_TEXTENCODING_UTF8 );
}
}
@@ -207,7 +207,7 @@ OUString SerfUri::GetPathBaseName () const
return aTemp;
}
else
- return OUString::createFromAscii ("/");
+ return OUString("/");
}
bool SerfUri::operator== ( const SerfUri & rOther ) const
@@ -223,7 +223,7 @@ OUString SerfUri::GetPathBaseNameUnescaped () const
void SerfUri::AppendPath (const OUString& rPath)
{
if (mPath.lastIndexOf ('/') != mPath.getLength () - 1)
- mPath += OUString::createFromAscii ("/");
+ mPath += OUString("/");
mPath += rPath;
calculateURI ();
diff --git a/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx b/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx
index 741a1de6dbec..f8f234f17db9 100644
--- a/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx
+++ b/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx
@@ -38,31 +38,31 @@ struct UCBDeadPropertyValueParseContext
// static
const OUString UCBDeadPropertyValue::aTypeString
- = OUString::createFromAscii( "string" );
+ = OUString( "string" );
const OUString UCBDeadPropertyValue::aTypeLong
- = OUString::createFromAscii( "long" );
+ = OUString( "long" );
const OUString UCBDeadPropertyValue::aTypeShort
- = OUString::createFromAscii( "short" );
+ = OUString( "short" );
const OUString UCBDeadPropertyValue::aTypeBoolean
- = OUString::createFromAscii( "boolean" );
+ = OUString( "boolean" );
const OUString UCBDeadPropertyValue::aTypeChar
- = OUString::createFromAscii( "char" );
+ = OUString( "char" );
const OUString UCBDeadPropertyValue::aTypeByte
- = OUString::createFromAscii( "byte" );
+ = OUString( "byte" );
const OUString UCBDeadPropertyValue::aTypeHyper
- = OUString::createFromAscii( "hyper" );
+ = OUString( "hyper" );
const OUString UCBDeadPropertyValue::aTypeFloat
- = OUString::createFromAscii( "float" );
+ = OUString( "float" );
const OUString UCBDeadPropertyValue::aTypeDouble
- = OUString::createFromAscii( "double" );
+ = OUString( "double" );
// static
const OUString UCBDeadPropertyValue::aXMLPre
- = OUString::createFromAscii( "<ucbprop><type>" );
+ = OUString( "<ucbprop><type>" );
const OUString UCBDeadPropertyValue::aXMLMid
- = OUString::createFromAscii( "</type><value>" );
+ = OUString( "</type><value>" );
const OUString UCBDeadPropertyValue::aXMLEnd
- = OUString::createFromAscii( "</value></ucbprop>" );
+ = OUString( "</value></ucbprop>" );
#define STATE_TOP (1)
@@ -391,7 +391,7 @@ bool UCBDeadPropertyValue::createFromXML( const OString & /*rInData*/,
else if ( aCtx.pType->equalsIgnoreAsciiCase( aTypeBoolean ) )
{
if ( aStringValue.equalsIgnoreAsciiCase(
- OUString::createFromAscii( "true" ) ) )
+ OUString( "true" ) ) )
rOutData <<= sal_Bool( sal_True );
else
rOutData <<= sal_Bool( sal_False );
diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx
index 07ecebe0730b..a5e7087e1a3c 100644
--- a/ucb/source/ucp/webdav/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav/webdavcontent.cxx
@@ -439,8 +439,7 @@ uno::Sequence< uno::Type > SAL_CALL Content::getTypes()
OUString SAL_CALL Content::getImplementationName()
throw( uno::RuntimeException )
{
- return OUString::createFromAscii(
- "com.sun.star.comp.ucb.WebDAVContent" );
+ return OUString( "com.sun.star.comp.ucb.WebDAVContent" );
}
//=========================================================================
@@ -449,8 +448,7 @@ uno::Sequence< OUString > SAL_CALL Content::getSupportedServiceNames()
throw( uno::RuntimeException )
{
uno::Sequence< OUString > aSNS( 1 );
- aSNS.getArray()[ 0 ]
- = OUString::createFromAscii( WEBDAV_CONTENT_SERVICE_NAME );
+ aSNS.getArray()[ 0 ] = WEBDAV_CONTENT_SERVICE_NAME;
return aSNS;
}
@@ -479,9 +477,9 @@ OUString SAL_CALL Content::getContentType()
}
if ( bFolder )
- return OUString::createFromAscii( WEBDAV_COLLECTION_TYPE );
+ return OUString( WEBDAV_COLLECTION_TYPE );
- return OUString::createFromAscii( WEBDAV_CONTENT_TYPE );
+ return OUString( WEBDAV_CONTENT_TYPE );
}
//=========================================================================
@@ -517,8 +515,7 @@ uno::Any SAL_CALL Content::execute(
{
ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
- OUString::createFromAscii(
- "Wrong argument type!" ),
+ OUString( "Wrong argument type!" ),
static_cast< cppu::OWeakObject * >( this ),
-1 ) ),
Environment );
@@ -538,8 +535,7 @@ uno::Any SAL_CALL Content::execute(
{
ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
- OUString::createFromAscii(
- "Wrong argument type!" ),
+ OUString( "Wrong argument type!" ),
static_cast< cppu::OWeakObject * >( this ),
-1 ) ),
Environment );
@@ -550,8 +546,7 @@ uno::Any SAL_CALL Content::execute(
{
ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
- OUString::createFromAscii(
- "No properties!" ),
+ OUString( "No properties!" ),
static_cast< cppu::OWeakObject * >( this ),
-1 ) ),
Environment );
@@ -590,8 +585,7 @@ uno::Any SAL_CALL Content::execute(
{
ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
- OUString::createFromAscii(
- "Wrong argument type!" ),
+ OUString( "Wrong argument type!" ),
static_cast< cppu::OWeakObject * >( this ),
-1 ) ),
Environment );
@@ -611,8 +605,7 @@ uno::Any SAL_CALL Content::execute(
{
ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
- OUString::createFromAscii(
- "Wrong argument type!" ),
+ OUString( "Wrong argument type!" ),
static_cast< cppu::OWeakObject * >( this ),
-1 ) ),
Environment );
@@ -673,8 +666,7 @@ uno::Any SAL_CALL Content::execute(
{
ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
- OUString::createFromAscii(
- "Wrong argument type!" ),
+ OUString( "Wrong argument type!" ),
static_cast< cppu::OWeakObject * >( this ),
-1 ) ),
Environment );
@@ -694,8 +686,7 @@ uno::Any SAL_CALL Content::execute(
{
ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
- OUString::createFromAscii(
- "Wrong argument type!" ),
+ OUString( "Wrong argument type!" ),
static_cast< cppu::OWeakObject * >( this ),
-1 ) ),
Environment );
@@ -1143,8 +1134,7 @@ Content::queryCreatableContentsInfo()
uno::Sequence< ucb::ContentInfo > aSeq( 2 );
// document.
- aSeq.getArray()[ 0 ].Type
- = OUString::createFromAscii( WEBDAV_CONTENT_TYPE );
+ aSeq.getArray()[ 0 ].Type = OUString( WEBDAV_CONTENT_TYPE );
aSeq.getArray()[ 0 ].Attributes
= ucb::ContentInfoAttribute::INSERT_WITH_INPUTSTREAM
| ucb::ContentInfoAttribute::KIND_DOCUMENT;
@@ -1158,8 +1148,7 @@ Content::queryCreatableContentsInfo()
aSeq.getArray()[ 0 ].Properties = aDocProps;
// folder.
- aSeq.getArray()[ 1 ].Type
- = OUString::createFromAscii( WEBDAV_COLLECTION_TYPE );
+ aSeq.getArray()[ 1 ].Type = OUString( WEBDAV_COLLECTION_TYPE );
aSeq.getArray()[ 1 ].Attributes
= ucb::ContentInfoAttribute::KIND_FOLDER;
@@ -1191,17 +1180,17 @@ Content::createNewContent( const ucb::ContentInfo& Info )
"WebdavContent::createNewContent - empty identifier!" );
if ( ( aURL.lastIndexOf( '/' ) + 1 ) != aURL.getLength() )
- aURL += OUString::createFromAscii( "/" );
+ aURL += "/";
sal_Bool isCollection;
if ( Info.Type == WEBDAV_COLLECTION_TYPE )
{
- aURL += OUString::createFromAscii( "New_Collection" );
+ aURL += "New_Collection";
isCollection = sal_True;
}
else
{
- aURL += OUString::createFromAscii( "New_Content" );
+ aURL += "New_Content";
isCollection = sal_False;
}
@@ -1748,8 +1737,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
{
// Read-only property!
aRet[ n ] <<= lang::IllegalAccessException(
- OUString::createFromAscii(
- "Property is read-only!" ),
+ OUString( "Property is read-only!" ),
static_cast< cppu::OWeakObject * >( this ) );
continue;
}
@@ -1762,24 +1750,21 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
{
// Read-only property!
aRet[ n ] <<= lang::IllegalAccessException(
- OUString::createFromAscii(
- "Property is read-only!" ),
+ OUString( "Property is read-only!" ),
static_cast< cppu::OWeakObject * >( this ) );
}
else if ( rName == "IsDocument" )
{
// Read-only property!
aRet[ n ] <<= lang::IllegalAccessException(
- OUString::createFromAscii(
- "Property is read-only!" ),
+ OUString( "Property is read-only!" ),
static_cast< cppu::OWeakObject * >( this ) );
}
else if ( rName == "IsFolder" )
{
// Read-only property!
aRet[ n ] <<= lang::IllegalAccessException(
- OUString::createFromAscii(
- "Property is read-only!" ),
+ OUString( "Property is read-only!" ),
static_cast< cppu::OWeakObject * >( this ) );
}
else if ( rName == "Title" )
@@ -1812,8 +1797,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
catch ( DAVException const & )
{
aRet[ n ] <<= lang::IllegalArgumentException(
- OUString::createFromAscii(
- "Invalid content identifier!" ),
+ OUString( "Invalid content identifier!" ),
static_cast< cppu::OWeakObject * >( this ),
-1 );
}
@@ -1821,8 +1805,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
else
{
aRet[ n ] <<= lang::IllegalArgumentException(
- OUString::createFromAscii(
- "Empty title not allowed!" ),
+ OUString( "Empty title not allowed!" ),
static_cast< cppu::OWeakObject * >( this ),
-1 );
}
@@ -1830,8 +1813,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
else
{
aRet[ n ] <<= beans::IllegalTypeException(
- OUString::createFromAscii(
- "Property value has wrong type!" ),
+ OUString( "Property value has wrong type!" ),
static_cast< cppu::OWeakObject * >( this ) );
}
}
@@ -1854,8 +1836,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
// PROPPATCH::set would add the property automatically, which
// is not allowed for "setPropertyValues" command!
aRet[ n ] <<= beans::UnknownPropertyException(
- OUString::createFromAscii(
- "Property is unknown!" ),
+ OUString( "Property is unknown!" ),
static_cast< cppu::OWeakObject * >( this ) );
continue;
}
@@ -1864,24 +1845,21 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
{
// Read-only property!
aRet[ n ] <<= lang::IllegalAccessException(
- OUString::createFromAscii(
- "Property is read-only!" ),
+ OUString( "Property is read-only!" ),
static_cast< cppu::OWeakObject * >( this ) );
}
else if ( rName == "DateCreated" )
{
// Read-only property!
aRet[ n ] <<= lang::IllegalAccessException(
- OUString::createFromAscii(
- "Property is read-only!" ),
+ OUString( "Property is read-only!" ),
static_cast< cppu::OWeakObject * >( this ) );
}
else if ( rName == "DateModified" )
{
// Read-only property!
aRet[ n ] <<= lang::IllegalAccessException(
- OUString::createFromAscii(
- "Property is read-only!" ),
+ OUString( "Property is read-only!" ),
static_cast< cppu::OWeakObject * >( this ) );
}
else if ( rName == "MediaType" )
@@ -1889,16 +1867,14 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
// Read-only property!
// (but could be writable, if 'getcontenttype' would be)
aRet[ n ] <<= lang::IllegalAccessException(
- OUString::createFromAscii(
- "Property is read-only!" ),
+ OUString( "Property is read-only!" ),
static_cast< cppu::OWeakObject * >( this ) );
}
if ( rName.startsWith( "CreatableContentsInfo" ) )
{
// Read-only property!
aRet[ n ] <<= lang::IllegalAccessException(
- OUString::createFromAscii(
- "Property is read-only!" ),
+ OUString( "Property is read-only!" ),
static_cast< cppu::OWeakObject * >( this ) );
}
else
@@ -1963,8 +1939,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
else
{
aRet[ n ] <<= uno::Exception(
- OUString::createFromAscii(
- "No property set for storing the value!" ),
+ OUString( "No property set for storing the value!" ),
static_cast< cppu::OWeakObject * >( this ) );
}
}
@@ -2028,7 +2003,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
OUString aNewURL = getParentURL();
if ( aNewURL.lastIndexOf( '/' ) != ( aNewURL.getLength() - 1 ) )
- aNewURL += OUString::createFromAscii( "/" );
+ aNewURL += "/";
aNewURL += SerfUri::escapeSegment( aNewTitle );
@@ -2071,7 +2046,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
// Set error .
aRet[ nTitlePos ] <<= uno::Exception(
- OUString::createFromAscii( "Exchange failed!" ),
+ OUString( "Exchange failed!" ),
static_cast< cppu::OWeakObject * >( this ) );
}
}
@@ -2089,7 +2064,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
{
osl::Guard< osl::Mutex > aGuard( m_aMutex );
- aEvent.PropertyName = OUString::createFromAscii( "Title" );
+ aEvent.PropertyName = "Title";
aEvent.OldValue = uno::makeAny( aOldTitle );
aEvent.NewValue = uno::makeAny( aNewTitle );
@@ -2383,7 +2358,7 @@ void Content::queryChildren( ContentRefList& rChildren )
if ( nURLPos != ( aURL.getLength() - 1 ) )
{
// No trailing slash found. Append.
- aURL += OUString::createFromAscii( "/" );
+ aURL += "/";
}
sal_Int32 nLen = aURL.getLength();
@@ -2445,7 +2420,7 @@ void Content::insert(
OSL_ENSURE( sal_False, "Content::insert - Title missing!" );
uno::Sequence< OUString > aProps( 1 );
- aProps[ 0 ] = OUString::createFromAscii( "Title" );
+ aProps[ 0 ] = "Title";
ucbhelper::cancelCommandExecution(
uno::makeAny( ucb::MissingPropertiesException(
OUString(),
@@ -2477,7 +2452,7 @@ void Content::insert(
{
#undef ERROR
ucb::UnsupportedNameClashException aEx(
- OUString::createFromAscii( "Unable to write without overwrite!" ),
+ OUString( "Unable to write without overwrite!" ),
static_cast< cppu::OWeakObject * >( this ),
ucb::NameClash::ERROR );
@@ -2524,8 +2499,7 @@ void Content::insert(
"Content::insert - "
"Unknown interaction selection!" );
throw ucb::CommandFailedException(
- OUString::createFromAscii(
- "Unknown interaction selection!" ),
+ OUString( "Unknown interaction selection!" ),
uno::Reference< uno::XInterface >(),
aExAsAny );
// break;
@@ -2544,7 +2518,7 @@ void Content::insert(
// Assemble new content identifier...
OUString aURL = getParentURL();
if ( aURL.lastIndexOf( '/' ) != ( aURL.getLength() - 1 ) )
- aURL += OUString::createFromAscii( "/" );
+ aURL += "/";
aURL += aEscapedTitle;
@@ -2697,17 +2671,17 @@ void Content::transfer(
if ( aScheme == WEBDAV_URL_SCHEME )
{
sourceURI.SetScheme(
- OUString::createFromAscii( HTTP_URL_SCHEME ) );
+ OUString( HTTP_URL_SCHEME ) );
}
else if ( aScheme == DAV_URL_SCHEME )
{
sourceURI.SetScheme(
- OUString::createFromAscii( HTTP_URL_SCHEME ) );
+ OUString( HTTP_URL_SCHEME ) );
}
else if ( aScheme == DAVS_URL_SCHEME )
{
sourceURI.SetScheme(
- OUString::createFromAscii( HTTPS_URL_SCHEME ) );
+ OUString( HTTPS_URL_SCHEME ) );
}
else
{
@@ -2716,8 +2690,7 @@ void Content::transfer(
ucbhelper::cancelCommandExecution(
uno::makeAny(
ucb::InteractiveBadTransferURLException(
- OUString::createFromAscii(
- "Unsupported URL scheme!" ),
+ OUString( "Unsupported URL scheme!" ),
static_cast< cppu::OWeakObject * >( this ) ) ),
Environment );
// Unreachable
@@ -2726,10 +2699,10 @@ void Content::transfer(
if ( targetURI.GetScheme().toAsciiLowerCase() == WEBDAV_URL_SCHEME )
targetURI.SetScheme(
- OUString::createFromAscii( HTTP_URL_SCHEME ) );
+ OUString( HTTP_URL_SCHEME ) );
else if ( targetURI.GetScheme().toAsciiLowerCase() == DAV_URL_SCHEME )
targetURI.SetScheme(
- OUString::createFromAscii( HTTP_URL_SCHEME ) );
+ OUString( HTTP_URL_SCHEME ) );
// @@@ This implementation of 'transfer' only works
// if the source and target are located at same host.
@@ -2742,8 +2715,7 @@ void Content::transfer(
{
ucbhelper::cancelCommandExecution(
uno::makeAny( ucb::InteractiveBadTransferURLException(
- OUString::createFromAscii(
- "Different hosts!" ),
+ OUString( "Different hosts!" ),
static_cast< cppu::OWeakObject * >( this ) ) ),
Environment );
// Unreachable
@@ -2765,7 +2737,7 @@ void Content::transfer(
OUString aTargetURL = xIdentifier->getContentIdentifier();
if ( ( aTargetURL.lastIndexOf( '/' ) + 1 )
!= aTargetURL.getLength() )
- aTargetURL += OUString::createFromAscii( "/" );
+ aTargetURL += "/";
aTargetURL += aTitle;
@@ -2970,8 +2942,7 @@ void Content::lock(
}
uno::Any aOwnerAny;
- aOwnerAny
- <<= OUString::createFromAscii( "http://ucb.openoffice.org" );
+ aOwnerAny <<= OUString( "http://ucb.openoffice.org" );
ucb::Lock aLock(
ucb::LockScope_EXCLUSIVE,
@@ -3105,7 +3076,7 @@ sal_Bool Content::isFolder(
}
uno::Sequence< beans::Property > aProperties( 1 );
- aProperties[ 0 ].Name = OUString::createFromAscii( "IsFolder" );
+ aProperties[ 0 ].Name = "IsFolder";
aProperties[ 0 ].Handle = -1;
uno::Reference< sdbc::XRow > xRow( getPropertyValues( aProperties, xEnv ) );
if ( xRow.is() )
@@ -3133,7 +3104,7 @@ uno::Any Content::MapDAVException( const DAVException & e, sal_Bool bWrite )
{
aURL = getParentURL();
if ( aURL.lastIndexOf( '/' ) != ( aURL.getLength() - 1 ) )
- aURL += OUString::createFromAscii( "/" );
+ aURL += "/";
aURL += m_aEscapedTitle;
}
@@ -3148,13 +3119,13 @@ uno::Any Content::MapDAVException( const DAVException & e, sal_Bool bWrite )
{
uno::Sequence< uno::Any > aArgs( 1 );
aArgs[ 0 ] <<= beans::PropertyValue(
- OUString::createFromAscii("Uri"), -1,
+ OUString("Uri"), -1,
uno::makeAny(aURL),
beans::PropertyState_DIRECT_VALUE);
aException <<=
ucb::InteractiveAugmentedIOException(
- OUString::createFromAscii( "Not found!" ),
+ OUString( "Not found!" ),
static_cast< cppu::OWeakObject * >( this ),
task::InteractionClassification_ERROR,
ucb::IOErrorCode_NOT_EXISTING,
@@ -3236,7 +3207,7 @@ uno::Any Content::MapDAVException( const DAVException & e, sal_Bool bWrite )
#if 1
aException <<=
ucb::InteractiveLockingLockedException(
- OUString::createFromAscii( "Locked!" ),
+ OUString( "Locked!" ),
static_cast< cppu::OWeakObject * >( this ),
task::InteractionClassification_ERROR,
aURL,
@@ -3245,13 +3216,13 @@ uno::Any Content::MapDAVException( const DAVException & e, sal_Bool bWrite )
{
uno::Sequence< uno::Any > aArgs( 1 );
aArgs[ 0 ] <<= beans::PropertyValue(
- OUString::createFromAscii("Uri"), -1,
+ OUString("Uri"), -1,
uno::makeAny(aURL),
beans::PropertyState_DIRECT_VALUE);
aException <<=
ucb::InteractiveAugmentedIOException(
- OUString::createFromAscii( "Locked!" ),
+ OUString( "Locked!" ),
static_cast< cppu::OWeakObject * >( this ),
task::InteractionClassification_ERROR,
ucb::IOErrorCode_LOCKING_VIOLATION,
@@ -3263,7 +3234,7 @@ uno::Any Content::MapDAVException( const DAVException & e, sal_Bool bWrite )
case DAVException::DAV_LOCKED_SELF:
aException <<=
ucb::InteractiveLockingLockedException(
- OUString::createFromAscii( "Locked (self)!" ),
+ OUString( "Locked (self)!" ),
static_cast< cppu::OWeakObject * >( this ),
task::InteractionClassification_ERROR,
aURL,
@@ -3273,7 +3244,7 @@ uno::Any Content::MapDAVException( const DAVException & e, sal_Bool bWrite )
case DAVException::DAV_NOT_LOCKED:
aException <<=
ucb::InteractiveLockingNotLockedException(
- OUString::createFromAscii( "Not locked!" ),
+ OUString( "Not locked!" ),
static_cast< cppu::OWeakObject * >( this ),
task::InteractionClassification_ERROR,
aURL );
@@ -3282,7 +3253,7 @@ uno::Any Content::MapDAVException( const DAVException & e, sal_Bool bWrite )
case DAVException::DAV_LOCK_EXPIRED:
aException <<=
ucb::InteractiveLockingLockExpiredException(
- OUString::createFromAscii( "Lock expired!" ),
+ OUString( "Lock expired!" ),
static_cast< cppu::OWeakObject * >( this ),
task::InteractionClassification_ERROR,
aURL );
@@ -3381,16 +3352,11 @@ const Content::ResourceType & Content::getResourceType(
std::vector< DAVResource > resources;
std::vector< OUString > aPropNames;
uno::Sequence< beans::Property > aProperties( 5 );
- aProperties[ 0 ].Name
- = OUString::createFromAscii( "IsFolder" );
- aProperties[ 1 ].Name
- = OUString::createFromAscii( "IsDocument" );
- aProperties[ 2 ].Name
- = OUString::createFromAscii( "IsReadOnly" );
- aProperties[ 3 ].Name
- = OUString::createFromAscii( "MediaType" );
- aProperties[ 4 ].Name
- = DAVProperties::SUPPORTEDLOCK;
+ aProperties[ 0 ].Name = "IsFolder";
+ aProperties[ 1 ].Name = "IsDocument";
+ aProperties[ 2 ].Name = "IsReadOnly";
+ aProperties[ 3 ].Name = "MediaType";
+ aProperties[ 4 ].Name = DAVProperties::SUPPORTEDLOCK;
ContentProperties::UCBNamesToDAVNames(
aProperties, aPropNames );
diff --git a/ucb/source/ucp/webdav/webdavdatasupplier.cxx b/ucb/source/ucp/webdav/webdavdatasupplier.cxx
index 6834734f0e5a..794b41b136f2 100644
--- a/ucb/source/ucp/webdav/webdavdatasupplier.cxx
+++ b/ucb/source/ucp/webdav/webdavdatasupplier.cxx
@@ -148,12 +148,12 @@ OUString DataSupplier::queryContentIdentifierString( sal_uInt32 nIndex )
= *( m_pImpl->m_aResults[ nIndex ]->pData );
if ( ( aId.lastIndexOf( '/' ) + 1 ) != aId.getLength() )
- aId += OUString::createFromAscii( "/" );
+ aId += "/";
aId += props.getEscapedTitle();
if ( props.isTrailingSlash() )
- aId += OUString::createFromAscii( "/" );
+ aId += "/";
m_pImpl->m_aResults[ nIndex ]->aId = aId;
return aId;
diff --git a/ucb/source/ucp/webdav/webdavprovider.cxx b/ucb/source/ucp/webdav/webdavprovider.cxx
index 3bbd12b7a260..e9ae31e313a5 100644
--- a/ucb/source/ucp/webdav/webdavprovider.cxx
+++ b/ucb/source/ucp/webdav/webdavprovider.cxx
@@ -152,10 +152,8 @@ XTYPEPROVIDER_IMPL_3( ContentProvider,
//=========================================================================
XSERVICEINFO_IMPL_1( ContentProvider,
- OUString::createFromAscii(
- "com.sun.star.comp.WebDAVContentProvider" ),
- OUString::createFromAscii(
- WEBDAV_CONTENT_PROVIDER_SERVICE_NAME ) );
+ OUString( "com.sun.star.comp.WebDAVContentProvider" ),
+ OUString( WEBDAV_CONTENT_PROVIDER_SERVICE_NAME ) );
//=========================================================================
//
@@ -205,24 +203,21 @@ ContentProvider::queryContent(
{
aURL = aURL.replaceAt( 0,
WEBDAV_URL_SCHEME_LENGTH,
- OUString::createFromAscii(
- HTTP_URL_SCHEME ) );
+ OUString( HTTP_URL_SCHEME ) );
bNewId = true;
}
else if ( aScheme == DAV_URL_SCHEME )
{
aURL = aURL.replaceAt( 0,
DAV_URL_SCHEME_LENGTH,
- OUString::createFromAscii(
- HTTP_URL_SCHEME ) );
+ OUString( HTTP_URL_SCHEME ) );
bNewId = true;
}
else if ( aScheme == DAVS_URL_SCHEME )
{
aURL = aURL.replaceAt( 0,
DAVS_URL_SCHEME_LENGTH,
- OUString::createFromAscii(
- HTTPS_URL_SCHEME ) );
+ OUString( HTTPS_URL_SCHEME ) );
bNewId = true;
}
@@ -237,7 +232,7 @@ ContentProvider::queryContent(
nPos = aURL.indexOf( '/', nPos + 1 );
if ( nPos == -1 )
{
- aURL += OUString::createFromAscii( "/" );
+ aURL += "/";
bNewId = true;
}
}
diff --git a/ucb/source/ucp/webdav/webdavresponseparser.cxx b/ucb/source/ucp/webdav/webdavresponseparser.cxx
index c77725f1ef58..1b870869c640 100644
--- a/ucb/source/ucp/webdav/webdavresponseparser.cxx
+++ b/ucb/source/ucp/webdav/webdavresponseparser.cxx
@@ -50,14 +50,11 @@ namespace
WebDAVNamespace StrToWebDAVNamespace(const OUString& rStr)
{
- static OUString aStrDAV(OUString::createFromAscii("DAV:"));
- static OUString aStrUcbOpenofficeOrgDAVProps(OUString::createFromAscii("http://ucb.openoffice.org/dav/props/"));
-
- if(rStr.equals(aStrDAV))
+ if(rStr == "DAV:")
{
return WebDAVNamespace_DAV;
}
- else if(rStr.equals(aStrUcbOpenofficeOrgDAVProps))
+ else if(rStr == "http://ucb.openoffice.org/dav/props/")
{
return WebDAVNamespace_ucb_openoffice_org_dav_props;
}
@@ -105,25 +102,25 @@ namespace
if(aWebDAVNameMapperList.empty())
{
- aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString::createFromAscii("multistatus"), WebDAVName_multistatus));
- aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString::createFromAscii("response"), WebDAVName_response));
- aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString::createFromAscii("href"), WebDAVName_href));
- aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString::createFromAscii("propstat"), WebDAVName_propstat));
- aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString::createFromAscii("prop"), WebDAVName_prop));
- aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString::createFromAscii("resourcetype"), WebDAVName_resourcetype));
- aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString::createFromAscii("collection"), WebDAVName_collection));
- aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString::createFromAscii("getcontenttype"), WebDAVName_getcontenttype));
- aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString::createFromAscii("supportedlock"), WebDAVName_supportedlock));
- aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString::createFromAscii("lockentry"), WebDAVName_lockentry));
- aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString::createFromAscii("lockscope"), WebDAVName_lockscope));
- aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString::createFromAscii("exclusive"), WebDAVName_exclusive));
- aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString::createFromAscii("locktype"), WebDAVName_locktype));
- aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString::createFromAscii("write"), WebDAVName_write));
- aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString::createFromAscii("shared"), WebDAVName_shared));
- aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString::createFromAscii("status"), WebDAVName_status));
- aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString::createFromAscii("getlastmodified"), WebDAVName_getlastmodified));
- aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString::createFromAscii("creationdate"), WebDAVName_creationdate));
- aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString::createFromAscii("getcontentlength"), WebDAVName_getcontentlength));
+ aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("multistatus"), WebDAVName_multistatus));
+ aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("response"), WebDAVName_response));
+ aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("href"), WebDAVName_href));
+ aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("propstat"), WebDAVName_propstat));
+ aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("prop"), WebDAVName_prop));
+ aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("resourcetype"), WebDAVName_resourcetype));
+ aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("collection"), WebDAVName_collection));
+ aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("getcontenttype"), WebDAVName_getcontenttype));
+ aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("supportedlock"), WebDAVName_supportedlock));
+ aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("lockentry"), WebDAVName_lockentry));
+ aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("lockscope"), WebDAVName_lockscope));
+ aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("exclusive"), WebDAVName_exclusive));
+ aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("locktype"), WebDAVName_locktype));
+ aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("write"), WebDAVName_write));
+ aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("shared"), WebDAVName_shared));
+ aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("status"), WebDAVName_status));
+ aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("getlastmodified"), WebDAVName_getlastmodified));
+ aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("creationdate"), WebDAVName_creationdate));
+ aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("getcontentlength"), WebDAVName_getcontentlength));
}
const WebDAVNameMapper::const_iterator aResult(aWebDAVNameMapperList.find(rStr));
@@ -182,7 +179,6 @@ namespace
void WebDAVContext::parseForNamespaceTokens(const uno::Reference< xml::sax::XAttributeList >& xAttribs)
{
const sal_Int16 nAttributes(xAttribs->getLength());
- static OUString aStrXmlns(OUString::createFromAscii("xmlns"));
for(sal_Int16 a(0); a < nAttributes; a++)
{
@@ -191,7 +187,7 @@ namespace
if(nLen)
{
- if(aName.match(aStrXmlns, 0))
+ if(aName.startsWith("xmlns"))
{
const sal_Int32 nIndex(aName.indexOf(':', 0));
@@ -550,10 +546,9 @@ namespace
// getlastmodified end, safe if content is correct
if(propertyIsReady())
{
- static OUString aStr(OUString::createFromAscii("DAV:getlastmodified"));
http_dav_ucp::DAVPropertyValue aDAVPropertyValue;
- aDAVPropertyValue.Name = aStr;
+ aDAVPropertyValue.Name = "DAV:getlastmodified";
aDAVPropertyValue.Value <<= mpContext->getWhiteSpace();
maPropStatProperties.push_back(aDAVPropertyValue);
}
@@ -564,10 +559,9 @@ namespace
// creationdate end, safe if content is correct
if(propertyIsReady())
{
- static OUString aStr(OUString::createFromAscii("DAV:creationdate"));
http_dav_ucp::DAVPropertyValue aDAVPropertyValue;
- aDAVPropertyValue.Name = aStr;
+ aDAVPropertyValue.Name = "DAV:creationdate";
aDAVPropertyValue.Value <<= mpContext->getWhiteSpace();
maPropStatProperties.push_back(aDAVPropertyValue);
}
@@ -587,12 +581,10 @@ namespace
// resourcetype end, check for collection
if(hasParent(WebDAVName_prop))
{
- static OUString aStrA(OUString::createFromAscii("DAV:resourcetype"));
- static OUString aStrB(OUString::createFromAscii("collection"));
http_dav_ucp::DAVPropertyValue aDAVPropertyValue;
- aDAVPropertyValue.Name = aStrA;
- aDAVPropertyValue.Value <<= (mbResourceTypeCollection ? aStrB : OUString());
+ aDAVPropertyValue.Name = "DAV:resourcetype";
+ aDAVPropertyValue.Value <<= (mbResourceTypeCollection ? OUString("collection") : OUString());
maPropStatProperties.push_back(aDAVPropertyValue);
}
break;
@@ -602,10 +594,9 @@ namespace
// getcontentlength end, safe if content is correct
if(propertyIsReady())
{
- static OUString aStr(OUString::createFromAscii("DAV:getcontentlength"));
http_dav_ucp::DAVPropertyValue aDAVPropertyValue;
- aDAVPropertyValue.Name = aStr;
+ aDAVPropertyValue.Name = "DAV:getcontentlength";
aDAVPropertyValue.Value <<= mpContext->getWhiteSpace();
maPropStatProperties.push_back(aDAVPropertyValue);
}
@@ -616,10 +607,9 @@ namespace
// getcontenttype end, safe if content is correct
if(propertyIsReady())
{
- static OUString aStr(OUString::createFromAscii("DAV:getcontenttype"));
http_dav_ucp::DAVPropertyValue aDAVPropertyValue;
- aDAVPropertyValue.Name = aStr;
+ aDAVPropertyValue.Name = "DAV:getcontenttype";
aDAVPropertyValue.Value <<= mpContext->getWhiteSpace();
maPropStatProperties.push_back(aDAVPropertyValue);
}
@@ -630,10 +620,9 @@ namespace
// supportedlock end
if(hasParent(WebDAVName_prop) && maLockEntries.hasElements())
{
- static OUString aStr(OUString::createFromAscii("DAV:supportedlock"));
http_dav_ucp::DAVPropertyValue aDAVPropertyValue;
- aDAVPropertyValue.Name = aStr;
+ aDAVPropertyValue.Name = "DAV:supportedlock";
aDAVPropertyValue.Value <<= maLockEntries;
maPropStatProperties.push_back(aDAVPropertyValue);
}
@@ -689,9 +678,7 @@ namespace
// propstat end, check status
if(maStatus.getLength())
{
- static OUString aStrStatusOkay(OUString::createFromAscii("HTTP/1.1 200 OK"));
-
- if(maStatus.equals(aStrStatusOkay))
+ if(maStatus == "HTTP/1.1 200 OK")
{
if(isCollectingProperties())
{