basctl/source/basicide/baside3.cxx | 3 basic/source/runtime/methods.cxx | 3 codemaker/source/cppumaker/cppuoptions.cxx | 38 +++++----- codemaker/source/javamaker/javaoptions.cxx | 28 +++---- comphelper/source/misc/backupfilehelper.cxx | 21 +---- connectivity/source/drivers/mysql_jdbc/YDriver.cxx | 4 - connectivity/source/drivers/mysql_jdbc/YTable.cxx | 3 connectivity/source/drivers/mysql_jdbc/YUsers.cxx | 4 - connectivity/source/drivers/odbc/OConnection.cxx | 3 connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx | 3 connectivity/source/parse/sqlnode.cxx | 3 cppu/source/uno/EnvStack.cxx | 7 - cppu/source/uno/cascade_mapping.cxx | 14 +-- cppu/source/uno/lbenv.cxx | 6 - cui/source/customize/SvxConfigPageHelper.cxx | 3 cui/source/dialogs/hldoctp.cxx | 3 cui/source/tabpages/grfpage.cxx | 3 cui/source/tabpages/tpgradnt.cxx | 3 cui/source/tabpages/tphatch.cxx | 3 cui/source/tabpages/tppattern.cxx | 3 20 files changed, 61 insertions(+), 97 deletions(-)
New commits: commit 727200b81da0de810dfe623bf52575540f40adbe Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Mon Sep 30 15:09:07 2019 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Tue Oct 1 09:22:23 2019 +0200 loplugin:stringadd in basctl..cui Change-Id: I2fdeb7eb3ead3512ad6d3fe793305038ab3aa7ae Reviewed-on: https://gerrit.libreoffice.org/79886 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx index 00b0d0db0056..f495e362a371 100644 --- a/basctl/source/basicide/baside3.cxx +++ b/basctl/source/basicide/baside3.cxx @@ -694,8 +694,7 @@ void DialogWindow::SaveDialog() { Sequence< OUString > aContentSeq = xSFI->getFolderContents( aURL, false ); - OUString aDialogName_( aDialogName ); - aDialogName_ += "_" ; + OUString aDialogName_ = aDialogName + "_" ; sal_Int32 nCount = aContentSeq.getLength(); const OUString* pFiles = aContentSeq.getConstArray(); for( int i = 0 ; i < nCount ; i++ ) diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index f7d3f25f7185..8cb2b33436d1 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -3518,8 +3518,7 @@ void SbRtl_Shell(StarBASIC *, SbxArray & rPar, bool) OUString tmp = rPar.Get(3)->GetOUString().trim(); if (!tmp.isEmpty()) { - aCmdLine += " "; - aCmdLine += tmp; + aCmdLine += " " + tmp; } } else if( aCmdLine.isEmpty() ) diff --git a/codemaker/source/cppumaker/cppuoptions.cxx b/codemaker/source/cppumaker/cppuoptions.cxx index 054e810ca084..0e25ae2f5da7 100644 --- a/codemaker/source/cppumaker/cppuoptions.cxx +++ b/codemaker/source/cppumaker/cppuoptions.cxx @@ -293,25 +293,25 @@ bool CppuOptions::initOptions(int ac, char* av[], bool bCmdFile) OString CppuOptions::prepareHelp() { - OString help("\nusing: "); - help += m_program + " [-options] file_1 ... file_n\nOptions:\n" - " -O<path> = path describes the root directory for the generated output.\n" - " The output directory tree is generated under this directory.\n" - " -T<name> = name specifies a type or a list of types. The output for this\n" - " [t1;...] type is generated. If no '-T' option is specified,\n" - " then output for all types is generated.\n" - " Example: 'com.sun.star.uno.XInterface' is a valid type.\n" - " -L = UNO type functions are generated lightweight, that means only\n" - " the name and typeclass are given and everything else is retrieved\n" - " from the type library dynamically. The default is that UNO type\n" - " functions provides enough type information for bootstrapping C++.\n" - " '-L' should be the default for external components.\n" - " -C = UNO type functions are generated comprehensive that means all\n" - " necessary information is available for bridging the type in UNO.\n" - " -nD = no dependent types are generated.\n" - " -G = generate only target files which does not exists.\n" - " -Gc = generate only target files which content will be changed.\n" - " -X<file> = extra types which will not be taken into account for generation.\n\n"; + OString help = "\nusing: " + + m_program + " [-options] file_1 ... file_n\nOptions:\n" + " -O<path> = path describes the root directory for the generated output.\n" + " The output directory tree is generated under this directory.\n" + " -T<name> = name specifies a type or a list of types. The output for this\n" + " [t1;...] type is generated. If no '-T' option is specified,\n" + " then output for all types is generated.\n" + " Example: 'com.sun.star.uno.XInterface' is a valid type.\n" + " -L = UNO type functions are generated lightweight, that means only\n" + " the name and typeclass are given and everything else is retrieved\n" + " from the type library dynamically. The default is that UNO type\n" + " functions provides enough type information for bootstrapping C++.\n" + " '-L' should be the default for external components.\n" + " -C = UNO type functions are generated comprehensive that means all\n" + " necessary information is available for bridging the type in UNO.\n" + " -nD = no dependent types are generated.\n" + " -G = generate only target files which does not exists.\n" + " -Gc = generate only target files which content will be changed.\n" + " -X<file> = extra types which will not be taken into account for generation.\n\n"; help += prepareVersion(); return help; diff --git a/codemaker/source/javamaker/javaoptions.cxx b/codemaker/source/javamaker/javaoptions.cxx index 6338e9472aa0..4783087ecd0a 100644 --- a/codemaker/source/javamaker/javaoptions.cxx +++ b/codemaker/source/javamaker/javaoptions.cxx @@ -223,18 +223,18 @@ bool JavaOptions::initOptions(int ac, char* av[], bool bCmdFile) OString JavaOptions::prepareHelp() { - OString help("\nusing: "); - help += m_program + " [-options] file_1 ... file_n -Xfile_n+1 -Xfile_n+2\nOptions:\n" - " -O<path> = path describes the root directory for the generated output.\n" - " The output directory tree is generated under this directory.\n" - " -T<name> = name specifies a type or a list of types. The output for this\n" - " [t1;...] type and all dependent types are generated. If no '-T' option is\n" - " specified, then output for all types is generated.\n" - " Example: 'com.sun.star.uno.XInterface' is a valid type.\n" - " -nD = no dependent types are generated.\n" - " -G = generate only target files which does not exists.\n" - " -Gc = generate only target files which content will be changed.\n" - " -X<file> = extra types which will not be taken into account for generation.\n\n"; + OString help = "\nusing: " + + m_program + " [-options] file_1 ... file_n -Xfile_n+1 -Xfile_n+2\nOptions:\n" + " -O<path> = path describes the root directory for the generated output.\n" + " The output directory tree is generated under this directory.\n" + " -T<name> = name specifies a type or a list of types. The output for this\n" + " [t1;...] type and all dependent types are generated. If no '-T' option is\n" + " specified, then output for all types is generated.\n" + " Example: 'com.sun.star.uno.XInterface' is a valid type.\n" + " -nD = no dependent types are generated.\n" + " -G = generate only target files which does not exists.\n" + " -Gc = generate only target files which content will be changed.\n" + " -X<file> = extra types which will not be taken into account for generation.\n\n"; help += prepareVersion(); return help; @@ -242,9 +242,7 @@ OString JavaOptions::prepareHelp() OString JavaOptions::prepareVersion() const { - OString version(m_program); - version += " Version 2.0\n\n"; - return version; + return m_program + " Version 2.0\n\n"; } diff --git a/comphelper/source/misc/backupfilehelper.cxx b/comphelper/source/misc/backupfilehelper.cxx index 268432df3c99..97c1e9d109d6 100644 --- a/comphelper/source/misc/backupfilehelper.cxx +++ b/comphelper/source/misc/backupfilehelper.cxx @@ -187,14 +187,11 @@ namespace if (!rURL.isEmpty() && !rName.isEmpty()) { - aRetval = rURL; - aRetval += "/"; - aRetval += rName; + aRetval = rURL + "/" + rName; if (!rExt.isEmpty()) { - aRetval += "."; - aRetval += rExt; + aRetval += "." + rExt; } } @@ -207,10 +204,7 @@ namespace if (!rURL.isEmpty() && !rName.isEmpty()) { - aRetval = rURL; - aRetval += "/"; - aRetval += rName; - aRetval += ".pack"; + aRetval = rURL + "/" + rName + ".pack"; } return aRetval; @@ -309,8 +303,7 @@ namespace if (!file.second.isEmpty()) { - aNewFileURL += "."; - aNewFileURL += file.second; + aNewFileURL += "." + file.second; } bError |= (osl::FileBase::E_None != osl::File::remove(aNewFileURL)); @@ -368,8 +361,7 @@ namespace if (!file.second.isEmpty()) { - aSourceFileURL += "."; - aSourceFileURL += file.second; + aSourceFileURL += "." + file.second; } if (fileExists(aSourceFileURL)) @@ -378,8 +370,7 @@ namespace if (!file.second.isEmpty()) { - aTargetFileURL += "."; - aTargetFileURL += file.second; + aTargetFileURL += "." +file.second; } if (fileExists(aTargetFileURL)) diff --git a/connectivity/source/drivers/mysql_jdbc/YDriver.cxx b/connectivity/source/drivers/mysql_jdbc/YDriver.cxx index 727a8f2b350b..de6c0fdab812 100644 --- a/connectivity/source/drivers/mysql_jdbc/YDriver.cxx +++ b/connectivity/source/drivers/mysql_jdbc/YDriver.cxx @@ -256,9 +256,7 @@ Reference<XConnection> SAL_CALL ODriverDelegator::connect(const OUString& url, sCuttedUrl += "?"; else sCuttedUrl += "&"; - sCuttedUrl += sAdd; - sCuttedUrl += "characterEncoding="; - sCuttedUrl += sIanaName; + sCuttedUrl += sAdd + "characterEncoding=" + sIanaName; } } } // if ( !bIsODBC ) diff --git a/connectivity/source/drivers/mysql_jdbc/YTable.cxx b/connectivity/source/drivers/mysql_jdbc/YTable.cxx index f62779499d58..6eeaf3a23897 100644 --- a/connectivity/source/drivers/mysql_jdbc/YTable.cxx +++ b/connectivity/source/drivers/mysql_jdbc/YTable.cxx @@ -207,8 +207,7 @@ void SAL_CALL OMySQLTable::alterColumnByName(const OUString& colName, { if (sTypeName.indexOf(s_sAutoIncrement) == -1) { - sTypeName += " "; - sTypeName += s_sAutoIncrement; + sTypeName += OUStringLiteral(" ") + s_sAutoIncrement; } } else diff --git a/connectivity/source/drivers/mysql_jdbc/YUsers.cxx b/connectivity/source/drivers/mysql_jdbc/YUsers.cxx index cdcd22ea096c..5b29ce4ee7c9 100644 --- a/connectivity/source/drivers/mysql_jdbc/YUsers.cxx +++ b/connectivity/source/drivers/mysql_jdbc/YUsers.cxx @@ -72,9 +72,7 @@ sdbcx::ObjectType OUsers::appendObject(const OUString& _rForName, >>= sPassword; if (!sPassword.isEmpty()) { - aSql += " IDENTIFIED BY '"; - aSql += sPassword; - aSql += "'"; + aSql += " IDENTIFIED BY '" + sPassword + "'"; } Reference<XStatement> xStmt = m_xConnection->createStatement(); diff --git a/connectivity/source/drivers/odbc/OConnection.cxx b/connectivity/source/drivers/odbc/OConnection.cxx index f024e156c597..e879684b68fa 100644 --- a/connectivity/source/drivers/odbc/OConnection.cxx +++ b/connectivity/source/drivers/odbc/OConnection.cxx @@ -241,8 +241,7 @@ SQLRETURN OConnection::Construct(const OUString& url,const Sequence< PropertyVal { if( ! (pBegin->Value >>= aSysDrvSettings) ) SAL_WARN("connectivity.odbc", "Construct: unable to get property SystemDriverSettings"); - aDSN += ";"; - aDSN += aSysDrvSettings; + aDSN += ";" + aSysDrvSettings; } else if( pBegin->Name == "CharSet") { diff --git a/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx b/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx index e68a0290e893..fe3cd5646cee 100644 --- a/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx +++ b/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx @@ -854,8 +854,7 @@ void ODatabaseMetaDataResultSet::openTables(const Any& catalog, const OUString& const OUString* pEnd = pBegin + types.getLength(); for(;pBegin != pEnd;++pBegin) { - aCOL += OUStringToOString(*pBegin,m_nTextEncoding); - aCOL += pComma; + aCOL += OUStringToOString(*pBegin,m_nTextEncoding) + pComma; } if ( !aCOL.isEmpty() ) { diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx index 3050d347fcdc..09d263e58805 100644 --- a/connectivity/source/parse/sqlnode.cxx +++ b/connectivity/source/parse/sqlnode.cxx @@ -106,8 +106,7 @@ namespace */ OUString SetQuotation(const OUString& rValue, const OUString& rQuot, const OUString& rQuotToReplace) { - OUString rNewValue = rQuot; - rNewValue += rValue; + OUString rNewValue = rQuot + rValue; sal_Int32 nIndex = sal_Int32(-1); // Replace quotes with double quotes or the parser gets into problems if (!rQuot.isEmpty()) diff --git a/cppu/source/uno/EnvStack.cxx b/cppu/source/uno/EnvStack.cxx index 9907011987f9..5757023cbb88 100644 --- a/cppu/source/uno/EnvStack.cxx +++ b/cppu/source/uno/EnvStack.cxx @@ -119,8 +119,7 @@ extern "C" void SAL_CALL uno_getCurrentEnvironment(uno_Environment ** ppEnv, rtl if (pTypeName && rtl_uString_getLength(pTypeName)) { - OUString envDcp(pTypeName); - envDcp += currPurpose; + OUString envDcp = OUString(pTypeName) + currPurpose; uno_getEnvironment(ppEnv, envDcp.pData, nullptr); } @@ -202,9 +201,7 @@ static int s_getNextEnv(uno_Environment ** ppEnv, uno_Environment * pCurrEnv, un if (!nextPurpose.isEmpty()) { - OUString next_envDcp(UNO_LB_UNO); - next_envDcp += nextPurpose; - + OUString next_envDcp = UNO_LB_UNO + nextPurpose; uno_getEnvironment(ppEnv, next_envDcp.pData, nullptr); } else diff --git a/cppu/source/uno/cascade_mapping.cxx b/cppu/source/uno/cascade_mapping.cxx index 7d44296ea062..13df4d8814e7 100644 --- a/cppu/source/uno/cascade_mapping.cxx +++ b/cppu/source/uno/cascade_mapping.cxx @@ -231,8 +231,7 @@ void getCascadeMapping(uno_Mapping ** ppMapping, { OUString purpose = getPrefix(from_envPurpose, to_envPurpose); - OUString uno_envDcp = uno_envType; - uno_envDcp += purpose; + OUString uno_envDcp = uno_envType + purpose; // direct mapping possible? // uno:bla-->uno:bla:blubb @@ -268,17 +267,13 @@ void getCascadeMapping(uno_Mapping ** ppMapping, else if (from_envType != uno_envType && to_envType == uno_envType) // <ANY> -> UNO ? // mediate via uno:purpose(fromEnv) { - OUString envDcp = uno_envType; - - envDcp += from_envPurpose; + OUString envDcp = uno_envType + from_envPurpose; uno_getEnvironment(&pInterm, envDcp.pData, nullptr); } else if (from_envType == uno_envType && to_envType != uno_envType) // UNO -> <ANY>? // mediate via uno(context) { - OUString envDcp = uno_envType; - - envDcp += to_envPurpose; + OUString envDcp = uno_envType + to_envPurpose; uno_getEnvironment(&pInterm, envDcp.pData, nullptr); } else // everything else @@ -286,8 +281,7 @@ void getCascadeMapping(uno_Mapping ** ppMapping, { OUString purpose = getPrefix(from_envPurpose, to_envPurpose); - OUString uno_envDcp = uno_envType; - uno_envDcp += purpose; + OUString uno_envDcp = uno_envType + purpose; uno_getEnvironment(&pInterm, uno_envDcp.pData, nullptr); } diff --git a/cppu/source/uno/lbenv.cxx b/cppu/source/uno/lbenv.cxx index 55b513a9d5de..71a8e8cb484d 100644 --- a/cppu/source/uno/lbenv.cxx +++ b/cppu/source/uno/lbenv.cxx @@ -931,9 +931,9 @@ void EnvironmentsData::registerEnvironment( uno_Environment ** ppEnv ) OSL_ENSURE( ppEnv, "### null ptr!" ); uno_Environment * pEnv = *ppEnv; - OUString aKey( - OUString::number( reinterpret_cast< sal_IntPtr >(pEnv->pContext) ) ); - aKey += pEnv->pTypeName; + OUString aKey = + OUString::number( reinterpret_cast< sal_IntPtr >(pEnv->pContext) ) + + OUString(pEnv->pTypeName); // try to find registered environment OUString2EnvironmentMap::const_iterator const iFind( diff --git a/cui/source/customize/SvxConfigPageHelper.cxx b/cui/source/customize/SvxConfigPageHelper.cxx index 10d2beb8fa55..cee19268467e 100644 --- a/cui/source/customize/SvxConfigPageHelper.cxx +++ b/cui/source/customize/SvxConfigPageHelper.cxx @@ -196,8 +196,7 @@ sal_uInt32 SvxConfigPageHelper::generateRandomValue() OUString SvxConfigPageHelper::generateCustomURL( SvxEntries* entries ) { - OUString url = ITEM_TOOLBAR_URL; - url += CUSTOM_TOOLBAR_STR; + OUString url = OUStringLiteral(ITEM_TOOLBAR_URL) + CUSTOM_TOOLBAR_STR; // use a random number to minimize possible clash with existing custom toolbars url += OUString::number( generateRandomValue(), 16 ); diff --git a/cui/source/dialogs/hldoctp.cxx b/cui/source/dialogs/hldoctp.cxx index c0dbd18ec0ee..4fb9aad812f8 100644 --- a/cui/source/dialogs/hldoctp.cxx +++ b/cui/source/dialogs/hldoctp.cxx @@ -114,8 +114,7 @@ OUString SvxHyperlinkDocTp::GetCurrentURL () const if( !aStrMark.isEmpty() ) { - aStrURL += sHash; - aStrURL += aStrMark; + aStrURL += sHash + aStrMark; } return aStrURL; diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx index 21314063bf2b..f76d2da53fe2 100644 --- a/cui/source/tabpages/grfpage.cxx +++ b/cui/source/tabpages/grfpage.cxx @@ -642,8 +642,7 @@ void SvxGrfCropPage::GraphicHasChanged( bool bFound ) (static_cast<float>(aOrigSize.Width())/TWIP_TO_INCH)+0.5)); sal_Int32 ay = sal_Int32(floor(static_cast<float>(aOrigPixelSize.Height()) / (static_cast<float>(aOrigSize.Height())/TWIP_TO_INCH)+0.5)); - sTemp += " "; - sTemp += CuiResId( RID_SVXSTR_PPI ); + sTemp += " " + CuiResId( RID_SVXSTR_PPI ); OUString sPPI = OUString::number(ax); if (abs(ax - ay) > 1) { sPPI += OUStringLiteral1(0x00D7) + OUString::number(ay); diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx index 562598dce7d2..f8affa0f044e 100644 --- a/cui/source/tabpages/tpgradnt.cxx +++ b/cui/source/tabpages/tpgradnt.cxx @@ -144,8 +144,7 @@ void SvxGradientTabPage::ActivatePage( const SfxItemSet& rSet ) // determining (and possibly cutting) the name and // displaying it in the GroupBox - OUString aString( CuiResId( RID_SVXSTR_TABLE ) ); - aString += ": "; + OUString aString = CuiResId( RID_SVXSTR_TABLE ) + ": "; INetURLObject aURL( m_pGradientList->GetPath() ); aURL.Append( m_pGradientList->GetName() ); diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx index e3813558de3d..aeb5d9c85fcb 100644 --- a/cui/source/tabpages/tphatch.cxx +++ b/cui/source/tabpages/tphatch.cxx @@ -145,8 +145,7 @@ void SvxHatchTabPage::ActivatePage( const SfxItemSet& rSet ) // determining (possibly cutting) the name // and displaying it in the GroupBox - OUString aString( CuiResId( RID_SVXSTR_TABLE ) ); - aString += ": "; + OUString aString = CuiResId( RID_SVXSTR_TABLE ) + ": "; INetURLObject aURL( m_pHatchingList->GetPath() ); aURL.Append( m_pHatchingList->GetName() ); diff --git a/cui/source/tabpages/tppattern.cxx b/cui/source/tabpages/tppattern.cxx index 6679a411bf48..713a7c3a6628 100644 --- a/cui/source/tabpages/tppattern.cxx +++ b/cui/source/tabpages/tppattern.cxx @@ -142,8 +142,7 @@ void SvxPatternTabPage::ActivatePage( const SfxItemSet& rSet ) // determining (possibly cutting) the name and // displaying it in the GroupBox - OUString aString( CuiResId( RID_SVXSTR_TABLE ) ); - aString += ": "; + OUString aString = CuiResId( RID_SVXSTR_TABLE ) + ": "; INetURLObject aURL( m_pPatternList->GetPath() ); aURL.Append( m_pPatternList->GetName() ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits