diff options
author | Noel Grandin <noel@peralex.com> | 2013-10-25 17:17:50 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-11-04 10:11:07 +0200 |
commit | aeb41c9b9b7559c6d87bf92807acdc0df9e104cc (patch) | |
tree | 5a36bcd5af873c2b597fcda5fbd7e2f76f997669 /ucb | |
parent | 57c2de08ddf14c0da80de06736d99382ad036539 (diff) |
remove redundant calls to OUString constructor
Change code like this:
aStr = OUString("xxxx");
into this:
aStr = "xxxx";
Change-Id: I31cb92e21658d57bb9e14b65c179536eae8096f6
Diffstat (limited to 'ucb')
20 files changed, 79 insertions, 90 deletions
diff --git a/ucb/source/core/ucbcmds.cxx b/ucb/source/core/ucbcmds.cxx index 87a677305c37..d969330c615c 100644 --- a/ucb/source/core/ucbcmds.cxx +++ b/ucb/source/core/ucbcmds.cxx @@ -1111,7 +1111,7 @@ void handleNameClashRename( aOldTitlePre = aOldTitle; if ( nPos > 0 ) - aOldTitlePre += OUString("_"); + aOldTitlePre += "_"; sal_Bool bContinue = sal_True; do diff --git a/ucb/source/ucp/file/bc.cxx b/ucb/source/ucp/file/bc.cxx index 302149cc11bf..e179bfd7af8b 100644 --- a/ucb/source/ucp/file/bc.cxx +++ b/ucb/source/ucp/file/bc.cxx @@ -910,7 +910,7 @@ BaseContent::setPropertyValues( // m_aUncPath contains parent's URI. if( m_aUncPath.lastIndexOf( sal_Unicode('/') ) != m_aUncPath.getLength() - 1 ) - m_aUncPath += OUString("/"); + m_aUncPath += "/"; m_aUncPath += rtl::Uri::encode( NewTitle, rtl_UriCharClassPchar, @@ -951,7 +951,7 @@ BaseContent::setPropertyValues( OUString aDstName = getParentName( m_aUncPath ); if( aDstName.lastIndexOf( sal_Unicode('/') ) != aDstName.getLength() - 1 ) - aDstName += OUString("/"); + aDstName += "/"; aDstName += rtl::Uri::encode( NewTitle, rtl_UriCharClassPchar, @@ -1247,7 +1247,7 @@ void SAL_CALL BaseContent::insert( sal_Int32 nMyCommandIdentifier, m_pMyShell->clearError( nMyCommandIdentifier ); m_aUncPath = getParentName( m_aUncPath ); if( m_aUncPath.lastIndexOf( sal_Unicode('/') ) != m_aUncPath.getLength() - 1 ) - m_aUncPath += OUString("/"); + m_aUncPath += "/"; m_aUncPath += rtl::Uri::encode( aRequestImpl->newName(), rtl_UriCharClassPchar, diff --git a/ucb/source/ucp/file/shell.cxx b/ucb/source/ucp/file/shell.cxx index 538e013bf1ac..3d30f7883377 100644 --- a/ucb/source/ucp/file/shell.cxx +++ b/ucb/source/ucp/file/shell.cxx @@ -1190,8 +1190,7 @@ shell::move( sal_Int32 CommandId, { newDstUnqPath = dstUnqPath; - OUString aPostFix( "_" ); - aPostFix += OUString::number( ++nTry ); + OUString aPostFix = "_" + OUString::number( ++nTry ); newDstUnqPath = newDstUnqPath.replaceAt( nPos, 0, aPostFix ); @@ -1417,8 +1416,7 @@ shell::copy( { newDstUnqPath = dstUnqPath; - OUString aPostFix( "_" ); - aPostFix += OUString::number( ++nTry ); + OUString aPostFix = "_" + OUString::number( ++nTry ); newDstUnqPath = newDstUnqPath.replaceAt( nPos, 0, aPostFix ); @@ -2039,7 +2037,7 @@ shell::copy_recursive( const OUString& srcUnqPath, RTL_TEXTENCODING_UTF8 ); if( newDstUnqPath.lastIndexOf( sal_Unicode('/') ) != newDstUnqPath.getLength()-1 ) - newDstUnqPath += OUString("/"); + newDstUnqPath += "/"; newDstUnqPath += tit; diff --git a/ucb/source/ucp/gio/gio_content.cxx b/ucb/source/ucp/gio/gio_content.cxx index f7ce5f94a822..f2ae8412f9f8 100644 --- a/ucb/source/ucp/gio/gio_content.cxx +++ b/ucb/source/ucp/gio/gio_content.cxx @@ -550,7 +550,7 @@ void Content::queryChildren( ContentRefList& rChildren ) sal_Int32 nURLPos = aURL.lastIndexOf( '/' ); if ( nURLPos != ( aURL.getLength() - 1 ) ) - aURL += OUString("/"); + aURL += "/"; sal_Int32 nLen = aURL.getLength(); @@ -1171,7 +1171,7 @@ uno::Reference< ucb::XContent > OUString aURL = m_xIdentifier->getContentIdentifier(); if ( ( aURL.lastIndexOf( '/' ) + 1 ) != aURL.getLength() ) - aURL += OUString("/"); + aURL += "/"; name = create_document ? "[New_Content]" : "[New_Collection]"; aURL += OUString::createFromAscii( name ); diff --git a/ucb/source/ucp/gio/gio_datasupplier.cxx b/ucb/source/ucp/gio/gio_datasupplier.cxx index e6824e25631b..bc4fb049c891 100644 --- a/ucb/source/ucp/gio/gio_datasupplier.cxx +++ b/ucb/source/ucp/gio/gio_datasupplier.cxx @@ -121,7 +121,7 @@ OUString DataSupplier::queryContentIdentifierString( sal_uInt32 nIndex ) g_uri_escape_string( g_file_info_get_name(maResults[ nIndex ]->pInfo) , NULL, false); if ( ( aId.lastIndexOf( '/' ) + 1 ) != aId.getLength() ) - aId += OUString("/"); + aId += "/"; aId += OUString::createFromAscii( escaped_name ); diff --git a/ucb/source/ucp/gvfs/gvfs_content.cxx b/ucb/source/ucp/gvfs/gvfs_content.cxx index 66d3db2ffdb5..ef97acc4a34c 100644 --- a/ucb/source/ucp/gvfs/gvfs_content.cxx +++ b/ucb/source/ucp/gvfs/gvfs_content.cxx @@ -499,7 +499,7 @@ Content::createNewContent( const ucb::ContentInfo& Info ) OUString aURL = getOUURI(); if ( ( aURL.lastIndexOf( '/' ) + 1 ) != aURL.getLength() ) - aURL += OUString("/"); + aURL += "/"; name = create_document ? "[New_Content]" : "[New_Collection]"; // This looks problematic to me cf. webdav @@ -700,7 +700,7 @@ Content::makeNewURL( const char */*newName*/ ) { OUString aNewURL = getParentURL(); if ( aNewURL.lastIndexOf( '/' ) != ( aNewURL.getLength() - 1 ) ) - aNewURL += OUString("/"); + aNewURL += "/"; char *name = gnome_vfs_escape_string( m_info.name ); aNewURL += GnomeToOUString( name ); @@ -882,7 +882,7 @@ void Content::queryChildren( ContentRefList& rChildren ) sal_Int32 nURLPos = aURL.lastIndexOf( '/' ); if ( nURLPos != ( aURL.getLength() - 1 ) ) - aURL += OUString("/"); + aURL += "/"; sal_Int32 nLen = aURL.getLength(); diff --git a/ucb/source/ucp/gvfs/gvfs_directory.cxx b/ucb/source/ucp/gvfs/gvfs_directory.cxx index fb02b50ed9f9..5871baa2bd51 100644 --- a/ucb/source/ucp/gvfs/gvfs_directory.cxx +++ b/ucb/source/ucp/gvfs/gvfs_directory.cxx @@ -161,7 +161,7 @@ OUString DataSupplier::queryContentIdentifierString( sal_uInt32 nIndex ) escaped_name = gnome_vfs_escape_string( m_pImpl->m_aResults[ nIndex ]->aInfo.name ); if ( ( aId.lastIndexOf( '/' ) + 1 ) != aId.getLength() ) - aId += OUString("/"); + aId += "/"; aId += OUString::createFromAscii( escaped_name ); diff --git a/ucb/source/ucp/hierarchy/hierarchycontent.cxx b/ucb/source/ucp/hierarchy/hierarchycontent.cxx index f86f1825b5eb..b0fa90fbae7b 100644 --- a/ucb/source/ucp/hierarchy/hierarchycontent.cxx +++ b/ucb/source/ucp/hierarchy/hierarchycontent.cxx @@ -609,12 +609,12 @@ HierarchyContent::createNewContent( const ucb::ContentInfo& Info ) "HierarchyContent::createNewContent - empty identifier!" ); if ( ( aURL.lastIndexOf( '/' ) + 1 ) != aURL.getLength() ) - aURL += OUString("/"); + aURL += "/"; if ( bCreateFolder ) - aURL += OUString("New_Folder"); + aURL += "New_Folder"; else - aURL += OUString("New_Link"); + aURL += "New_Link"; uno::Reference< ucb::XContentIdentifier > xId = new ::ucbhelper::ContentIdentifier( aURL ); @@ -772,7 +772,7 @@ HierarchyContent::makeNewIdentifier( const OUString& rTitle ) // Assemble new content identifier... HierarchyUri aUri( m_xIdentifier->getContentIdentifier() ); OUString aNewURL = aUri.getParentUri(); - aNewURL += OUString("/"); + aNewURL += "/"; aNewURL += ::ucb_impl::urihelper::encodeSegment( rTitle ); return uno::Reference< ucb::XContentIdentifier >( @@ -798,7 +798,7 @@ void HierarchyContent::queryChildren( HierarchyContentRefList& rChildren ) if ( nURLPos != ( aURL.getLength() - 1 ) ) { // No trailing slash found. Append. - aURL += OUString("/"); + aURL += "/"; } sal_Int32 nLen = aURL.getLength(); @@ -1449,7 +1449,7 @@ void HierarchyContent::insert( sal_Int32 nNameClashResolve, do { OUString aNewId = xId->getContentIdentifier(); - aNewId += OUString("_"); + aNewId += "_"; aNewId += OUString::number( ++nTry ); xId = new ::ucbhelper::ContentIdentifier( aNewId ); } @@ -1469,7 +1469,7 @@ void HierarchyContent::insert( sal_Int32 nNameClashResolve, else { OUString aNewTitle( m_aProps.getTitle() ); - aNewTitle += OUString("_"); + aNewTitle += "_"; aNewTitle += OUString::number( nTry ); m_aProps.setTitle( aNewTitle ); } @@ -1618,7 +1618,7 @@ void HierarchyContent::transfer( if ( nPos != ( aId.getLength() - 1 ) ) { // No trailing slash found. Append. - aId += OUString("/"); + aId += "/"; } if ( rInfo.SourceURL.getLength() <= aId.getLength() ) @@ -1801,7 +1801,7 @@ void HierarchyContent::transfer( OUString aChildId = xId->getContentIdentifier(); if ( ( aChildId.lastIndexOf( '/' ) + 1 ) != aChildId.getLength() ) - aChildId += OUString("/"); + aChildId += "/"; aChildId += rResult.getName(); diff --git a/ucb/source/ucp/hierarchy/hierarchydata.cxx b/ucb/source/ucp/hierarchy/hierarchydata.cxx index 25cfffe77061..814cc4702c81 100644 --- a/ucb/source/ucp/hierarchy/hierarchydata.cxx +++ b/ucb/source/ucp/hierarchy/hierarchydata.cxx @@ -170,7 +170,7 @@ sal_Bool HierarchyEntry::getData( HierarchyEntryData& rData ) if ( xRootReadAccess.is() ) { OUString aTitlePath = m_aPath; - aTitlePath += OUString("/Title"); + aTitlePath += "/Title"; // Note: Avoid NoSuchElementExceptions, because exceptions are // relatively 'expensive'. Checking for availability of @@ -194,7 +194,7 @@ sal_Bool HierarchyEntry::getData( HierarchyEntryData& rData ) // Get TargetURL value. OUString aTargetURLPath = m_aPath; - aTargetURLPath += OUString("/TargetURL"); + aTargetURLPath += "/TargetURL"; if ( !( xRootReadAccess->getByHierarchicalName( aTargetURLPath ) >>= aValue ) ) { @@ -213,7 +213,7 @@ sal_Bool HierarchyEntry::getData( HierarchyEntryData& rData ) rData.setTargetURL( aValue ); OUString aTypePath = m_aPath; - aTypePath += OUString("/Type"); + aTypePath += "/Type"; if ( xRootReadAccess->hasByHierarchicalName( aTypePath ) ) { // Might not be present since it was introduced long after @@ -921,7 +921,7 @@ sal_Bool HierarchyEntry::first( iterator& it ) if ( !m_aPath.isEmpty() ) { OUString aPath = m_aPath; - aPath += OUString("/Children"); + aPath += "/Children"; xRootHierNameAccess->getByHierarchicalName( aPath ) >>= xNameAccess; @@ -1127,9 +1127,9 @@ const HierarchyEntryData& HierarchyEntry::iterator::operator*() const OUString aTargetURL = aTitle; OUString aType = aTitle; - aTitle += OUString("/Title"); - aTargetURL += OUString("/TargetURL"); - aType += OUString("/Type"); + aTitle += "/Title"; + aTargetURL += "/TargetURL"; + aType += "/Type"; OUString aValue; m_pImpl->dir->getByHierarchicalName( aTitle ) >>= aValue; diff --git a/ucb/source/ucp/hierarchy/hierarchydatasupplier.cxx b/ucb/source/ucp/hierarchy/hierarchydatasupplier.cxx index dcb300bdb479..a27f462c06db 100644 --- a/ucb/source/ucp/hierarchy/hierarchydatasupplier.cxx +++ b/ucb/source/ucp/hierarchy/hierarchydatasupplier.cxx @@ -152,7 +152,7 @@ OUString HierarchyResultSetDataSupplier::queryContentIdentifierString( = m_pImpl->m_xContent->getIdentifier()->getContentIdentifier(); if ( ( aId.lastIndexOf( '/' ) + 1 ) != aId.getLength() ) - aId += OUString("/"); + aId += "/"; aId += m_pImpl->m_aResults[ nIndex ]->aData.getName(); diff --git a/ucb/source/ucp/hierarchy/hierarchyuri.cxx b/ucb/source/ucp/hierarchy/hierarchyuri.cxx index fdbf1a7b957d..5f50aac9fcaf 100644 --- a/ucb/source/ucp/hierarchy/hierarchyuri.cxx +++ b/ucb/source/ucp/hierarchy/hierarchyuri.cxx @@ -75,7 +75,7 @@ void HierarchyUri::init() const if ( m_aUri.getLength() == HIERARCHY_URL_SCHEME_LENGTH + 1 ) { // root folder URI without path and service specifier. - m_aUri += OUString( "//" DEFAULT_DATA_SOURCE_SERVICE "/" ); + m_aUri += "//" DEFAULT_DATA_SOURCE_SERVICE "/"; m_aService = OUString( DEFAULT_DATA_SOURCE_SERVICE ); nPos = m_aUri.getLength() - 1; @@ -85,7 +85,7 @@ void HierarchyUri::init() const ( m_aUri[ HIERARCHY_URL_SCHEME_LENGTH + 1 ] == '/' ) ) { // root folder URI without service specifier. - m_aUri += OUString( "/" DEFAULT_DATA_SOURCE_SERVICE "/" ); + m_aUri += "/" DEFAULT_DATA_SOURCE_SERVICE "/"; m_aService = OUString( DEFAULT_DATA_SOURCE_SERVICE ); nPos = m_aUri.getLength() - 1; @@ -144,7 +144,7 @@ void HierarchyUri::init() const { // Trailing slash missing. nEnd = m_aUri.getLength(); - m_aUri += OUString("/"); + m_aUri += "/"; } m_aService = m_aUri.copy( nStart, nEnd - nStart ); diff --git a/ucb/source/ucp/package/pkgcontent.cxx b/ucb/source/ucp/package/pkgcontent.cxx index c6578482843b..b8eb22e21877 100644 --- a/ucb/source/ucp/package/pkgcontent.cxx +++ b/ucb/source/ucp/package/pkgcontent.cxx @@ -728,13 +728,13 @@ Content::createNewContent( const ucb::ContentInfo& Info ) return uno::Reference< ucb::XContent >(); OUString aURL = m_aUri.getUri(); - aURL += OUString("/"); + aURL += "/"; if ( Info.Type.equalsIgnoreAsciiCase( getContentType( m_aUri.getScheme(), sal_True ) ) ) - aURL += OUString("New_Folder"); + aURL += "New_Folder"; else - aURL += OUString("New_Stream"); + aURL += "New_Stream"; uno::Reference< ucb::XContentIdentifier > xId( new ::ucbhelper::ContentIdentifier( aURL ) ); @@ -1371,7 +1371,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( // Assemble new content identifier... OUString aNewURL = m_aUri.getParentUri(); - aNewURL += OUString("/"); + aNewURL += "/"; aNewURL += ::ucb_impl::urihelper::encodeSegment( aNewTitle ); uno::Reference< ucb::XContentIdentifier > xNewId = new ::ucbhelper::ContentIdentifier( aNewURL ); @@ -1635,7 +1635,7 @@ void Content::insert( OUString aNewURL = m_aUri.getParentUri(); if (1 + aNewURL.lastIndexOf('/') != aNewURL.getLength()) - aNewURL += OUString("/"); + aNewURL += "/"; aNewURL += ::ucb_impl::urihelper::encodeSegment( m_aProps.aTitle ); PackageUri aNewUri( aNewURL ); @@ -1670,7 +1670,7 @@ void Content::insert( do { OUString aNew = aNewUri.getUri(); - aNew += OUString("_"); + aNew += "_"; aNew += OUString::number( ++nTry ); aNewUri.setUri( aNew ); } @@ -1689,7 +1689,7 @@ void Content::insert( } else { - m_aProps.aTitle += OUString("_"); + m_aProps.aTitle += "_"; m_aProps.aTitle += OUString::number( nTry ); } } @@ -1835,7 +1835,7 @@ void Content::transfer( // Is source not a parent of me / not me? OUString aId = m_aUri.getParentUri(); - aId += OUString("/"); + aId += "/"; if ( rInfo.SourceURL.getLength() <= aId.getLength() ) { @@ -2035,7 +2035,7 @@ void Content::transfer( OUString aChildId = xId->getContentIdentifier(); if ( ( aChildId.lastIndexOf( '/' ) + 1 ) != aChildId.getLength() ) - aChildId += OUString("/"); + aChildId += "/"; aChildId += ::ucb_impl::urihelper::encodeSegment( aName ); @@ -2178,7 +2178,7 @@ void Content::queryChildren( ContentRefList& rChildren ) OSL_ENSURE( aURL.lastIndexOf( '/' ) != ( aURL.getLength() - 1 ), "Content::queryChildren - Invalid URL!" ); - aURL += OUString("/"); + aURL += "/"; sal_Int32 nLen = aURL.getLength(); diff --git a/ucb/source/ucp/package/pkgdatasupplier.cxx b/ucb/source/ucp/package/pkgdatasupplier.cxx index f0e9b8d2f995..3b39f58e9b4b 100644 --- a/ucb/source/ucp/package/pkgdatasupplier.cxx +++ b/ucb/source/ucp/package/pkgdatasupplier.cxx @@ -463,7 +463,7 @@ OUString DataSupplier::assembleChildURL( const OUString& aName ) sal_Int32 nPackageUrlEnd = aURL.lastIndexOf( '/' ); if ( nPackageUrlEnd != aURL.getLength() - 1 ) - aURL += OUString("/"); + aURL += "/"; aURL += ::ucb_impl::urihelper::encodeSegment( aName ); aURL += aContURL.copy( nParam ); @@ -474,7 +474,7 @@ OUString DataSupplier::assembleChildURL( const OUString& aName ) sal_Int32 nPackageUrlEnd = aURL.lastIndexOf( '/' ); if ( nPackageUrlEnd != aURL.getLength() - 1 ) - aURL += OUString("/"); + aURL += "/"; aURL += ::ucb_impl::urihelper::encodeSegment( aName ); } diff --git a/ucb/source/ucp/tdoc/tdoc_content.cxx b/ucb/source/ucp/tdoc/tdoc_content.cxx index 9f7c6e24fc46..54543c39b7bb 100644 --- a/ucb/source/ucp/tdoc/tdoc_content.cxx +++ b/ucb/source/ucp/tdoc/tdoc_content.cxx @@ -717,12 +717,12 @@ Content::createNewContent( const ucb::ContentInfo& Info ) "Content::createNewContent - empty identifier!" ); if ( ( aURL.lastIndexOf( '/' ) + 1 ) != aURL.getLength() ) - aURL += OUString("/"); + aURL += "/"; if ( bCreateFolder ) - aURL += OUString("New_Folder"); + aURL += "New_Folder"; else - aURL += OUString("New_Stream"); + aURL += "New_Stream"; uno::Reference< ucb::XContentIdentifier > xId = new ::ucbhelper::ContentIdentifier( aURL ); @@ -783,7 +783,7 @@ void Content::queryChildren( ContentRefList& rChildren ) if ( nURLPos != ( aURL.getLength() - 1 ) ) { // No trailing slash found. Append. - aURL += OUString("/"); + aURL += "/"; } sal_Int32 nLen = aURL.getLength(); @@ -1985,7 +1985,7 @@ void Content::transfer( if ( nPos != ( aId.getLength() - 1 ) ) { // No trailing slash found. Append. - aId += OUString("/"); + aId += "/"; } if ( rInfo.SourceURL.getLength() <= aId.getLength() ) @@ -2096,7 +2096,7 @@ void Content::transfer( OUString aTargetUri = m_xIdentifier->getContentIdentifier(); if ( ( aTargetUri.lastIndexOf( '/' ) + 1 ) != aTargetUri.getLength() ) - aTargetUri += OUString("/"); + aTargetUri += "/"; if ( !rInfo.NewTitle.isEmpty() ) aTargetUri += ::ucb_impl::urihelper::encodeSegment( rInfo.NewTitle ); diff --git a/ucb/source/ucp/tdoc/tdoc_datasupplier.cxx b/ucb/source/ucp/tdoc/tdoc_datasupplier.cxx index 6f7a55fcb279..a9ed86730478 100644 --- a/ucb/source/ucp/tdoc/tdoc_datasupplier.cxx +++ b/ucb/source/ucp/tdoc/tdoc_datasupplier.cxx @@ -429,7 +429,7 @@ ResultSetDataSupplier::assembleChildURL( const OUString& aName ) sal_Int32 nUrlEnd = aURL.lastIndexOf( '/' ); if ( nUrlEnd != aURL.getLength() - 1 ) - aURL += OUString("/"); + aURL += "/"; aURL += aName; return aURL; diff --git a/ucb/source/ucp/webdav-neon/NeonUri.cxx b/ucb/source/ucp/webdav-neon/NeonUri.cxx index 899b2275c3ea..b3488df1c095 100644 --- a/ucb/source/ucp/webdav-neon/NeonUri.cxx +++ b/ucb/source/ucp/webdav-neon/NeonUri.cxx @@ -147,16 +147,12 @@ void NeonUri::init( const OString & rUri, const ne_uri * pUri ) if ( pUri->query ) { - mPath += OUString("?"); - mPath += OStringToOUString( - pUri->query, RTL_TEXTENCODING_UTF8 ); + mPath += "?" + OStringToOUString( pUri->query, RTL_TEXTENCODING_UTF8 ); } if ( pUri->fragment ) { - mPath += OUString("#"); - mPath += OStringToOUString( - pUri->fragment, RTL_TEXTENCODING_UTF8 ); + mPath += "#" + OStringToOUString( pUri->fragment, RTL_TEXTENCODING_UTF8 ); } } @@ -255,7 +251,7 @@ OUString NeonUri::GetPathBaseNameUnescaped () const void NeonUri::AppendPath (const OUString& rPath) { if (mPath.lastIndexOf ('/') != mPath.getLength () - 1) - mPath += OUString("/"); + mPath += "/"; mPath += rPath; calculateURI (); diff --git a/ucb/source/ucp/webdav-neon/webdavcontent.cxx b/ucb/source/ucp/webdav-neon/webdavcontent.cxx index 81b27b65ad63..f117a9b7c758 100644 --- a/ucb/source/ucp/webdav-neon/webdavcontent.cxx +++ b/ucb/source/ucp/webdav-neon/webdavcontent.cxx @@ -1076,17 +1076,17 @@ Content::createNewContent( const ucb::ContentInfo& Info ) "WebdavContent::createNewContent - empty identifier!" ); if ( ( aURL.lastIndexOf( '/' ) + 1 ) != aURL.getLength() ) - aURL += OUString("/"); + aURL += "/"; sal_Bool isCollection; if ( Info.Type == WEBDAV_COLLECTION_TYPE ) { - aURL += OUString("New_Collection"); + aURL += "New_Collection"; isCollection = sal_True; } else { - aURL += OUString("New_Content"); + aURL += "New_Content"; isCollection = sal_False; } @@ -1851,7 +1851,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( OUString aNewURL = getParentURL(); if ( aNewURL.lastIndexOf( '/' ) != ( aNewURL.getLength() - 1 ) ) - aNewURL += OUString("/"); + aNewURL += "/"; aNewURL += NeonUri::escapeSegment( aNewTitle ); @@ -2225,7 +2225,7 @@ void Content::queryChildren( ContentRefList& rChildren ) if ( nURLPos != ( aURL.getLength() - 1 ) ) { // No trailing slash found. Append. - aURL += OUString("/"); + aURL += "/"; } sal_Int32 nLen = aURL.getLength(); @@ -2385,7 +2385,7 @@ void Content::insert( // Assemble new content identifier... OUString aURL = getParentURL(); if ( aURL.lastIndexOf( '/' ) != ( aURL.getLength() - 1 ) ) - aURL += OUString("/"); + aURL += "/"; aURL += aEscapedTitle; @@ -2603,7 +2603,7 @@ void Content::transfer( OUString aTargetURL = xIdentifier->getContentIdentifier(); if ( ( aTargetURL.lastIndexOf( '/' ) + 1 ) != aTargetURL.getLength() ) - aTargetURL += OUString("/"); + aTargetURL += "/"; aTargetURL += aTitle; @@ -2971,7 +2971,7 @@ uno::Any Content::MapDAVException( const DAVException & e, sal_Bool bWrite ) { aURL = getParentURL(); if ( aURL.lastIndexOf('/') != ( aURL.getLength() - 1 ) ) - aURL += OUString(static_cast<sal_Unicode>('/')); + aURL += "/"; aURL += m_aEscapedTitle; } diff --git a/ucb/source/ucp/webdav-neon/webdavdatasupplier.cxx b/ucb/source/ucp/webdav-neon/webdavdatasupplier.cxx index 64da40979533..2bca85f3f0cd 100644 --- a/ucb/source/ucp/webdav-neon/webdavdatasupplier.cxx +++ b/ucb/source/ucp/webdav-neon/webdavdatasupplier.cxx @@ -149,12 +149,12 @@ OUString DataSupplier::queryContentIdentifierString( sal_uInt32 nIndex ) = *( m_pImpl->m_aResults[ nIndex ].pData ); if ( ( aId.lastIndexOf( '/' ) + 1 ) != aId.getLength() ) - aId += OUString("/"); + aId += "/"; aId += props.getEscapedTitle(); if ( props.isTrailingSlash() ) - aId += OUString("/"); + aId += "/"; m_pImpl->m_aResults[ nIndex ].aId = aId; return aId; diff --git a/ucb/source/ucp/webdav-neon/webdavprovider.cxx b/ucb/source/ucp/webdav-neon/webdavprovider.cxx index 616d1bd664e6..690d4da747db 100644 --- a/ucb/source/ucp/webdav-neon/webdavprovider.cxx +++ b/ucb/source/ucp/webdav-neon/webdavprovider.cxx @@ -173,7 +173,7 @@ ContentProvider::queryContent( nPos = aURL.indexOf( '/', nPos + 1 ); if ( nPos == -1 ) { - aURL += OUString("/"); + aURL += "/"; bNewId = true; } } diff --git a/ucb/workben/ucb/ucbdemo.cxx b/ucb/workben/ucb/ucbdemo.cxx index 709b62d3279d..6c2392baf7e1 100644 --- a/ucb/workben/ucb/ucbdemo.cxx +++ b/ucb/workben/ucb/ucbdemo.cxx @@ -214,8 +214,7 @@ void SAL_CALL TestOutputStream::writeBytes( m_bMore = true; } m_sStart - += OUString(reinterpret_cast< const sal_Char * >(rData. - getConstArray()), + += OUString(reinterpret_cast< const sal_Char * >(rData.getConstArray()), nLen, RTL_TEXTENCODING_ISO_8859_1); } @@ -224,7 +223,7 @@ OUString TestOutputStream::getStart() const { OUString sResult = m_sStart; if (m_bMore) - sResult += OUString("..."); + sResult += "..."; return sResult; } @@ -272,14 +271,13 @@ OUString ProgressHandler::toString(const uno::Any & rStatus) OUString sResult; if (aStart.Text.getLength() > 0) { - sResult = aStart.Text; - sResult += OUString(" "); + sResult = aStart.Text + " "; } - sResult += OUString("["); + sResult += "["; sResult += OUString::valueOf(aStart.Minimum); - sResult += OUString(".."); + sResult += ".."; sResult += OUString::valueOf(aStart.Maximum); - sResult += OUString("]"); + sResult += "]"; return sResult; } @@ -290,9 +288,7 @@ OUString ProgressHandler::toString(const uno::Any & rStatus) sal_Int32 nValue; if (rStatus >>= nValue) { - OUString sResult(".."); - sResult += OUString::valueOf(nValue); - sResult += OUString(".."); + OUString sResult = ".." + OUString::valueOf(nValue) + ".."; return OUString(sResult); } @@ -387,10 +383,10 @@ OUString Ucb::getUnoURL() OUString aUnoURL( "uno:socket,host=localhost,port=8121;"); if (m_aProtocol.getLength() == 0) - aUnoURL += OUString("urp"); + aUnoURL += "urp"; else aUnoURL += m_aProtocol; - aUnoURL += OUString(";UCB.Factory"); + aUnoURL += ";UCB.Factory"; return aUnoURL; } @@ -443,8 +439,7 @@ sal_Bool Ucb::init() aInfos(xProvMgr->queryContentProviders()); for (sal_Int32 i = 0; i < aInfos.getLength(); ++i) { - String aText(" "); - aText += OUString(aInfos[i].Scheme); + OUString aText = " " + aInfos[i].Scheme; print(aText); } } @@ -2136,10 +2131,10 @@ IMPL_LINK( MyWin, ToolBarHandler, ToolBox*, pToolBox ) case MYWIN_ITEMID_FETCHSIZE: { m_nFetchSize = aCmdLine.ToInt32(); - String aText; + OUString aText; if (m_nFetchSize > 0) { - aText.AssignAscii("Fetch size set to "); + aText = "Fetch size set to "; aText += OUString::number(m_nFetchSize); } else |