summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-11-14 13:13:19 +0200
committerNoel Grandin <noel@peralex.com>2013-11-19 10:29:30 +0200
commit2c35fff7eca3a143d28dc75e6a73fe1101d2af77 (patch)
treefb31b64880b06b0e2bd867aa6216ae0259c7c091 /ucb
parentccc297097891e62489e5d281a4ea128ec6b71361 (diff)
remove most use of RTL_CONSTASCII_USTRINGPARAM macro
This is largely unnecessary when working with OUString Change-Id: I3cf4d68357a43665d01162ef4a2d5346a45da9be
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/ucp/webdav/webdavcontent.cxx26
-rw-r--r--ucb/source/ucp/webdav/webdavcontentcaps.cxx4
-rw-r--r--ucb/source/ucp/webdav/webdavprovider.cxx14
3 files changed, 18 insertions, 26 deletions
diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx
index 6269bd1a8e82..b81c3c031876 100644
--- a/ucb/source/ucp/webdav/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav/webdavcontent.cxx
@@ -91,8 +91,8 @@ static void lcl_sendPartialGETRequest( bool &bError,
DAVRequestHeaders aPartialGet;
aPartialGet.push_back(
DAVRequestHeader(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Range" ) ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "bytes=0-0" ))));
+ OUString( "Range" ),
+ OUString( "bytes=0-0" )));
for ( std::vector< rtl::OUString >::const_iterator it = aHeaderNames.begin();
it != aHeaderNames.end(); ++it )
@@ -108,8 +108,8 @@ static void lcl_sendPartialGETRequest( bool &bError,
{
// we need to know if the server accepts range requests for a resource
// and the range unit it uses
- aHeaderNames.push_back( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Accept-Ranges" ) ) );
- aHeaderNames.push_back( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Content-Range" ) ) );
+ aHeaderNames.push_back( OUString( "Accept-Ranges" ) );
+ aHeaderNames.push_back( OUString( "Content-Range" ) );
}
try
{
@@ -734,8 +734,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 );
@@ -751,8 +750,7 @@ uno::Any SAL_CALL Content::execute(
{
ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
- "Wrong argument type!" )),
+ OUString( "Wrong argument type!" ),
static_cast< cppu::OWeakObject * >( this ),
-1 ) ),
Environment );
@@ -784,8 +782,7 @@ uno::Any SAL_CALL Content::execute(
{
ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
- "Wrong argument type!" )),
+ OUString( "Wrong argument type!" ),
static_cast< cppu::OWeakObject * >( this ),
-1 ) ),
Environment );
@@ -872,23 +869,20 @@ throw( beans::PropertyExistException,
// check property Name
if ( !aProperty.Name.getLength() )
throw lang::IllegalArgumentException(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
- "\"addProperty\" with empty Property.Name")),
+ OUString( "\"addProperty\" with empty Property.Name"),
static_cast< ::cppu::OWeakObject * >( this ),
-1 );
// Check property type.
if ( !UCBDeadPropertyValue::supportsType( aProperty.Type ) )
throw beans::IllegalTypeException(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
- "\"addProperty\" unsupported Property.Type")),
+ OUString( "\"addProperty\" unsupported Property.Type"),
static_cast< ::cppu::OWeakObject * >( this ) );
// check default value
if ( aDefaultValue.hasValue() && aDefaultValue.getValueType() != aProperty.Type )
throw beans::IllegalTypeException(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
- "\"addProperty\" DefaultValue does not match Property.Type")),
+ OUString( "\"addProperty\" DefaultValue does not match Property.Type"),
static_cast< ::cppu::OWeakObject * >( this ) );
//////////////////////////////////////////////////////////////////////
diff --git a/ucb/source/ucp/webdav/webdavcontentcaps.cxx b/ucb/source/ucp/webdav/webdavcontentcaps.cxx
index 89331674f011..921d8e79378f 100644
--- a/ucb/source/ucp/webdav/webdavcontentcaps.cxx
+++ b/ucb/source/ucp/webdav/webdavcontentcaps.cxx
@@ -556,13 +556,13 @@ uno::Sequence< ucb::CommandInfo > Content::getCommands(
ucb::PostCommandArgument2 * >( 0 ) ) );
aCmdInfo[ 8 ] =
ucb::CommandInfo(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "addProperty" ) ),
+ OUString( "addProperty" ),
-1,
getCppuType( static_cast<
ucb::PropertyCommandArgument * >( 0 ) ) );
aCmdInfo[ 9 ] =
ucb::CommandInfo(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "removeProperty" ) ),
+ OUString( "removeProperty" ),
-1,
getCppuType( static_cast<
rtl::OUString * >( 0 ) ) );
diff --git a/ucb/source/ucp/webdav/webdavprovider.cxx b/ucb/source/ucp/webdav/webdavprovider.cxx
index cb2dc41232fe..2389dc479b3f 100644
--- a/ucb/source/ucp/webdav/webdavprovider.cxx
+++ b/ucb/source/ucp/webdav/webdavprovider.cxx
@@ -77,25 +77,23 @@ ContentProvider::ContentProvider(
::comphelper::getProcessComponentContext() );
uno::Reference< lang::XMultiServiceFactory > xConfigProvider(
xContext->getServiceManager()->createInstanceWithContext(
- OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.configuration.ConfigurationProvider")), xContext),
+ OUString("com.sun.star.configuration.ConfigurationProvider"), xContext),
uno::UNO_QUERY_THROW );
beans::NamedValue aNodePath;
- aNodePath.Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "nodepath" ) );
- aNodePath.Value <<= OUString( RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Setup/Product"));
+ aNodePath.Name = "nodepath";
+ aNodePath.Value <<= OUString( "/org.openoffice.Setup/Product");
uno::Sequence< uno::Any > aArgs( 1 );
aArgs[0] <<= aNodePath;
uno::Reference< container::XNameAccess > xConfigAccess(
xConfigProvider->createInstanceWithArguments(
- OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.configuration.ConfigurationAccess")), aArgs),
+ OUString("com.sun.star.configuration.ConfigurationAccess"), aArgs),
uno::UNO_QUERY_THROW );
OUString aVal;
- xConfigAccess->getByName(OUString(RTL_CONSTASCII_USTRINGPARAM("ooName"))) >>= aVal;
+ xConfigAccess->getByName(OUString("ooName")) >>= aVal;
OUString &aUserAgent = WebDAVUserAgent::get();
sal_Int32 nIndex = aUserAgent.indexOfAsciiL( RTL_CONSTASCII_STRINGPARAM( "$ooName" ) );
@@ -103,7 +101,7 @@ ContentProvider::ContentProvider(
return;
aUserAgent = aUserAgent.replaceAt( nIndex, RTL_CONSTASCII_LENGTH( "$ooName" ), aVal );
- xConfigAccess->getByName(OUString(RTL_CONSTASCII_USTRINGPARAM("ooSetupVersion"))) >>= aVal;
+ xConfigAccess->getByName(OUString("ooSetupVersion")) >>= aVal;
nIndex = aUserAgent.indexOfAsciiL( RTL_CONSTASCII_STRINGPARAM( "$ooSetupVersion" ) );
if ( !aVal.getLength() || nIndex == -1 )
return;