diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-09-30 15:10:05 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-01 08:26:43 +0200 |
commit | 9b3643820bf821c8be728ed20a8cb7ed05cabef2 (patch) | |
tree | 85b3cf0347f5e887b3b6f36aad33f6bb805452d0 /extensions | |
parent | 4f2465f599020b356dc37f3132049a103dd32486 (diff) |
loplugin:stringadd in extensions..framework
Change-Id: I0a0788cdbde292cae582982b0000ee6d5a2056d7
Reviewed-on: https://gerrit.libreoffice.org/79888
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/source/abpilot/abpfinalpage.cxx | 3 | ||||
-rw-r--r-- | extensions/source/bibliography/bibconfig.cxx | 20 | ||||
-rw-r--r-- | extensions/source/bibliography/bibview.cxx | 3 | ||||
-rw-r--r-- | extensions/source/bibliography/datman.cxx | 9 | ||||
-rw-r--r-- | extensions/source/propctrlr/formcomponenthandler.cxx | 3 | ||||
-rw-r--r-- | extensions/source/propctrlr/standardcontrol.cxx | 9 | ||||
-rw-r--r-- | extensions/source/update/check/download.cxx | 4 |
7 files changed, 14 insertions, 37 deletions
diff --git a/extensions/source/abpilot/abpfinalpage.cxx b/extensions/source/abpilot/abpfinalpage.cxx index d420a3658791..685592f8c739 100644 --- a/extensions/source/abpilot/abpfinalpage.cxx +++ b/extensions/source/abpilot/abpfinalpage.cxx @@ -96,8 +96,7 @@ namespace abp if( aURL.GetProtocol() == INetProtocol::NotValid ) { OUString sPath = SvtPathOptions().GetWorkPath(); - sPath += "/"; - sPath += rSettings.sDataSourceName; + sPath += "/" + rSettings.sDataSourceName; std::shared_ptr<const SfxFilter> pFilter = lcl_getBaseFilter(); if ( pFilter ) diff --git a/extensions/source/bibliography/bibconfig.cxx b/extensions/source/bibliography/bibconfig.cxx index daaa3702b03b..986b9f700eae 100644 --- a/extensions/source/bibliography/bibconfig.cxx +++ b/extensions/source/bibliography/bibconfig.cxx @@ -35,7 +35,7 @@ using namespace ::com::sun::star::lang; using namespace ::com::sun::star::sdb; -const char cDataSourceHistory[] = "DataSourceHistory"; +static const char cDataSourceHistory[] = "DataSourceHistory"; Sequence<OUString> const & BibConfig::GetPropertyNames() { @@ -126,10 +126,7 @@ BibConfig::BibConfig() Sequence<OUString> aHistoryNames(3); OUString* pHistoryNames = aHistoryNames.getArray(); - OUString sPrefix(cDataSourceHistory); - sPrefix += "/"; - sPrefix += pNodeNames[nNode]; - sPrefix += "/"; + OUString sPrefix = OUStringLiteral(cDataSourceHistory) + "/" + pNodeNames[nNode] + "/"; pHistoryNames[0] = sPrefix + "DataSourceName"; pHistoryNames[1] = sPrefix + "Command"; pHistoryNames[2] = sPrefix + "CommandType"; @@ -152,9 +149,7 @@ BibConfig::BibConfig() sal_Int16 nFieldIdx = 0; for(sal_Int32 nField = 0; nField < aAssignmentNodeNames.getLength(); nField++) { - OUString sSubPrefix(sPrefix); - sSubPrefix += "/"; - sSubPrefix += pAssignmentNodeNames[nField]; + OUString sSubPrefix = sPrefix + "/" + pAssignmentNodeNames[nField]; pAssignmentPropertyNames[nFieldIdx] = sSubPrefix; pAssignmentPropertyNames[nFieldIdx++] += "/ProgrammaticFieldName"; pAssignmentPropertyNames[nFieldIdx] = sSubPrefix; @@ -224,10 +219,7 @@ void BibConfig::ImplCommit() for(sal_Int32 i = 0; i < static_cast<sal_Int32>(mvMappings.size()); i++) { const Mapping* pMapping = mvMappings[i].get(); - OUString sPrefix(cDataSourceHistory); - sPrefix += "/_"; - sPrefix += OUString::number(i); - sPrefix += "/"; + OUString sPrefix = OUStringLiteral(cDataSourceHistory) + "/_" + OUString::number(i) + "/"; pNodeValues[nIndex].Name = sPrefix + "DataSourceName"; pNodeValues[nIndex++].Value <<= pMapping->sURL; pNodeValues[nIndex].Name = sPrefix + "Command"; @@ -245,9 +237,7 @@ void BibConfig::ImplCommit() while(nFieldAssignment < COLUMN_COUNT && !pMapping->aColumnPairs[nFieldAssignment].sLogicalColumnName.isEmpty()) { - OUString sSubPrefix(sPrefix); - sSubPrefix += "/_"; - sSubPrefix += OUString::number(nFieldAssignment); + OUString sSubPrefix = sPrefix + "/_" + OUString::number(nFieldAssignment); Sequence< PropertyValue > aAssignmentValues(2); PropertyValue* pAssignmentValues = aAssignmentValues.getArray(); pAssignmentValues[0].Name = sSubPrefix; diff --git a/extensions/source/bibliography/bibview.cxx b/extensions/source/bibliography/bibview.cxx index 1664b9f3c249..4f6af6e86415 100644 --- a/extensions/source/bibliography/bibview.cxx +++ b/extensions/source/bibliography/bibview.cxx @@ -148,8 +148,7 @@ namespace bib } else if(bExecute) { - sErrorString += "\n"; - sErrorString += BibResId(RID_MAP_QUESTION); + sErrorString += "\n" + BibResId(RID_MAP_QUESTION); MessageWithCheck aQueryBox(GetFrameWeld()); aQueryBox.set_primary_text(sErrorString); diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx index be9de7ee0866..d5d97729cfd4 100644 --- a/extensions/source/bibliography/datman.cxx +++ b/extensions/source/bibliography/datman.cxx @@ -849,11 +849,9 @@ void BibDataManager::startQueryWith(const OUString& rQuery) { aQueryString=aQuoteChar; aQueryString+=getQueryField(); - aQueryString+=aQuoteChar; - aQueryString+=" like '"; + aQueryString+=aQuoteChar + " like '"; OUString sQuery = rQuery.replaceAll("?","_").replaceAll("*","%"); - aQueryString += sQuery; - aQueryString+="%'"; + aQueryString += sQuery + "%'"; } setFilter(aQueryString); } @@ -1173,8 +1171,7 @@ Reference< awt::XControlModel > BibDataManager::loadControlModel( const OUString& rName, bool bForceListBox) { Reference< awt::XControlModel > xModel; - OUString aName("View_"); - aName += rName; + OUString aName = "View_" + rName; try { diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx index 220e915f4d24..b4eada0786fb 100644 --- a/extensions/source/propctrlr/formcomponenthandler.cxx +++ b/extensions/source/propctrlr/formcomponenthandler.cxx @@ -384,8 +384,7 @@ namespace pcr for ( i = 0; i < nNewCount; ++i ) { sal_Int32 nUniqueId = xStringResourceManager->getUniqueNumericId(); - OUString aPureIdStr = OUString::number( nUniqueId ); - aPureIdStr += aIdStrBase; + OUString aPureIdStr = OUString::number( nUniqueId ) + aIdStrBase; pNewPureIds[i] = aPureIdStr; // Force usage of next Unique Id xStringResourceManager->setString( aPureIdStr, OUString() ); diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx index b5654c89eb11..7d79231e1ecd 100644 --- a/extensions/source/propctrlr/standardcontrol.cxx +++ b/extensions/source/propctrlr/standardcontrol.cxx @@ -1168,10 +1168,8 @@ namespace pcr if (!aInput.isEmpty()) { - aOutput += "\""; + aOutput += "\"" + aInput + "\""; nDiff++; - aOutput += aInput; - aOutput += "\""; } if (nSinglePos <= aOutput.getLength()) @@ -1185,11 +1183,8 @@ namespace pcr aInput=aStr.getToken(0, '\n', nIdx); if (!aInput.isEmpty()) { - aOutput += ";"; - aOutput += "\""; + aOutput += ";\"" + aInput + "\""; nDiff += 2; - aOutput += aInput; - aOutput += "\""; if (nSinglePos <= aOutput.getLength()) { diff --git a/extensions/source/update/check/download.cxx b/extensions/source/update/check/download.cxx index de8b4cc8747e..73e79bcf851d 100644 --- a/extensions/source/update/check/download.cxx +++ b/extensions/source/update/check/download.cxx @@ -306,9 +306,7 @@ static bool curl_run(const OUString& rURL, OutData& out, const OString& aProxyHo } else { - aMessage += ":error code = "; - aMessage += OString::number( nError ); - aMessage += " !"; + aMessage += ":error code = " + OString::number( nError ) + " !"; } } if ( !ret ) |