diff options
author | Noel Grandin <noel@peralex.com> | 2013-10-31 15:40:40 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-11-07 14:27:06 +0200 |
commit | 24857c46daf06553e8618de46a0f3ece27c32675 (patch) | |
tree | d20a2f914f97cb1d6a4d38c7c61c0524062bf862 /ucb/source/ucp/hierarchy | |
parent | f6ad2b7a52266e7a4d039f9ba557476e6881fa5f (diff) |
remove unnecessary use of OUString constructor in UCB module
Change-Id: Ic75e5aad03d66590e78275304c766c1c00179387
Diffstat (limited to 'ucb/source/ucp/hierarchy')
-rw-r--r-- | ucb/source/ucp/hierarchy/hierarchycontent.cxx | 26 | ||||
-rw-r--r-- | ucb/source/ucp/hierarchy/hierarchyuri.cxx | 18 |
2 files changed, 20 insertions, 24 deletions
diff --git a/ucb/source/ucp/hierarchy/hierarchycontent.cxx b/ucb/source/ucp/hierarchy/hierarchycontent.cxx index b0fa90fbae7b..4c1bd9f2a0cf 100644 --- a/ucb/source/ucp/hierarchy/hierarchycontent.cxx +++ b/ucb/source/ucp/hierarchy/hierarchycontent.cxx @@ -300,11 +300,11 @@ HierarchyContent::getSupportedServiceNames() uno::Sequence< OUString > aSNS( 1 ); if ( m_eKind == LINK ) - aSNS.getArray()[ 0 ] = OUString( HIERARCHY_LINK_CONTENT_SERVICE_NAME ); + aSNS.getArray()[ 0 ] = HIERARCHY_LINK_CONTENT_SERVICE_NAME; else if ( m_eKind == FOLDER ) - aSNS.getArray()[ 0 ] = OUString( HIERARCHY_FOLDER_CONTENT_SERVICE_NAME ); + aSNS.getArray()[ 0 ] = HIERARCHY_FOLDER_CONTENT_SERVICE_NAME; else - aSNS.getArray()[ 0 ] = OUString( HIERARCHY_ROOT_FOLDER_CONTENT_SERVICE_NAME ); + aSNS.getArray()[ 0 ] = HIERARCHY_ROOT_FOLDER_CONTENT_SERVICE_NAME; return aSNS; } @@ -1325,7 +1325,7 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues( m_aProps.setTitle( aOldTitle ); m_aProps.setName ( aOldName ); - aOldTitle = aOldName = OUString(); + aOldTitle = aOldName = ""; // Set error . aRet[ nTitlePos ] <<= uno::Exception( @@ -1336,7 +1336,7 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues( if ( !aOldTitle.isEmpty() ) { - aEvent.PropertyName = OUString("Title"); + aEvent.PropertyName = "Title"; aEvent.OldValue = uno::makeAny( aOldTitle ); aEvent.NewValue = uno::makeAny( m_aProps.getTitle() ); @@ -1401,7 +1401,7 @@ void HierarchyContent::insert( sal_Int32 nNameClashResolve, if ( m_aProps.getTitle().isEmpty() ) { uno::Sequence< OUString > aProps( 1 ); - aProps[ 0 ] = OUString("Title"); + aProps[ 0 ] = "Title"; ucbhelper::cancelCommandExecution( uno::makeAny( ucb::MissingPropertiesException( OUString(), @@ -1807,7 +1807,7 @@ void HierarchyContent::transfer( ucb::TransferInfo aInfo; aInfo.MoveData = sal_False; - aInfo.NewTitle = OUString(); + aInfo.NewTitle = ""; aInfo.SourceURL = aChildId; aInfo.NameClash = rInfo.NameClash; @@ -1866,10 +1866,8 @@ HierarchyContentProperties::getCreatableContentsInfo() const uno::Sequence< ucb::ContentInfo > aSeq( 2 ); // Folder. - aSeq.getArray()[ 0 ].Type - = OUString( HIERARCHY_FOLDER_CONTENT_TYPE ); - aSeq.getArray()[ 0 ].Attributes - = ucb::ContentInfoAttribute::KIND_FOLDER; + aSeq.getArray()[ 0 ].Type = HIERARCHY_FOLDER_CONTENT_TYPE; + aSeq.getArray()[ 0 ].Attributes = ucb::ContentInfoAttribute::KIND_FOLDER; uno::Sequence< beans::Property > aFolderProps( 1 ); aFolderProps.getArray()[ 0 ] = beans::Property( @@ -1880,10 +1878,8 @@ HierarchyContentProperties::getCreatableContentsInfo() const aSeq.getArray()[ 0 ].Properties = aFolderProps; // Link. - aSeq.getArray()[ 1 ].Type - = OUString( HIERARCHY_LINK_CONTENT_TYPE ); - aSeq.getArray()[ 1 ].Attributes - = ucb::ContentInfoAttribute::KIND_LINK; + aSeq.getArray()[ 1 ].Type = HIERARCHY_LINK_CONTENT_TYPE; + aSeq.getArray()[ 1 ].Attributes = ucb::ContentInfoAttribute::KIND_LINK; uno::Sequence< beans::Property > aLinkProps( 2 ); aLinkProps.getArray()[ 0 ] = beans::Property( diff --git a/ucb/source/ucp/hierarchy/hierarchyuri.cxx b/ucb/source/ucp/hierarchy/hierarchyuri.cxx index 5f50aac9fcaf..9eb1f882ba83 100644 --- a/ucb/source/ucp/hierarchy/hierarchyuri.cxx +++ b/ucb/source/ucp/hierarchy/hierarchyuri.cxx @@ -50,13 +50,13 @@ void HierarchyUri::init() const if ( !m_aUri.isEmpty() && m_aPath.isEmpty() ) { // Note: Maybe it's a re-init, setUri only resets m_aPath! - m_aService = m_aParentUri = m_aName = OUString(); + m_aService = m_aParentUri = m_aName = ""; // URI must match at least: <sheme>: if ( ( m_aUri.getLength() < HIERARCHY_URL_SCHEME_LENGTH + 1 ) ) { // error, but remember that we did a init(). - m_aPath = OUString("/"); + m_aPath = "/"; return; } @@ -76,7 +76,7 @@ void HierarchyUri::init() const { // root folder URI without path and service specifier. m_aUri += "//" DEFAULT_DATA_SOURCE_SERVICE "/"; - m_aService = OUString( DEFAULT_DATA_SOURCE_SERVICE ); + m_aService = DEFAULT_DATA_SOURCE_SERVICE ; nPos = m_aUri.getLength() - 1; } @@ -86,7 +86,7 @@ void HierarchyUri::init() const { // root folder URI without service specifier. m_aUri += "/" DEFAULT_DATA_SOURCE_SERVICE "/"; - m_aService = OUString( DEFAULT_DATA_SOURCE_SERVICE ); + m_aService = DEFAULT_DATA_SOURCE_SERVICE; nPos = m_aUri.getLength() - 1; } @@ -99,7 +99,7 @@ void HierarchyUri::init() const HIERARCHY_URL_SCHEME_LENGTH + 2, 0, OUString( "/" DEFAULT_DATA_SOURCE_SERVICE "/" ) ); - m_aService = OUString( DEFAULT_DATA_SOURCE_SERVICE ); + m_aService = DEFAULT_DATA_SOURCE_SERVICE; nPos = HIERARCHY_URL_SCHEME_LENGTH + 3 + m_aService.getLength(); @@ -116,7 +116,7 @@ void HierarchyUri::init() const if ( nStart == m_aUri.getLength() ) { // error, but remember that we did a init(). - m_aPath = OUString("/"); + m_aPath = "/"; return; } @@ -126,7 +126,7 @@ void HierarchyUri::init() const nStart ) != -1 ) { // error, but remember that we did a init(). - m_aPath = OUString("/"); + m_aPath = "/"; return; } @@ -136,7 +136,7 @@ void HierarchyUri::init() const if ( nEnd == nStart ) { // error, but remember that we did a init(). - m_aPath = OUString("/"); + m_aPath = "/"; return; } @@ -180,7 +180,7 @@ void HierarchyUri::init() const else { // error, but remember that we did a init(). - m_aPath = OUString("/"); + m_aPath = "/"; } } } |