summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-10-01 18:24:17 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-10-02 08:01:38 +0200
commit9e5b43ff37683b7b67be96c2953e851498a310c9 (patch)
tree2ee9d3e1d60b5feaf800adacdd397487f255af89 /ucb
parent32617df2f59b05ca5942fd18b3440ec834982565 (diff)
loplugin:stringadd in tools..unotools
Change-Id: I441a5ccef6adc8be8029178e304ff3044e812e2a Reviewed-on: https://gerrit.libreoffice.org/79986 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/core/ucbcmds.cxx5
-rw-r--r--ucb/source/core/ucbstore.cxx49
-rw-r--r--ucb/source/ucp/ftp/ftpurl.cxx4
-rw-r--r--ucb/source/ucp/hierarchy/hierarchycontent.cxx4
-rw-r--r--ucb/source/ucp/hierarchy/hierarchydata.cxx12
5 files changed, 26 insertions, 48 deletions
diff --git a/ucb/source/core/ucbcmds.cxx b/ucb/source/core/ucbcmds.cxx
index ebef83f92ae7..4e511a0b44d3 100644
--- a/ucb/source/core/ucbcmds.cxx
+++ b/ucb/source/core/ucbcmds.cxx
@@ -1000,9 +1000,8 @@ void handleNameClashRename(
{
nTry++;
- OUString aNewTitle = aOldTitlePre;
- aNewTitle += OUString::number( nTry );
- aNewTitle += aOldTitlePost;
+ OUString aNewTitle = aOldTitlePre + OUString::number( nTry ) +
+ aOldTitlePost;
// Set new title
setTitle( xCommandProcessorN, rContext.xEnv, aNewTitle );
diff --git a/ucb/source/core/ucbstore.cxx b/ucb/source/core/ucbstore.cxx
index f25a0fb21cf2..cdd746ceb7e6 100644
--- a/ucb/source/core/ucbstore.cxx
+++ b/ucb/source/core/ucbstore.cxx
@@ -1210,8 +1210,7 @@ void SAL_CALL PersistentPropertySet::setPropertyValue( const OUString& aProperty
try
{
// Obtain old value
- OUString aValueName = aFullPropName;
- aValueName += "/Value";
+ OUString aValueName = aFullPropName + "/Value";
Any aOldValue
= xRootHierNameAccess->getByHierarchicalName(
aValueName );
@@ -1239,8 +1238,7 @@ void SAL_CALL PersistentPropertySet::setPropertyValue( const OUString& aProperty
if ( m_pImpl->m_pPropertyChangeListeners )
{
// Obtain handle
- aValueName = aFullPropName;
- aValueName += "/Handle";
+ aValueName = aFullPropName + "/Handle";
sal_Int32 nHandle = -1;
xRootHierNameAccess->getByHierarchicalName( aValueName )
>>= nHandle;
@@ -1422,8 +1420,7 @@ void SAL_CALL PersistentPropertySet::addProperty(
if ( xRootHierNameAccess.is() )
{
aFullValuesName = getFullKey();
- OUString aFullPropName = aFullValuesName;
- aFullPropName += "/";
+ OUString aFullPropName = aFullValuesName + "/";
aFullPropName += makeHierarchalNameSegment( Name );
if ( xRootHierNameAccess->hasByHierarchicalName( aFullPropName ) )
@@ -1570,8 +1567,7 @@ void SAL_CALL PersistentPropertySet::removeProperty( const OUString& Name )
if ( xRootHierNameAccess.is() )
{
aFullValuesName = getFullKey();
- aFullPropName = aFullValuesName;
- aFullPropName += "/";
+ aFullPropName = aFullValuesName + "/";
aFullPropName += makeHierarchalNameSegment( Name );
// Property in set?
@@ -1581,8 +1577,7 @@ void SAL_CALL PersistentPropertySet::removeProperty( const OUString& Name )
// Property removable?
try
{
- OUString aFullAttrName = aFullPropName;
- aFullAttrName += "/Attributes";
+ OUString aFullAttrName = aFullPropName + "/Attributes";
sal_Int32 nAttribs = 0;
if ( xRootHierNameAccess->getByHierarchicalName( aFullAttrName )
@@ -1638,9 +1633,7 @@ void SAL_CALL PersistentPropertySet::removeProperty( const OUString& Name )
try
{
- OUString aFullHandleName = aFullPropName;
- aFullHandleName
- += "/Handle";
+ OUString aFullHandleName = aFullPropName + "/Handle";
if ( ! ( xRootHierNameAccess->getByHierarchicalName(
aFullHandleName ) >>= nHandle ) )
@@ -1781,8 +1774,7 @@ Sequence< PropertyValue > SAL_CALL PersistentPropertySet::getPropertyValues()
try
{
// Obtain and set property handle
- OUString aHierName = aXMLName;
- aHierName += aHandleName;
+ OUString aHierName = aXMLName + aHandleName;
Any aKeyValue
= xHierNameAccess->getByHierarchicalName(
aHierName );
@@ -1802,8 +1794,7 @@ Sequence< PropertyValue > SAL_CALL PersistentPropertySet::getPropertyValues()
try
{
// Obtain and set property value
- OUString aHierName = aXMLName;
- aHierName += aValueName;
+ OUString aHierName = aXMLName + aValueName;
rValue.Value
= xHierNameAccess->getByHierarchicalName(
aHierName );
@@ -1823,8 +1814,7 @@ Sequence< PropertyValue > SAL_CALL PersistentPropertySet::getPropertyValues()
try
{
// Obtain and set property state
- OUString aHierName = aXMLName;
- aHierName += aStateName;
+ OUString aHierName = aXMLName +aStateName;
Any aKeyValue
= xHierNameAccess->getByHierarchicalName(
aHierName );
@@ -1906,8 +1896,7 @@ void SAL_CALL PersistentPropertySet::setPropertyValues(
makeAny( rNewValue.Handle ) );
// Save old value
- OUString aValueName = aFullPropName;
- aValueName += "/Value";
+ OUString aValueName = aFullPropName +"/Value";
Any aOldValue
= xRootHierNameAccess->getByHierarchicalName(
aValueName );
@@ -2129,8 +2118,7 @@ Sequence< Property > SAL_CALL PropertySetInfo_Impl::getProperties()
try
{
// Obtain and set property handle
- OUString aHierName = aXMLName;
- aHierName += aHandleName;
+ OUString aHierName = aXMLName + aHandleName;
Any aKeyValue
= xHierNameAccess->getByHierarchicalName(
aHierName );
@@ -2150,8 +2138,7 @@ Sequence< Property > SAL_CALL PropertySetInfo_Impl::getProperties()
try
{
// Obtain and set property type
- OUString aHierName = aXMLName;
- aHierName += aValueName;
+ OUString aHierName = aXMLName + aValueName;
Any aKeyValue
= xHierNameAccess->getByHierarchicalName(
aHierName );
@@ -2173,8 +2160,7 @@ Sequence< Property > SAL_CALL PropertySetInfo_Impl::getProperties()
try
{
// Obtain and set property attributes
- OUString aHierName = aXMLName;
- aHierName += aAttrName;
+ OUString aHierName = aXMLName + aAttrName;
Any aKeyValue
= xHierNameAccess->getByHierarchicalName(
aHierName );
@@ -2239,8 +2225,7 @@ Property SAL_CALL PropertySetInfo_Impl::getPropertyByName(
Property aProp;
// Obtain handle.
- OUString aKey = aFullPropName;
- aKey += "/Handle";
+ OUString aKey = aFullPropName + "/Handle";
if ( !( xRootHierNameAccess->getByHierarchicalName( aKey )
>>= aProp.Handle ) )
@@ -2251,8 +2236,7 @@ Property SAL_CALL PropertySetInfo_Impl::getPropertyByName(
}
// Obtain Value and extract type.
- aKey = aFullPropName;
- aKey += "/Value";
+ aKey = aFullPropName + "/Value";
Any aValue = xRootHierNameAccess->getByHierarchicalName( aKey );
if ( !aValue.hasValue() )
@@ -2265,8 +2249,7 @@ Property SAL_CALL PropertySetInfo_Impl::getPropertyByName(
aProp.Type = aValue.getValueType();
// Obtain Attributes.
- aKey = aFullPropName;
- aKey += "/Attributes";
+ aKey = aFullPropName + "/Attributes";
sal_Int32 nAttribs = 0;
if ( xRootHierNameAccess->getByHierarchicalName( aKey )
diff --git a/ucb/source/ucp/ftp/ftpurl.cxx b/ucb/source/ucp/ftp/ftpurl.cxx
index c938097bb746..1964e47f22d7 100644
--- a/ucb/source/ucp/ftp/ftpurl.cxx
+++ b/ucb/source/ucp/ftp/ftpurl.cxx
@@ -675,8 +675,8 @@ void FTPURL::mkdir(bool ReplaceExisting) const
// will give an error
title = OString("/");
- OString aDel("del "); aDel += title;
- OString mkd("mkd "); mkd += title;
+ OString aDel = "del " + title;
+ OString mkd = "mkd " + title;
struct curl_slist *slist = nullptr;
diff --git a/ucb/source/ucp/hierarchy/hierarchycontent.cxx b/ucb/source/ucp/hierarchy/hierarchycontent.cxx
index 3c2b23538d88..6f2029888bcb 100644
--- a/ucb/source/ucp/hierarchy/hierarchycontent.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchycontent.cxx
@@ -1372,8 +1372,8 @@ void HierarchyContent::insert( sal_Int32 nNameClashResolve,
else
{
OUString aNewTitle( m_aProps.getTitle() );
- aNewTitle += "_";
- aNewTitle += OUString::number( nTry );
+ aNewTitle += "_" +
+ OUString::number( nTry );
m_aProps.setTitle( aNewTitle );
}
}
diff --git a/ucb/source/ucp/hierarchy/hierarchydata.cxx b/ucb/source/ucp/hierarchy/hierarchydata.cxx
index 37494f50b9a8..f1ff3cdbd64b 100644
--- a/ucb/source/ucp/hierarchy/hierarchydata.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchydata.cxx
@@ -164,8 +164,7 @@ bool HierarchyEntry::getData( HierarchyEntryData& rData )
if ( xRootReadAccess.is() )
{
- OUString aTitlePath = m_aPath;
- aTitlePath += "/Title";
+ OUString aTitlePath = m_aPath + "/Title";
// Note: Avoid NoSuchElementExceptions, because exceptions are
// relatively 'expensive'. Checking for availability of
@@ -188,8 +187,7 @@ bool HierarchyEntry::getData( HierarchyEntryData& rData )
rData.setTitle( aValue );
// Get TargetURL value.
- OUString aTargetURLPath = m_aPath;
- aTargetURLPath += "/TargetURL";
+ OUString aTargetURLPath = m_aPath + "/TargetURL";
if ( !( xRootReadAccess->getByHierarchicalName( aTargetURLPath )
>>= aValue ) )
{
@@ -207,8 +205,7 @@ bool HierarchyEntry::getData( HierarchyEntryData& rData )
aValue = m_xOfficeInstDirs->makeAbsoluteURL( aValue );
rData.setTargetURL( aValue );
- OUString aTypePath = m_aPath;
- aTypePath += "/Type";
+ OUString aTypePath = m_aPath + "/Type";
if ( xRootReadAccess->hasByHierarchicalName( aTypePath ) )
{
// Might not be present since it was introduced long after
@@ -884,8 +881,7 @@ bool HierarchyEntry::first( iterator const & it )
if ( !m_aPath.isEmpty() )
{
- OUString aPath = m_aPath;
- aPath += "/Children";
+ OUString aPath = m_aPath + "/Children";
xRootHierNameAccess->getByHierarchicalName( aPath )
>>= xNameAccess;