summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-11-19 17:06:06 +0200
committerNoel Grandin <noel@peralex.com>2013-11-20 10:07:32 +0200
commit52bbd9cc00b5a1e15e4f96b5c5fa5e75855692c1 (patch)
tree72d0d1d16806f1c785a4f79ea2c0cdfe54bb8101 /ucb
parent3af99e4d59d89c343965a928681a30f36b1007d2 (diff)
remove unnecessary RTL_CONSTASCII_STRINGPARAM in appendAscii calls
Convert code like: aStrBuf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "ln(x)" )); to: aStrBuf.append( "ln(x)" ); which compiles down to the same code. Change-Id: I24c7cb45ceb32fd7cd6ec7ed203c2a5d746f1c5c
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/ucp/webdav/SerfPropFindReqProcImpl.cxx10
-rw-r--r--ucb/source/ucp/webdav/SerfPropPatchReqProcImpl.cxx32
-rw-r--r--ucb/source/ucp/webdav/webdavprovider.cxx8
3 files changed, 25 insertions, 25 deletions
diff --git a/ucb/source/ucp/webdav/SerfPropFindReqProcImpl.cxx b/ucb/source/ucp/webdav/SerfPropFindReqProcImpl.cxx
index ccceaf486d5b..d3f9faa72ccf 100644
--- a/ucb/source/ucp/webdav/SerfPropFindReqProcImpl.cxx
+++ b/ucb/source/ucp/webdav/SerfPropFindReqProcImpl.cxx
@@ -96,7 +96,7 @@ serf_bucket_t * SerfPropFindReqProcImpl::createSerfRequestBucket( serf_request_t
// TODO is it really needed a Unicode string buffer?
// All properties and property names aren't supposed to be ASCII?
rtl::OUStringBuffer aBuffer;
- aBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM( PROPFIND_HEADER ));
+ aBuffer.append( PROPFIND_HEADER );
// create and fill body bucket with requested properties
const int nPropCount = ( !mbOnlyPropertyNames && mpPropNames )
@@ -104,7 +104,7 @@ serf_bucket_t * SerfPropFindReqProcImpl::createSerfRequestBucket( serf_request_t
: 0;
if ( nPropCount > 0 )
{
- aBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM( "<prop>" ) );
+ aBuffer.append( "<prop>" );
SerfPropName thePropName;
for ( int theIndex = 0; theIndex < nPropCount; theIndex ++ )
{
@@ -128,15 +128,15 @@ serf_bucket_t * SerfPropFindReqProcImpl::createSerfRequestBucket( serf_request_t
{
if ( mbOnlyPropertyNames )
{
- aBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM( "<propname/>" ));
+ aBuffer.append( "<propname/>" );
}
else
{
- aBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM( "<allprop/>" ));
+ aBuffer.append( "<allprop/>" );
}
}
- aBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM( PROPFIND_TRAILER ));
+ aBuffer.append( PROPFIND_TRAILER );
aBodyText = rtl::OUStringToOString( aBuffer.makeStringAndClear(), RTL_TEXTENCODING_UTF8 );
body_bkt = serf_bucket_simple_copy_create( aBodyText.getStr(),
aBodyText.getLength(),
diff --git a/ucb/source/ucp/webdav/SerfPropPatchReqProcImpl.cxx b/ucb/source/ucp/webdav/SerfPropPatchReqProcImpl.cxx
index c3e95b4a60d9..809a81e12cdd 100644
--- a/ucb/source/ucp/webdav/SerfPropPatchReqProcImpl.cxx
+++ b/ucb/source/ucp/webdav/SerfPropPatchReqProcImpl.cxx
@@ -68,14 +68,14 @@ serf_bucket_t * SerfPropPatchReqProcImpl::createSerfRequestBucket( serf_request_
{
rtl::OUStringBuffer aBuffer;
// add PropPatch xml header in front
- aBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM( PROPPATCH_HEADER ));
+ aBuffer.append( PROPPATCH_HEADER );
// <*operation code*><prop>
ProppatchOperation lastOp = (*mpProperties)[ 0 ].operation;
- aBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM( "<" ));
+ aBuffer.append( "<" );
aBuffer.appendAscii( OpCode[lastOp].str, OpCode[lastOp].len );
- aBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM( "><prop>" ));
+ aBuffer.append( "><prop>" );
SerfPropName thePropName;
for ( int n = 0; n < nPropCount; ++n )
@@ -88,24 +88,24 @@ serf_bucket_t * SerfPropPatchReqProcImpl::createSerfRequestBucket( serf_request_
if ( rProperty.operation != lastOp )
{
// </prop></*last operation code*><*operation code><prop>
- aBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM( "</prop></" ));
+ aBuffer.append( "</prop></" );
aBuffer.appendAscii( OpCode[lastOp].str, OpCode[lastOp].len );
- aBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM( "><" ));
+ aBuffer.append( "><" );
aBuffer.appendAscii( OpCode[rProperty.operation].str, OpCode[rProperty.operation].len );
- aBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM( "><prop>" ));
+ aBuffer.append( "><prop>" );
}
// <*propname* xmlns="*propns*"
- aBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM( "<" ));
+ aBuffer.append( "<" );
aBuffer.appendAscii( thePropName.name );
- aBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM( " xmlns=\"" ));
+ aBuffer.append( " xmlns=\"" );
aBuffer.appendAscii( thePropName.nspace );
- aBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM( "\"" ));
+ aBuffer.append( "\"" );
if ( rProperty.operation == PROPSET )
{
// >*property value*</*propname*>
- aBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM( ">" ));
+ aBuffer.append( ">" );
OUString aStringValue;
if ( DAVProperties::isUCBDeadProperty( thePropName ) )
@@ -118,26 +118,26 @@ serf_bucket_t * SerfPropPatchReqProcImpl::createSerfRequestBucket( serf_request_
rProperty.value >>= aStringValue;
}
aBuffer.append( aStringValue );
- aBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM( "</" ));
+ aBuffer.append( "</" );
aBuffer.appendAscii( thePropName.name );
- aBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM( ">" ));
+ aBuffer.append( ">" );
}
else
{
// />
- aBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM( "/>" ));
+ aBuffer.append( "/>" );
}
lastOp = rProperty.operation;
}
// </prop></*last operation code*>
- aBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM( "</prop></" ));
+ aBuffer.append( "</prop></" );
aBuffer.appendAscii( OpCode[lastOp].str, OpCode[lastOp].len );
- aBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM( ">" ));
+ aBuffer.append( ">" );
// add PropPatch xml trailer at end
- aBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM( PROPPATCH_TRAILER ));
+ aBuffer.append( PROPPATCH_TRAILER );
aBodyText = rtl::OUStringToOString( aBuffer.makeStringAndClear(), RTL_TEXTENCODING_UTF8 );
body_bkt = serf_bucket_simple_copy_create( aBodyText.getStr(),
diff --git a/ucb/source/ucp/webdav/webdavprovider.cxx b/ucb/source/ucp/webdav/webdavprovider.cxx
index 2389dc479b3f..3bbd12b7a260 100644
--- a/ucb/source/ucp/webdav/webdavprovider.cxx
+++ b/ucb/source/ucp/webdav/webdavprovider.cxx
@@ -35,18 +35,18 @@ using namespace http_dav_ucp;
OUString &WebDAVUserAgent::operator()() const
{
OUStringBuffer aBuffer;
- aBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM( "$ooName/$ooSetupVersion" ));
+ aBuffer.append( "$ooName/$ooSetupVersion" );
#if OSL_DEBUG_LEVEL > 0
#ifdef APR_VERSION
- aBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM( " apr/" APR_VERSION ));
+ aBuffer.append( " apr/" APR_VERSION );
#endif
#ifdef APR_UTIL_VERSION
- aBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM( " apr-util/" APR_UTIL_VERSION ));
+ aBuffer.append( " apr-util/" APR_UTIL_VERSION );
#endif
#ifdef SERF_VERSION
- aBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM( " serf/" SERF_VERSION ));
+ aBuffer.append( " serf/" SERF_VERSION );
#endif
#endif
static OUString aUserAgent( aBuffer.makeStringAndClear() );