diff options
author | Noel Grandin <noel@peralex.com> | 2013-11-15 11:05:19 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-11-19 10:29:31 +0200 |
commit | 610b2b94b33b0fc2d79cd515f9e293ca1c2610e8 (patch) | |
tree | 6eab2639cb8104ca54daa3f7a2ebd83ef1566cf0 /ucb | |
parent | 2c35fff7eca3a143d28dc75e6a73fe1101d2af77 (diff) |
remove unnecessary use of OUString constructor when assigning
change code like
aStr = OUString("xxxx");
to
aStr = "xxxx";
Change-Id: Ib981a5cc735677ec5dba76ef9279a107d22e99d4
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/core/FileAccess.cxx | 7 | ||||
-rw-r--r-- | ucb/source/ucp/cmis/cmis_content.cxx | 6 | ||||
-rw-r--r-- | ucb/source/ucp/ext/ucpext_content.cxx | 8 | ||||
-rw-r--r-- | ucb/source/ucp/ext/ucpext_datasupplier.cxx | 2 | ||||
-rw-r--r-- | ucb/source/ucp/ext/ucpext_provider.cxx | 4 | ||||
-rw-r--r-- | ucb/source/ucp/file/filstr.cxx | 2 | ||||
-rw-r--r-- | ucb/source/ucp/hierarchy/hierarchydatasource.cxx | 16 | ||||
-rw-r--r-- | ucb/source/ucp/hierarchy/hierarchyprovider.cxx | 2 | ||||
-rw-r--r-- | ucb/source/ucp/package/pkguri.cxx | 14 | ||||
-rw-r--r-- | ucb/source/ucp/tdoc/tdoc_docmgr.cxx | 2 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/DAVProperties.cxx | 2 |
11 files changed, 32 insertions, 33 deletions
diff --git a/ucb/source/core/FileAccess.cxx b/ucb/source/core/FileAccess.cxx index 99bb459f4144..4394ae148c62 100644 --- a/ucb/source/core/FileAccess.cxx +++ b/ucb/source/core/FileAccess.cxx @@ -387,7 +387,7 @@ void OFileAccess::createFolder( const OUString& NewFolderURL ) Sequence<OUString> aNames(1); OUString* pNames = aNames.getArray(); - pNames[0] = OUString( "Title" ); + pNames[0] = "Title"; Sequence< Any > aValues(1); Any* pValues = aValues.getArray(); pValues[0] = makeAny( OUString( aTitle ) ); @@ -660,8 +660,7 @@ bool OFileAccess::createNewFile( const OUString & rParentURL, Sequence<OUString> aNames(1); OUString* pNames = aNames.getArray(); - pNames[0] = OUString( - "Title" ); + pNames[0] = "Title"; Sequence< Any > aValues(1); Any* pValues = aValues.getArray(); pValues[0] = makeAny( OUString( rTitle ) ); @@ -769,7 +768,7 @@ Reference< XInterface > SAL_CALL FileAccess_CreateInstance( const Reference< XMu Sequence< OUString > FileAccess_getSupportedServiceNames() { Sequence< OUString > seqNames(1); - seqNames.getArray()[0] = OUString( SERVICE_NAME ); + seqNames.getArray()[0] = SERVICE_NAME; return seqNames; } diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx index 9809c2e5b534..771548619527 100644 --- a/ucb/source/ucp/cmis/cmis_content.cxx +++ b/ucb/source/ucp/cmis/cmis_content.cxx @@ -1543,7 +1543,7 @@ namespace cmis OUString Content::getParentURL( ) { SAL_INFO( "ucb.ucp.cmis", "Content::getParentURL()" ); - OUString parentUrl = OUString( "/" ); + OUString parentUrl = "/"; if ( m_sObjectPath == "/" ) return parentUrl; else @@ -1823,13 +1823,13 @@ namespace cmis beans::PropertyAttribute::MAYBEVOID | beans::PropertyAttribute::BOUND ); // file - seq[0].Type = OUString(CMIS_FILE_TYPE); + seq[0].Type = CMIS_FILE_TYPE; seq[0].Attributes = ( ucb::ContentInfoAttribute::INSERT_WITH_INPUTSTREAM | ucb::ContentInfoAttribute::KIND_DOCUMENT ); seq[0].Properties = props; // folder - seq[1].Type = OUString(CMIS_FOLDER_TYPE); + seq[1].Type = CMIS_FOLDER_TYPE; seq[1].Attributes = ucb::ContentInfoAttribute::KIND_FOLDER; seq[1].Properties = props; diff --git a/ucb/source/ucp/ext/ucpext_content.cxx b/ucb/source/ucp/ext/ucpext_content.cxx index c0d172ecb6a7..ad3290962a92 100644 --- a/ucb/source/ucp/ext/ucpext_content.cxx +++ b/ucb/source/ucp/ext/ucpext_content.cxx @@ -184,8 +184,8 @@ namespace ucb { namespace ucp { namespace ext Sequence< OUString > SAL_CALL Content::getSupportedServiceNames() throw( RuntimeException ) { Sequence< OUString > aServiceNames(2); - aServiceNames[0] = OUString( "com.sun.star.ucb.Content" ); - aServiceNames[1] = OUString( "com.sun.star.ucb.ExtensionContent" ); + aServiceNames[0] = "com.sun.star.ucb.Content"; + aServiceNames[1] = "com.sun.star.ucb.ExtensionContent"; return aServiceNames; } @@ -629,7 +629,7 @@ namespace ucb { namespace ucp { namespace ext try { Sequence< Property > aProps(1); - aProps[0].Name = OUString( "IsFolder" ); + aProps[0].Name = "IsFolder"; Reference< XRow > xRow( getPropertyValues( aProps, NULL ), UNO_SET_THROW ); bIsFolder = xRow->getBoolean(1); } @@ -653,7 +653,7 @@ namespace ucb { namespace ucp { namespace ext try { Sequence< Property > aProps(1); - aProps[0].Name = OUString( "ContentType" ); + aProps[0].Name = "ContentType"; Reference< XRow > xRow( getPropertyValues( aProps, NULL ), UNO_SET_THROW ); m_aContentType.reset( xRow->getString(1) ); } diff --git a/ucb/source/ucp/ext/ucpext_datasupplier.cxx b/ucb/source/ucp/ext/ucpext_datasupplier.cxx index 573ac13acdf6..a65e88966e26 100644 --- a/ucb/source/ucp/ext/ucpext_datasupplier.cxx +++ b/ucb/source/ucp/ext/ucpext_datasupplier.cxx @@ -172,7 +172,7 @@ namespace ucb { namespace ucp { namespace ext // obtain the properties which our result set is set up for from the wrapped content Sequence< OUString > aPropertyNames(1); - aPropertyNames[0] = OUString( "Title" ); + aPropertyNames[0] = "Title"; const Reference< XResultSet > xFolderContent( aWrappedContent.createCursor( aPropertyNames ), UNO_SET_THROW ); const Reference< XRow > xContentRow( xFolderContent, UNO_QUERY_THROW ); diff --git a/ucb/source/ucp/ext/ucpext_provider.cxx b/ucb/source/ucp/ext/ucpext_provider.cxx index df0f149a857c..66d3e4b72535 100644 --- a/ucb/source/ucp/ext/ucpext_provider.cxx +++ b/ucb/source/ucp/ext/ucpext_provider.cxx @@ -77,8 +77,8 @@ namespace ucb { namespace ucp { namespace ext Sequence< OUString > SAL_CALL ContentProvider::getSupportedServiceNames_static( ) throw (RuntimeException) { Sequence< OUString > aServiceNames(2); - aServiceNames[0] = OUString( "com.sun.star.ucb.ContentProvider" ); - aServiceNames[1] = OUString( "com.sun.star.ucb.ExtensionContentProvider" ); + aServiceNames[0] = "com.sun.star.ucb.ContentProvider"; + aServiceNames[1] = "com.sun.star.ucb.ExtensionContentProvider"; return aServiceNames; } diff --git a/ucb/source/ucp/file/filstr.cxx b/ucb/source/ucp/file/filstr.cxx index 42f654bb6d78..298adc16a593 100644 --- a/ucb/source/ucp/file/filstr.cxx +++ b/ucb/source/ucp/file/filstr.cxx @@ -291,7 +291,7 @@ XStream_impl::closeStream( if( err != osl::FileBase::E_None ) { io::IOException ex; - ex.Message = OUString( "could not close file"); + ex.Message = "could not close file"; throw ex; } diff --git a/ucb/source/ucp/hierarchy/hierarchydatasource.cxx b/ucb/source/ucp/hierarchy/hierarchydatasource.cxx index 96b747140109..9bbba07ba555 100644 --- a/ucb/source/ucp/hierarchy/hierarchydatasource.cxx +++ b/ucb/source/ucp/hierarchy/hierarchydatasource.cxx @@ -260,8 +260,8 @@ XSERVICEINFO_IMPL_0_CTX( HierarchyDataSource, OUString( "com.sun.star.comp.ucb.HierarchyDataSource" ) ) { uno::Sequence< OUString > aSNS( 2 ); - aSNS[ 0 ] = OUString( "com.sun.star.ucb.DefaultHierarchyDataSource" ); - aSNS[ 1 ] = OUString( "com.sun.star.ucb.HierarchyDataSource" ); + aSNS[ 0 ] = "com.sun.star.ucb.DefaultHierarchyDataSource"; + aSNS[ 1 ] = "com.sun.star.ucb.HierarchyDataSource"; return aSNS; } @@ -328,7 +328,7 @@ HierarchyDataSource::createInstance( const OUString & aServiceSpecifier ) // Create view to root node. beans::PropertyValue aProp; - aProp.Name = OUString( CFGPROPERTY_NODEPATH ); + aProp.Name = CFGPROPERTY_NODEPATH; aProp.Value <<= OUString( CONFIG_DATA_ROOT_KEY ); uno::Sequence< uno::Any > aArguments( 1 ); @@ -355,8 +355,8 @@ HierarchyDataSource::getAvailableServiceNames() throw ( uno::RuntimeException ) { uno::Sequence< OUString > aNames( 2 ); - aNames[ 0 ] = OUString( READ_SERVICE_NAME ); - aNames[ 1 ] = OUString( READWRITE_SERVICE_NAME ); + aNames[ 0 ] = READ_SERVICE_NAME; + aNames[ 1 ] = READWRITE_SERVICE_NAME; return aNames; } @@ -483,7 +483,7 @@ HierarchyDataSource::createInstanceWithArguments( aNewArgs.realloc( nLen + 1 ); beans::PropertyValue aProp; - aProp.Name = OUString( CFGPROPERTY_LAZYWRITE ); + aProp.Name = CFGPROPERTY_LAZYWRITE; aProp.Value <<= sal_True; aNewArgs[ nLen ] <<= aProp; } @@ -726,8 +726,8 @@ XSERVICEINFO_NOFACTORY_IMPL_0( OUString( "com.sun.star.comp.ucb.HierarchyDataAccess" ) ) { uno::Sequence< OUString > aSNS( 2 ); - aSNS[ 0 ] = OUString( READ_SERVICE_NAME ); - aSNS[ 1 ] = OUString( READWRITE_SERVICE_NAME ); + aSNS[ 0 ] = READ_SERVICE_NAME; + aSNS[ 1 ] = READWRITE_SERVICE_NAME; return aSNS; } diff --git a/ucb/source/ucp/hierarchy/hierarchyprovider.cxx b/ucb/source/ucp/hierarchy/hierarchyprovider.cxx index 9865d708aab1..721270380012 100644 --- a/ucb/source/ucp/hierarchy/hierarchyprovider.cxx +++ b/ucb/source/ucp/hierarchy/hierarchyprovider.cxx @@ -226,7 +226,7 @@ HierarchyContentProvider::getRootConfigReadNameAccess( { uno::Sequence< uno::Any > aArguments( 1 ); beans::PropertyValue aProperty; - aProperty.Name = OUString( "nodepath" ); + aProperty.Name = "nodepath" ; aProperty.Value <<= OUString(); // root path aArguments[ 0 ] <<= aProperty; diff --git a/ucb/source/ucp/package/pkguri.cxx b/ucb/source/ucp/package/pkguri.cxx index 62300681b218..31d3c95de95e 100644 --- a/ucb/source/ucp/package/pkguri.cxx +++ b/ucb/source/ucp/package/pkguri.cxx @@ -76,7 +76,7 @@ void PackageUri::init() const if ( ( m_aUri.getLength() < PACKAGE_URL_SCHEME_LENGTH + 4 ) ) { // error, but remember that we did a init(). - m_aPath = OUString( "/" ); + m_aPath = "/"; return; } @@ -88,7 +88,7 @@ void PackageUri::init() const ( m_aUri[ PACKAGE_URL_SCHEME_LENGTH + 2 ] != '/' ) ) { // error, but remember that we did a init(). - m_aPath = OUString( "/" ); + m_aPath = "/"; return; } @@ -127,7 +127,7 @@ void PackageUri::init() const // Only <scheme>:/// - Empty authority // error, but remember that we did a init(). - m_aPath = OUString( "/" ); + m_aPath = "/"; return; } else if ( nEnd == ( aPureUri.getLength() - 1 ) ) @@ -137,7 +137,7 @@ void PackageUri::init() const // Only <scheme>://// or <scheme>://<something>// // error, but remember that we did a init(). - m_aPath = OUString( "/" ); + m_aPath = "/"; return; } @@ -158,7 +158,7 @@ void PackageUri::init() const nStart, aPureUri.getLength() - nStart, aNormPackage ); m_aPackage = ::ucb_impl::urihelper::decodeSegment( aNormPackage ); - m_aPath = OUString( "/" ); + m_aPath = "/"; m_aUri = m_aUri.replaceAt( 0, ( nParam >= 0 ) ? nParam @@ -188,7 +188,7 @@ void PackageUri::init() const || ::comphelper::OStorageHelper::PathHasSegment( m_aPath, OUString( "." ) ) ) { // error, but remember that we did a init(). - m_aPath = OUString( "/" ); + m_aPath = "/"; return; } @@ -225,7 +225,7 @@ void PackageUri::init() const else { // error, but remember that we did a init(). - m_aPath = OUString( "/" ); + m_aPath = "/"; } } } diff --git a/ucb/source/ucp/tdoc/tdoc_docmgr.cxx b/ucb/source/ucp/tdoc/tdoc_docmgr.cxx index 92b7cad3684d..c08f9cf5088a 100644 --- a/ucb/source/ucp/tdoc/tdoc_docmgr.cxx +++ b/ucb/source/ucp/tdoc/tdoc_docmgr.cxx @@ -76,7 +76,7 @@ void SAL_CALL OfficeDocumentsManager::OfficeDocumentsCloseListener::notifyClosin { document::EventObject aDocEvent; aDocEvent.Source = Source.Source; - aDocEvent.EventName = OUString( "OfficeDocumentsListener::notifyClosing" ); + aDocEvent.EventName = "OfficeDocumentsListener::notifyClosing"; m_pManager->notifyEvent( aDocEvent ); } diff --git a/ucb/source/ucp/webdav/DAVProperties.cxx b/ucb/source/ucp/webdav/DAVProperties.cxx index 9b6064ad167b..264e2a3c2371 100644 --- a/ucb/source/ucp/webdav/DAVProperties.cxx +++ b/ucb/source/ucp/webdav/DAVProperties.cxx @@ -136,7 +136,7 @@ void DAVProperties::createUCBPropName( const char * nspace, DAVProperties::GETETAG.matchIgnoreAsciiCase( aName, 4 ) || DAVProperties::GETLASTMODIFIED.matchIgnoreAsciiCase( aName, 4 ) ) { - aNameSpace = OUString( "DAV:" ); + aNameSpace = "DAV:"; } } |