diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-01 18:23:21 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-02 08:39:14 +0200 |
commit | 91c836acea76cffb0e2d5df0d15fc94d84bfdc5a (patch) | |
tree | 24b688ec199566fd692aa7b7f22d772c1e484a8c /sw/source/uibase/dbui | |
parent | 9d99dc8a835d66cbe27e4cbf5869e6704dd781f9 (diff) |
loplugin:stringadd in sw
Change-Id: I72e1cbc229a47660b2313f46898753e273b69d35
Reviewed-on: https://gerrit.libreoffice.org/79985
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase/dbui')
-rw-r--r-- | sw/source/uibase/dbui/dbmgr.cxx | 9 | ||||
-rw-r--r-- | sw/source/uibase/dbui/mmconfigitem.cxx | 16 |
2 files changed, 8 insertions, 17 deletions
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index d9341d8c60ea..fdfc9ee78873 100644 --- a/sw/source/uibase/dbui/dbmgr.cxx +++ b/sw/source/uibase/dbui/dbmgr.cxx @@ -1392,8 +1392,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell, PrintMonitor *pPrintMonDlg = static_cast<PrintMonitor*>(xProgressDlg.get()); pPrintMonDlg->m_xPrinter->set_label(bNeedsTempFiles ? aTempFileURL->GetBase() : pSourceDocSh->GetTitle( 2)); - OUString sStat( SwResId(STR_STATSTR_LETTER) ); - sStat += " " + OUString::number( nDocNo ); + OUString sStat = SwResId(STR_STATSTR_LETTER) + " " + OUString::number( nDocNo ); pPrintMonDlg->m_xPrintInfo->set_label(sStat); } //TODO xProgressDlg->queue_draw(); @@ -2368,11 +2367,7 @@ bool SwDBManager::OpenDataSource(const OUString& rDataSource, const OUString& rT } pFound->xStatement = pFound->xConnection->createStatement(); OUString aQuoteChar = xMetaData->getIdentifierQuoteString(); - OUString sStatement("SELECT * FROM "); - sStatement = "SELECT * FROM "; - sStatement += aQuoteChar; - sStatement += rTableOrQuery; - sStatement += aQuoteChar; + OUString sStatement = "SELECT * FROM " + aQuoteChar + rTableOrQuery + aQuoteChar; pFound->xResultSet = pFound->xStatement->executeQuery( sStatement ); //after executeQuery the cursor must be positioned diff --git a/sw/source/uibase/dbui/mmconfigitem.cxx b/sw/source/uibase/dbui/mmconfigitem.cxx index 65625e3fdc9c..2a0cb3aa7ff9 100644 --- a/sw/source/uibase/dbui/mmconfigitem.cxx +++ b/sw/source/uibase/dbui/mmconfigitem.cxx @@ -299,10 +299,10 @@ SwMailMergeConfigItem_Impl::SwMailMergeConfigItem_Impl() : sal_Int32 nAssign; for(nAssign = 0; nAssign < aAssignProperties.getLength(); nAssign += 4) { - OUString sAssignPath = cAddressDataAssignments; - sAssignPath += "/"; - sAssignPath += pAssignments[nAssign / 4]; - sAssignPath += "/"; + OUString sAssignPath = OUStringLiteral(cAddressDataAssignments) + + "/" + + pAssignments[nAssign / 4] + + "/"; pAssignProperties[nAssign] = sAssignPath; pAssignProperties[nAssign] += cDataSourceName; pAssignProperties[nAssign + 1] = sAssignPath; @@ -552,10 +552,7 @@ void SwMailMergeConfigItem_Impl::ImplCommit() rAssignment.sConfigNodeName : lcl_CreateNodeName(aAssignments); OUString sSlash = "/"; - OUString sNodePath = cAddressDataAssignments; - sNodePath += sSlash; - sNodePath += sNewNode; - sNodePath += sSlash; + OUString sNodePath = cAddressDataAssignments + sSlash + sNewNode + sSlash; //only one new entry is written Sequence< PropertyValue > aNewValues(4); PropertyValue* pNewValues = aNewValues.getArray(); @@ -1243,8 +1240,7 @@ bool SwMailMergeConfigItem::IsGreetingFieldsAssigned() const if(rMaleEntries.getLength() > nCurrentMale) sMale = rMaleEntries[nCurrentMale]; - OUString sAddress( sFemale ); - sAddress += sMale; + OUString sAddress = sFemale + sMale; SwAddressIterator aIter(sAddress); while(aIter.HasMore()) { |