diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-05-25 14:24:11 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-05-25 18:43:52 +0200 |
commit | e810bd2b99777e192fb464572fa64a34bc0768fe (patch) | |
tree | 22e209b88814242c1914931dff28112cbf8c0e6f /ucb | |
parent | 578758835e700b38b167753ccda9527f3a8cc43b (diff) |
merge some stringadds
found with a lightly tweaked version of the loplugin:stringadd
and some hand-holding.
Change-Id: I146aadcaf665e98fea89a9cad2df4dc3935622f4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152275
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/core/ucbstore.cxx | 31 | ||||
-rw-r--r-- | ucb/source/ucp/hierarchy/hierarchycontent.cxx | 7 | ||||
-rw-r--r-- | ucb/source/ucp/package/pkgcontent.cxx | 7 |
3 files changed, 21 insertions, 24 deletions
diff --git a/ucb/source/core/ucbstore.cxx b/ucb/source/core/ucbstore.cxx index 882e0773ddd6..1aae1235c0f0 100644 --- a/ucb/source/core/ucbstore.cxx +++ b/ucb/source/core/ucbstore.cxx @@ -702,8 +702,7 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey, // Fill new item... // Set Values - OUString aKey = aOldValuesKey; - aKey += makeHierarchalNameSegment( rPropName ); + OUString aKey = aOldValuesKey + makeHierarchalNameSegment( rPropName ); // ... handle OUString aNewKey1 = aKey + aHandleKey; @@ -1122,8 +1121,8 @@ void SAL_CALL PersistentPropertySet::setPropertyValue( const OUString& aProperty m_pCreator->getRootConfigReadAccess(), UNO_QUERY ); if ( xRootHierNameAccess.is() ) { - OUString aFullPropName( getFullKeyImpl(aCGuard) + "/" ); - aFullPropName += makeHierarchalNameSegment( aPropertyName ); + OUString aFullPropName( getFullKeyImpl(aCGuard) + "/" + + makeHierarchalNameSegment( aPropertyName ) ); // Does property exist? if ( xRootHierNameAccess->hasByHierarchicalName( aFullPropName ) ) @@ -1213,8 +1212,8 @@ Any SAL_CALL PersistentPropertySet::getPropertyValue( m_pCreator->getRootConfigReadAccess(), UNO_QUERY ); if ( xNameAccess.is() ) { - OUString aFullPropName( getFullKeyImpl(aGuard) + "/" ); - aFullPropName += makeHierarchalNameSegment( PropertyName ) + "/Value"; + OUString aFullPropName( getFullKeyImpl(aGuard) + "/" + + makeHierarchalNameSegment( PropertyName ) + "/Value" ); try { return xNameAccess->getByHierarchicalName( aFullPropName ); @@ -1342,8 +1341,8 @@ void SAL_CALL PersistentPropertySet::addProperty( if ( xRootHierNameAccess.is() ) { aFullValuesName = getFullKeyImpl(aGuard); - OUString aFullPropName = aFullValuesName + "/"; - aFullPropName += makeHierarchalNameSegment( Name ); + OUString aFullPropName = aFullValuesName + "/" + + makeHierarchalNameSegment( Name ); if ( xRootHierNameAccess->hasByHierarchicalName( aFullPropName ) ) { @@ -1485,8 +1484,8 @@ void SAL_CALL PersistentPropertySet::removeProperty( const OUString& Name ) if ( xRootHierNameAccess.is() ) { OUString aFullValuesName = getFullKeyImpl(aGuard); - OUString aFullPropName = aFullValuesName + "/"; - aFullPropName += makeHierarchalNameSegment( Name ); + OUString aFullPropName = aFullValuesName + "/" + + makeHierarchalNameSegment( Name ); // Property in set? if ( !xRootHierNameAccess->hasByHierarchicalName( aFullPropName ) ) @@ -1787,8 +1786,8 @@ void SAL_CALL PersistentPropertySet::setPropertyValues( { const OUString& rName = rNewValue.Name; - OUString aFullPropName = aFullPropNamePrefix; - aFullPropName += makeHierarchalNameSegment( rName ); + OUString aFullPropName = aFullPropNamePrefix + + makeHierarchalNameSegment( rName ); // Does property exist? if ( xRootHierNameAccess->hasByHierarchicalName( aFullPropName ) ) @@ -2096,8 +2095,8 @@ Property SAL_CALL PropertySetInfo_Impl::getPropertyByName( UNO_QUERY ); if ( xRootHierNameAccess.is() ) { - OUString aFullPropName( m_pOwner->getFullKey() + "/" ); - aFullPropName += makeHierarchalNameSegment( aName ); + OUString aFullPropName( m_pOwner->getFullKey() + "/" + + makeHierarchalNameSegment( aName ) ); // Does property exist? if ( !xRootHierNameAccess->hasByHierarchicalName( aFullPropName ) ) @@ -2175,8 +2174,8 @@ sal_Bool SAL_CALL PropertySetInfo_Impl::hasPropertyByName( UNO_QUERY ); if ( xRootHierNameAccess.is() ) { - OUString aFullPropName( m_pOwner->getFullKey() + "/" ); - aFullPropName += makeHierarchalNameSegment( Name ); + OUString aFullPropName( m_pOwner->getFullKey() + "/" + + makeHierarchalNameSegment( Name ) ); return xRootHierNameAccess->hasByHierarchicalName( aFullPropName ); } diff --git a/ucb/source/ucp/hierarchy/hierarchycontent.cxx b/ucb/source/ucp/hierarchy/hierarchycontent.cxx index 61a495267814..798ba88ea079 100644 --- a/ucb/source/ucp/hierarchy/hierarchycontent.cxx +++ b/ucb/source/ucp/hierarchy/hierarchycontent.cxx @@ -699,8 +699,8 @@ HierarchyContent::makeNewIdentifier( const OUString& rTitle ) // Assemble new content identifier... HierarchyUri aUri( m_xIdentifier->getContentIdentifier() ); - OUString aNewURL = aUri.getParentUri() + "/"; - aNewURL += ::ucb_impl::urihelper::encodeSegment( rTitle ); + OUString aNewURL = aUri.getParentUri() + "/" + + ::ucb_impl::urihelper::encodeSegment( rTitle ); return uno::Reference< ucb::XContentIdentifier >( new ::ucbhelper::ContentIdentifier( aNewURL ) ); @@ -1348,8 +1348,7 @@ void HierarchyContent::insert( sal_Int32 nNameClashResolve, do { - OUString aNewId = xId->getContentIdentifier() + "_"; - aNewId += OUString::number( ++nTry ); + OUString aNewId = xId->getContentIdentifier() + "_" + OUString::number( ++nTry ); xId = new ::ucbhelper::ContentIdentifier( aNewId ); } while ( hasData( xId ) && ( nTry < 1000 ) ); diff --git a/ucb/source/ucp/package/pkgcontent.cxx b/ucb/source/ucp/package/pkgcontent.cxx index 8bf7e4bc2873..a0cff94b9c4b 100644 --- a/ucb/source/ucp/package/pkgcontent.cxx +++ b/ucb/source/ucp/package/pkgcontent.cxx @@ -1259,8 +1259,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( uno::Reference< ucb::XContentIdentifier > xOldId = m_xIdentifier; // Assemble new content identifier... - OUString aNewURL = m_aUri.getParentUri() + "/"; - aNewURL += ::ucb_impl::urihelper::encodeSegment( aNewTitle ); + OUString aNewURL = m_aUri.getParentUri() + "/" + + ::ucb_impl::urihelper::encodeSegment( aNewTitle ); uno::Reference< ucb::XContentIdentifier > xNewId = new ::ucbhelper::ContentIdentifier( aNewURL ); @@ -1538,8 +1538,7 @@ void Content::insert( do { - OUString aNew = aNewUri.getUri() + "_"; - aNew += OUString::number( ++nTry ); + OUString aNew = aNewUri.getUri() + "_" + OUString::number( ++nTry ); aNewUri.setUri( aNew ); } while ( hasData( aNewUri ) && ( nTry < 1000 ) ); |