summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/source/debug/debug.cxx205
-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
-rw-r--r--unotools/source/config/compatibility.cxx5
-rw-r--r--unotools/source/config/eventcfg.cxx7
8 files changed, 135 insertions, 156 deletions
diff --git a/tools/source/debug/debug.cxx b/tools/source/debug/debug.cxx
index 9b9419599b7d..22c3b08698bd 100644
--- a/tools/source/debug/debug.cxx
+++ b/tools/source/debug/debug.cxx
@@ -50,6 +50,7 @@
#include <tools/debug.hxx>
#include <sal/log.hxx>
#include <osl/thread.h>
+#include <rtl/strbuf.hxx>
#include <cstdlib>
#include <typeinfo>
@@ -94,18 +95,18 @@ void DbgTestSolarMutex()
#endif
-OString exceptionToString(const css::uno::Any & caught)
+static void exceptionToStringImpl(OStringBuffer& sMessage, const css::uno::Any & caught)
{
auto toOString = [](OUString const & s) {
return OUStringToOString( s, osl_getThreadTextEncoding() );
};
- OString sMessage = toOString(caught.getValueTypeName());
+ sMessage.append(toOString(caught.getValueTypeName()));
css::uno::Exception exception;
caught >>= exception;
if ( !exception.Message.isEmpty() )
{
- sMessage += " message: ";
- sMessage += toOString(exception.Message);
+ sMessage.append(" message: ");
+ sMessage.append(toOString(exception.Message));
}
if ( exception.Context.is() )
{
@@ -115,8 +116,8 @@ OString exceptionToString(const css::uno::Any & caught)
int status;
pContext = abi::__cxa_demangle( pContext, nullptr, nullptr, &status);
#endif
- sMessage += " context: ";
- sMessage += pContext;
+ sMessage.append(" context: ");
+ sMessage.append(pContext);
#if defined __GLIBCXX__
std::free(const_cast<char *>(pContext));
#endif
@@ -125,289 +126,295 @@ OString exceptionToString(const css::uno::Any & caught)
css::configuration::CorruptedConfigurationException specialized;
if ( caught >>= specialized )
{
- sMessage += " details: ";
- sMessage += toOString(specialized.Details);
+ sMessage.append(" details: ");
+ sMessage.append(toOString(specialized.Details));
}
}
{
css::configuration::InvalidBootstrapFileException specialized;
if ( caught >>= specialized )
{
- sMessage += " BootstrapFileURL: ";
- sMessage += toOString(specialized.BootstrapFileURL);
+ sMessage.append(" BootstrapFileURL: ");
+ sMessage.append(toOString(specialized.BootstrapFileURL));
}
}
{
css::configuration::MissingBootstrapFileException specialized;
if ( caught >>= specialized )
{
- sMessage += " BootstrapFileURL: ";
- sMessage += toOString(specialized.BootstrapFileURL);
+ sMessage.append(" BootstrapFileURL: ");
+ sMessage.append(toOString(specialized.BootstrapFileURL));
}
}
{
css::configuration::backend::MalformedDataException specialized;
if ( caught >>= specialized )
{
- sMessage += "\n wrapped: ";
- sMessage += exceptionToString(specialized.ErrorDetails);
+ sMessage.append("\n wrapped: ");
+ sMessage.append(exceptionToString(specialized.ErrorDetails));
}
}
{
css::configuration::backend::BackendSetupException specialized;
if ( caught >>= specialized )
{
- sMessage += "\n wrapped: ";
- sMessage += exceptionToString(specialized.BackendException);
+ sMessage.append("\n wrapped: ");
+ sMessage.append(exceptionToString(specialized.BackendException));
}
}
{
css::deployment::DependencyException specialized;
if ( caught >>= specialized )
{
- sMessage += " UnsatisfiedDependencies: ";
- sMessage += toOString(comphelper::anyToString(css::uno::Any(specialized.UnsatisfiedDependencies)));
+ sMessage.append(" UnsatisfiedDependencies: ");
+ sMessage.append(toOString(comphelper::anyToString(css::uno::Any(specialized.UnsatisfiedDependencies))));
}
}
{
css::deployment::DeploymentException specialized;
if ( caught >>= specialized )
{
- sMessage += "\n wrapped: ";
- sMessage += exceptionToString(specialized.Cause);
+ sMessage.append("\n wrapped: ");
+ sMessage.append(exceptionToString(specialized.Cause));
}
}
{
css::document::CorruptedFilterConfigurationException specialized;
if ( caught >>= specialized )
{
- sMessage += " Details: ";
- sMessage += toOString(specialized.Details);
+ sMessage.append(" Details: ");
+ sMessage.append(toOString(specialized.Details));
}
}
{
css::document::UndoFailedException specialized;
if ( caught >>= specialized )
{
- sMessage += " Reason: ";
- sMessage += toOString(comphelper::anyToString(specialized.Reason));
+ sMessage.append(" Reason: ");
+ sMessage.append(toOString(comphelper::anyToString(specialized.Reason)));
}
}
{
css::lang::IllegalArgumentException specialized;
if ( caught >>= specialized )
{
- sMessage += " ArgumentPosition: ";
- sMessage += OString::number(specialized.ArgumentPosition);
+ sMessage.append(" ArgumentPosition: ");
+ sMessage.append(OString::number(specialized.ArgumentPosition));
}
}
{
css::lang::WrappedTargetException specialized;
if ( caught >>= specialized )
{
- sMessage += "\n wrapped: ";
- sMessage += exceptionToString(specialized.TargetException);
+ sMessage.append("\n wrapped: ");
+ sMessage.append(exceptionToString(specialized.TargetException));
}
}
{
css::lang::WrappedTargetRuntimeException specialized;
if ( caught >>= specialized )
{
- sMessage += "\n wrapped: ";
- sMessage += exceptionToString(specialized.TargetException);
+ sMessage.append("\n wrapped: ");
+ sMessage.append(exceptionToString(specialized.TargetException));
}
}
{
css::ldap::LdapGenericException specialized;
if ( caught >>= specialized )
{
- sMessage += " ErrorCode: ";
- sMessage += OString::number(specialized.ErrorCode);
+ sMessage.append(" ErrorCode: ");
+ sMessage.append(OString::number(specialized.ErrorCode));
}
}
{
css::script::BasicErrorException specialized;
if ( caught >>= specialized )
{
- sMessage += " ErrorCode: ";
- sMessage += OString::number(specialized.ErrorCode);
- sMessage += " ErrorMessageArgument: ";
- sMessage += toOString(specialized.ErrorMessageArgument);
+ sMessage.append(" ErrorCode: ");
+ sMessage.append(OString::number(specialized.ErrorCode));
+ sMessage.append(" ErrorMessageArgument: ");
+ sMessage.append(toOString(specialized.ErrorMessageArgument));
}
}
{
css::script::CannotConvertException specialized;
if ( caught >>= specialized )
{
- sMessage += " DestinationTypeClass: ";
- sMessage += toOString(comphelper::anyToString(css::uno::Any(specialized.DestinationTypeClass)));
- sMessage += " Reason: ";
- sMessage += OString::number(specialized.Reason);
- sMessage += " ArgumentIndex: ";
- sMessage += OString::number(specialized.ArgumentIndex);
+ sMessage.append(" DestinationTypeClass: ");
+ sMessage.append(toOString(comphelper::anyToString(css::uno::Any(specialized.DestinationTypeClass))));
+ sMessage.append(" Reason: ");
+ sMessage.append(OString::number(specialized.Reason));
+ sMessage.append(" ArgumentIndex: ");
+ sMessage.append(OString::number(specialized.ArgumentIndex));
}
}
{
css::script::provider::ScriptErrorRaisedException specialized;
if ( caught >>= specialized )
{
- sMessage += " scriptName: ";
- sMessage += toOString(specialized.scriptName);
- sMessage += " language: ";
- sMessage += toOString(specialized.language);
- sMessage += " lineNum: ";
- sMessage += OString::number(specialized.lineNum);
+ sMessage.append(" scriptName: ");
+ sMessage.append(toOString(specialized.scriptName));
+ sMessage.append(" language: ");
+ sMessage.append(toOString(specialized.language));
+ sMessage.append(" lineNum: ");
+ sMessage.append(OString::number(specialized.lineNum));
}
}
{
css::script::provider::ScriptExceptionRaisedException specialized;
if ( caught >>= specialized )
{
- sMessage += " exceptionType: ";
- sMessage += toOString(specialized.exceptionType);
+ sMessage.append(" exceptionType: ");
+ sMessage.append(toOString(specialized.exceptionType));
}
}
{
css::script::provider::ScriptFrameworkErrorException specialized;
if ( caught >>= specialized )
{
- sMessage += " scriptName: ";
- sMessage += toOString(specialized.scriptName);
- sMessage += " language: ";
- sMessage += toOString(specialized.language);
- sMessage += " errorType: ";
- sMessage += OString::number(specialized.errorType);
+ sMessage.append(" scriptName: ");
+ sMessage.append(toOString(specialized.scriptName));
+ sMessage.append(" language: ");
+ sMessage.append(toOString(specialized.language));
+ sMessage.append(" errorType: ");
+ sMessage.append(OString::number(specialized.errorType));
}
}
{
css::sdbc::SQLException specialized;
if ( caught >>= specialized )
{
- sMessage += " SQLState: ";
- sMessage += toOString(specialized.SQLState);
- sMessage += " ErrorCode: ";
- sMessage += OString::number(specialized.ErrorCode);
- sMessage += "\n wrapped: ";
- sMessage += exceptionToString(specialized.NextException);
+ sMessage.append(" SQLState: ");
+ sMessage.append(toOString(specialized.SQLState));
+ sMessage.append(" ErrorCode: ");
+ sMessage.append(OString::number(specialized.ErrorCode));
+ sMessage.append("\n wrapped: ");
+ sMessage.append(exceptionToString(specialized.NextException));
}
}
{
css::system::SystemShellExecuteException specialized;
if ( caught >>= specialized )
{
- sMessage += " PosixError: ";
- sMessage += OString::number(specialized.PosixError);
+ sMessage.append(" PosixError: ");
+ sMessage.append(OString::number(specialized.PosixError));
}
}
{
css::task::ErrorCodeIOException specialized;
if ( caught >>= specialized )
{
- sMessage += " errcode: ";
- sMessage += OString::number( specialized.ErrCode );
+ sMessage.append(" errcode: ");
+ sMessage.append(OString::number( specialized.ErrCode ));
}
}
{
css::ucb::CommandFailedException specialized;
if ( caught >>= specialized )
{
- sMessage += "\n Reason: ";
- sMessage += exceptionToString( specialized.Reason );
+ sMessage.append("\n Reason: ");
+ sMessage.append(exceptionToString( specialized.Reason ));
}
}
{
css::ucb::ContentCreationException specialized;
if ( caught >>= specialized )
{
- sMessage += " eError: ";
- sMessage += toOString(comphelper::anyToString( css::uno::Any(specialized.eError) ));
+ sMessage.append(" eError: ");
+ sMessage.append(toOString(comphelper::anyToString( css::uno::Any(specialized.eError) )));
}
}
{
css::ucb::MissingPropertiesException specialized;
if ( caught >>= specialized )
{
- sMessage += " Properties: ";
- sMessage += toOString(comphelper::anyToString( css::uno::Any(specialized.Properties) ));
+ sMessage.append(" Properties: ");
+ sMessage.append(toOString(comphelper::anyToString( css::uno::Any(specialized.Properties) )));
}
}
{
css::ucb::NameClashException specialized;
if ( caught >>= specialized )
{
- sMessage += " Name: ";
- sMessage += toOString( specialized.Name );
+ sMessage.append(" Name: ");
+ sMessage.append(toOString( specialized.Name ));
}
}
{
css::util::MalformedNumberFormatException specialized;
if ( caught >>= specialized )
{
- sMessage += " CheckPos: ";
- sMessage += OString::number( specialized.CheckPos );
+ sMessage.append(" CheckPos: ");
+ sMessage.append(OString::number( specialized.CheckPos ));
}
}
{
css::xml::dom::DOMException specialized;
if ( caught >>= specialized )
{
- sMessage += " Code: ";
- sMessage += toOString(comphelper::anyToString( css::uno::Any(specialized.Code) ));
+ sMessage.append(" Code: ");
+ sMessage.append(toOString(comphelper::anyToString( css::uno::Any(specialized.Code) )));
}
}
{
css::xml::dom::DOMException specialized;
if ( caught >>= specialized )
{
- sMessage += " Code: ";
- sMessage += toOString(comphelper::anyToString( css::uno::Any(specialized.Code) ));
+ sMessage.append(" Code: ");
+ sMessage.append(toOString(comphelper::anyToString( css::uno::Any(specialized.Code) )));
}
}
{
css::xml::sax::SAXException specialized;
if ( caught >>= specialized )
{
- sMessage += "\n wrapped: ";
- sMessage += exceptionToString( specialized.WrappedException );
+ sMessage.append("\n wrapped: ");
+ sMessage.append(exceptionToString( specialized.WrappedException ));
}
}
{
css::xml::sax::SAXParseException specialized;
if ( caught >>= specialized )
{
- sMessage += " PublicId: ";
- sMessage += toOString( specialized.PublicId );
- sMessage += " SystemId: ";
- sMessage += toOString( specialized.SystemId );
- sMessage += " LineNumber: ";
- sMessage += OString::number( specialized.LineNumber );
- sMessage += " ColumnNumber: ";
- sMessage += OString::number( specialized.ColumnNumber );
+ sMessage.append(" PublicId: ");
+ sMessage.append(toOString( specialized.PublicId ));
+ sMessage.append(" SystemId: ");
+ sMessage.append(toOString( specialized.SystemId ));
+ sMessage.append(" LineNumber: ");
+ sMessage.append(OString::number( specialized.LineNumber ));
+ sMessage.append(" ColumnNumber: ");
+ sMessage.append(OString::number( specialized.ColumnNumber ));
}
}
{
css::ucb::InteractiveIOException specialized;
if ( caught >>= specialized )
{
- sMessage += " Code: ";
- sMessage += OString::number( static_cast<sal_Int32>(specialized.Code) );
+ sMessage.append(" Code: ");
+ sMessage.append(OString::number( static_cast<sal_Int32>(specialized.Code) ));
}
}
- return sMessage;
+}
+
+OString exceptionToString(const css::uno::Any & caught)
+{
+ OStringBuffer sMessage;
+ exceptionToStringImpl(sMessage, caught);
+ return sMessage.makeStringAndClear();
}
void DbgUnhandledException(const css::uno::Any & caught, const char* currentFunction, const char* fileAndLineNo,
const char* area, const char* explanatory)
{
- OString sMessage( "DBG_UNHANDLED_EXCEPTION in " );
- sMessage += currentFunction;
+ OStringBuffer sMessage( "DBG_UNHANDLED_EXCEPTION in " );
+ sMessage.append(currentFunction);
if (explanatory)
{
- sMessage += "\n when: ";
- sMessage += explanatory;
+ sMessage.append("\n when: ");
+ sMessage.append(explanatory);
}
- sMessage += " exception: ";
- sMessage += exceptionToString(caught);
+ sMessage.append(" exception: ");
+ exceptionToStringImpl(sMessage, caught);
if (area == nullptr)
area = "legacy.osl";
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;
diff --git a/unotools/source/config/compatibility.cxx b/unotools/source/config/compatibility.cxx
index 6fe672e78c31..a71c8ac39c8d 100644
--- a/unotools/source/config/compatibility.cxx
+++ b/unotools/source/config/compatibility.cxx
@@ -295,10 +295,7 @@ Sequence< OUString > SvtCompatibilityOptions_Impl::impl_GetPropertyNames( Sequen
// Copy entries to destination and expand every item with 2 supported sub properties.
for ( const auto& rItem : std::as_const(rItems) )
{
- OUString sFixPath = SETNODE_ALLFILEFORMATS;
- sFixPath += PATHDELIMITER;
- sFixPath += rItem;
- sFixPath += PATHDELIMITER;
+ OUString sFixPath = SETNODE_ALLFILEFORMATS PATHDELIMITER + rItem + PATHDELIMITER;
for ( int i = static_cast<int>(SvtCompatibilityEntry::Index::Module); i < static_cast<int>(SvtCompatibilityEntry::Index::INVALID); ++i )
{
lProperties[ nDestStep ] = sFixPath + SvtCompatibilityEntry::getName( SvtCompatibilityEntry::Index(i) );
diff --git a/unotools/source/config/eventcfg.cxx b/unotools/source/config/eventcfg.cxx
index 362a161bdfaf..deb87647599c 100644
--- a/unotools/source/config/eventcfg.cxx
+++ b/unotools/source/config/eventcfg.cxx
@@ -187,11 +187,8 @@ void GlobalEventConfig_Impl::initBindingInfo()
// Get ALL names of current existing list items in configuration!
const Sequence< OUString > lEventNames = GetNodeNames( SETNODE_BINDINGS, utl::ConfigNameFormat::LocalPath );
- OUString aSetNode( SETNODE_BINDINGS );
- aSetNode += PATHDELIMITER;
-
- OUString aCommandKey( PATHDELIMITER );
- aCommandKey += PROPERTYNAME_BINDINGURL;
+ OUString aSetNode = SETNODE_BINDINGS PATHDELIMITER;
+ OUString aCommandKey = PATHDELIMITER PROPERTYNAME_BINDINGURL;
// Expand all keys
Sequence< OUString > lMacros(1);