diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2013-03-19 09:22:44 +0100 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2013-03-19 09:00:26 +0000 |
commit | 8b27d78b4afaa9c47ca0fda144c8060f2f14046b (patch) | |
tree | 2dbddceebf0f96492adc5652697e8efce8a8ba06 /ucb/source/ucp/webdav | |
parent | fe8eba5faa59ddf9ee82f3eb009daac72a0ec846 (diff) |
automated removal of RTL_CONSTASCII_USTRINGPARAM for quoted OUStrings
Done with a perl regex:
s/OUString\s*\(\s*RTL_CONSTASCII_USTRINGPARAM\s*\((\s*"[^")]*?"\s*)\)\s*\)/OUString\($1\)/gms
Change-Id: Idf28320817cdcbea6d0f7ec06a9bf51bd2c3b3ec
Reviewed-on: https://gerrit.libreoffice.org/2832
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
Diffstat (limited to 'ucb/source/ucp/webdav')
-rw-r--r-- | ucb/source/ucp/webdav/ContentProperties.cxx | 15 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/DAVProperties.cxx | 2 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/SerfSession.cxx | 2 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/webdavcontent.cxx | 23 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/webdavcontentcaps.cxx | 78 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/webdavdatasupplier.cxx | 6 |
6 files changed, 56 insertions, 70 deletions
diff --git a/ucb/source/ucp/webdav/ContentProperties.cxx b/ucb/source/ucp/webdav/ContentProperties.cxx index 9e5a4f7cd0a8..3df9f0cc7766 100644 --- a/ucb/source/ucp/webdav/ContentProperties.cxx +++ b/ucb/source/ucp/webdav/ContentProperties.cxx @@ -97,8 +97,7 @@ ContentProperties::ContentProperties( const DAVResource& rResource ) (*m_xProps)[ rtl::OUString::createFromAscii( "Title" ) ] = PropertyValue( uno::makeAny( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( "*** unknown ***" ) ) ), + rtl::OUString( "*** unknown ***" ) ), true ); } @@ -578,17 +577,17 @@ namespace DAVProperties::LOCKDISCOVERY, DAVProperties::GETETAG, - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ETag" ) ), + rtl::OUString( "ETag" ), - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DateModified" ) ), - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Last-Modified" ) ), + rtl::OUString( "DateModified" ), + rtl::OUString( "Last-Modified" ), DAVProperties::GETLASTMODIFIED, - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Size" ) ), - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Content-Length" ) ), + rtl::OUString( "Size" ), + rtl::OUString( "Content-Length" ), DAVProperties::GETCONTENTLENGTH, - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Date" ) ) + rtl::OUString( "Date" ) }; for ( sal_uInt32 n = 0; diff --git a/ucb/source/ucp/webdav/DAVProperties.cxx b/ucb/source/ucp/webdav/DAVProperties.cxx index 8f351de50912..2c1b7819753b 100644 --- a/ucb/source/ucp/webdav/DAVProperties.cxx +++ b/ucb/source/ucp/webdav/DAVProperties.cxx @@ -138,7 +138,7 @@ void DAVProperties::createUCBPropName( const char * nspace, DAVProperties::GETETAG.matchIgnoreAsciiCase( aName, 4 ) || DAVProperties::GETLASTMODIFIED.matchIgnoreAsciiCase( aName, 4 ) ) { - aNameSpace = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DAV:" ) ); + aNameSpace = rtl::OUString( "DAV:" ); } } diff --git a/ucb/source/ucp/webdav/SerfSession.cxx b/ucb/source/ucp/webdav/SerfSession.cxx index 0a98c4edf2c1..32201ef410a0 100644 --- a/ucb/source/ucp/webdav/SerfSession.cxx +++ b/ucb/source/ucp/webdav/SerfSession.cxx @@ -207,7 +207,7 @@ bool SerfSession::isHeadRequestInProgress() bool SerfSession::isSSLNeeded() { - return m_aUri.GetScheme().equalsIgnoreAsciiCase( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "https" ) ) ); + return m_aUri.GetScheme().equalsIgnoreAsciiCase( rtl::OUString( "https" ) ); } char* SerfSession::getHostinfo() diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx index 3594ddd96083..0c75ca3fd1e3 100644 --- a/ucb/source/ucp/webdav/webdavcontent.cxx +++ b/ucb/source/ucp/webdav/webdavcontent.cxx @@ -188,8 +188,7 @@ uno::Any SAL_CALL Content::queryInterface( const uno::Type & rType ) m_xSMgr, uno::UNO_QUERY_THROW ); uno::Reference< uno::XComponentContext > xCtx; xCtx.set( xProps->getPropertyValue( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ) ) ), + rtl::OUString( "DefaultContext" ) ), uno::UNO_QUERY_THROW ); uno::Reference< task::XInteractionHandler > xIH( @@ -961,7 +960,7 @@ Content::queryCreatableContentsInfo() beans::Property aProp; m_pProvider->getProperty( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) ), aProp ); + rtl::OUString( "Title" ), aProp ); uno::Sequence< beans::Property > aDocProps( 1 ); aDocProps.getArray()[ 0 ] = aProp; @@ -1383,7 +1382,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( //xProps.reset( // new ContentProperties( aUnescapedTitle ) ); xProps->addProperty( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) ), + rtl::OUString( "Title" ), uno::makeAny( aUnescapedTitle ), true ); } @@ -1393,16 +1392,16 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( xProps.reset( new ContentProperties( aUnescapedTitle, false ) ); else xProps->addProperty( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) ), + rtl::OUString( "Title" ), uno::makeAny( aUnescapedTitle ), true ); xProps->addProperty( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsFolder" ) ), + rtl::OUString( "IsFolder" ), uno::makeAny( false ), true ); xProps->addProperty( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsDocument" ) ), + rtl::OUString( "IsDocument" ), uno::makeAny( true ), true ); } @@ -1425,7 +1424,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( { // Add BaseURI property, if requested. xProps->addProperty( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BaseURI" ) ), + rtl::OUString( "BaseURI" ), uno::makeAny( getBaseURI( xResAccess ) ), true ); } @@ -1435,11 +1434,10 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( // Add CreatableContentsInfo property, if requested. sal_Bool bFolder = sal_False; xProps->getValue( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsFolder" ) ) ) + rtl::OUString( "IsFolder" ) ) >>= bFolder; xProps->addProperty( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( "CreatableContentsInfo" ) ), + rtl::OUString( "CreatableContentsInfo" ), uno::makeAny( bFolder ? queryCreatableContentsInfo() : uno::Sequence< ucb::ContentInfo >() ), @@ -3129,8 +3127,7 @@ Content::getBaseURI( const std::auto_ptr< DAVResourceAccess > & rResAccess ) { rtl::OUString aLocation; m_xCachedProps->getValue( rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "Content-Location" ) ) ) >>= aLocation; + "Content-Location" ) ) >>= aLocation; if ( aLocation.getLength() ) { try diff --git a/ucb/source/ucp/webdav/webdavcontentcaps.cxx b/ucb/source/ucp/webdav/webdavcontentcaps.cxx index 011094154092..982a2a19b9e0 100644 --- a/ucb/source/ucp/webdav/webdavcontentcaps.cxx +++ b/ucb/source/ucp/webdav/webdavcontentcaps.cxx @@ -62,8 +62,7 @@ bool ContentProvider::getProperty( // Mandatory UCB properties. m_pProps->insert( beans::Property( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( "ContentType" ) ), + rtl::OUString( "ContentType" ), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), beans::PropertyAttribute::BOUND @@ -71,8 +70,7 @@ bool ContentProvider::getProperty( m_pProps->insert( beans::Property( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( "IsDocument" ) ), + rtl::OUString( "IsDocument" ), -1, getCppuBooleanType(), beans::PropertyAttribute::BOUND @@ -80,7 +78,7 @@ bool ContentProvider::getProperty( m_pProps->insert( beans::Property( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsFolder" ) ), + rtl::OUString( "IsFolder" ), -1, getCppuBooleanType(), beans::PropertyAttribute::BOUND @@ -88,7 +86,7 @@ bool ContentProvider::getProperty( m_pProps->insert( beans::Property( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) ), + rtl::OUString( "Title" ), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), beans::PropertyAttribute::BOUND ) ); @@ -97,8 +95,7 @@ bool ContentProvider::getProperty( m_pProps->insert( beans::Property( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( "DateCreated" ) ), + rtl::OUString( "DateCreated" ), -1, getCppuType( static_cast< const util::DateTime * >( 0 ) ), beans::PropertyAttribute::BOUND @@ -106,8 +103,7 @@ bool ContentProvider::getProperty( m_pProps->insert( beans::Property( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( "DateModified" ) ), + rtl::OUString( "DateModified" ), -1, getCppuType( static_cast< const util::DateTime * >( 0 ) ), beans::PropertyAttribute::BOUND @@ -115,7 +111,7 @@ bool ContentProvider::getProperty( m_pProps->insert( beans::Property( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MediaType" ) ), + rtl::OUString( "MediaType" ), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), beans::PropertyAttribute::BOUND @@ -123,7 +119,7 @@ bool ContentProvider::getProperty( m_pProps->insert( beans::Property( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Size" ) ), + rtl::OUString( "Size" ), -1, getCppuType( static_cast< const sal_Int64 * >( 0 ) ), beans::PropertyAttribute::BOUND @@ -131,7 +127,7 @@ bool ContentProvider::getProperty( m_pProps->insert( beans::Property( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BaseURI" ) ), + rtl::OUString( "BaseURI" ), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), beans::PropertyAttribute::BOUND @@ -139,8 +135,8 @@ bool ContentProvider::getProperty( m_pProps->insert( beans::Property( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( - "CreatableContentsInfo" ) ), + rtl::OUString( + "CreatableContentsInfo" ), -1, getCppuType( static_cast< const uno::Sequence< ucb::ContentInfo > * >( 0 ) ), @@ -426,21 +422,21 @@ uno::Sequence< beans::Property > Content::getProperties( // Add mandatory properties. if ( !bHasContentType ) aPropSet.insert( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ContentType" ) ) ); + rtl::OUString( "ContentType" ) ); if ( !bHasIsDocument ) aPropSet.insert( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsDocument" ) ) ); + rtl::OUString( "IsDocument" ) ); if ( !bHasIsFolder ) aPropSet.insert( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsFolder" ) ) ); + rtl::OUString( "IsFolder" ) ); if ( !bHasTitle ) { // Always present since it can be calculated from content's URI. aPropSet.insert( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) ) ); + rtl::OUString( "Title" ) ); } // Add optional properties. @@ -449,29 +445,29 @@ uno::Sequence< beans::Property > Content::getProperties( { // Always present since it can be calculated from content's URI. aPropSet.insert( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BaseURI" ) ) ); + rtl::OUString( "BaseURI" ) ); } if ( !bHasDateCreated && bHasCreationDate ) aPropSet.insert( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DateCreated" ) ) ); + rtl::OUString( "DateCreated" ) ); if ( !bHasDateModified && bHasGetLastModified ) aPropSet.insert( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DateModified" ) ) ); + rtl::OUString( "DateModified" ) ); if ( !bHasMediaType && bHasGetContentType ) aPropSet.insert( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MediaType" ) ) ); + rtl::OUString( "MediaType" ) ); if ( !bHasSize && bHasGetContentLength ) aPropSet.insert( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Size" ) ) ); + rtl::OUString( "Size" ) ); if ( !bHasCreatableInfos ) aPropSet.insert( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( - "CreatableContentsInfo" ) ) ); + rtl::OUString( + "CreatableContentsInfo" ) ); // Add cached properties, if present and still missing. if ( xCachedProps.get() ) @@ -525,27 +521,23 @@ uno::Sequence< ucb::CommandInfo > Content::getCommands( aCmdInfo[ 0 ] = ucb::CommandInfo( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( "getCommandInfo" ) ), + rtl::OUString( "getCommandInfo" ), -1, getCppuVoidType() ); aCmdInfo[ 1 ] = ucb::CommandInfo( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( "getPropertySetInfo" ) ), + rtl::OUString( "getPropertySetInfo" ), -1, getCppuVoidType() ); aCmdInfo[ 2 ] = ucb::CommandInfo( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( "getPropertyValues" ) ), + rtl::OUString( "getPropertyValues" ), -1, getCppuType( static_cast< uno::Sequence< beans::Property > * >( 0 ) ) ); aCmdInfo[ 3 ] = ucb::CommandInfo( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( "setPropertyValues" ) ), + rtl::OUString( "setPropertyValues" ), -1, getCppuType( static_cast< uno::Sequence< beans::PropertyValue > * >( 0 ) ) ); @@ -556,18 +548,18 @@ uno::Sequence< ucb::CommandInfo > Content::getCommands( aCmdInfo[ 4 ] = ucb::CommandInfo( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "delete" ) ), + rtl::OUString( "delete" ), -1, getCppuBooleanType() ); aCmdInfo[ 5 ] = ucb::CommandInfo( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "insert" ) ), + rtl::OUString( "insert" ), -1, getCppuType( static_cast< ucb::InsertCommandArgument * >( 0 ) ) ); aCmdInfo[ 6 ] = ucb::CommandInfo( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "open" ) ), + rtl::OUString( "open" ), -1, getCppuType( static_cast< ucb::OpenCommandArgument2 * >( 0 ) ) ); @@ -578,7 +570,7 @@ uno::Sequence< ucb::CommandInfo > Content::getCommands( aCmdInfo[ 7 ] = ucb::CommandInfo( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "post" ) ), + rtl::OUString( "post" ), -1, getCppuType( static_cast< ucb::PostCommandArgument2 * >( 0 ) ) ); @@ -611,14 +603,14 @@ uno::Sequence< ucb::CommandInfo > Content::getCommands( aCmdInfo[ nPos ] = ucb::CommandInfo( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "transfer" ) ), + rtl::OUString( "transfer" ), -1, getCppuType( static_cast< ucb::TransferInfo * >( 0 ) ) ); nPos++; aCmdInfo[ nPos ] = ucb::CommandInfo( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( - "createNewContent" ) ), + rtl::OUString( + "createNewContent" ), -1, getCppuType( static_cast< ucb::ContentInfo * >( 0 ) ) ); nPos++; @@ -632,13 +624,13 @@ uno::Sequence< ucb::CommandInfo > Content::getCommands( { aCmdInfo[ nPos ] = ucb::CommandInfo( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "lock" ) ), + rtl::OUString( "lock" ), -1, getCppuVoidType() ); nPos++; aCmdInfo[ nPos ] = ucb::CommandInfo( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "unlock" ) ), + rtl::OUString( "unlock" ), -1, getCppuVoidType() ); nPos++; diff --git a/ucb/source/ucp/webdav/webdavdatasupplier.cxx b/ucb/source/ucp/webdav/webdavdatasupplier.cxx index 2d01a1eac1f8..1d1523ff84de 100644 --- a/ucb/source/ucp/webdav/webdavdatasupplier.cxx +++ b/ucb/source/ucp/webdav/webdavdatasupplier.cxx @@ -444,8 +444,7 @@ sal_Bool DataSupplier::getData() const uno::Any & rValue = pContentProperties->getValue( rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "IsFolder" ) ) ); + "IsFolder" ) ); rValue >>= bFolder; if ( !bFolder ) @@ -461,8 +460,7 @@ sal_Bool DataSupplier::getData() const uno::Any & rValue = pContentProperties->getValue( rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "IsDocument" ) ) ); + "IsDocument" ) ); rValue >>= bDocument; if ( !bDocument ) |