summaryrefslogtreecommitdiff
path: root/connectivity/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-09-30 15:09:07 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-10-01 09:22:23 +0200
commit727200b81da0de810dfe623bf52575540f40adbe (patch)
tree3ba4786631faffd79bb20ae14a7b986a842aeda8 /connectivity/source
parent2113f3e7ee0ca5c07f224a54b627777b3a7b5fb0 (diff)
loplugin:stringadd in basctl..cui
Change-Id: I2fdeb7eb3ead3512ad6d3fe793305038ab3aa7ae Reviewed-on: https://gerrit.libreoffice.org/79886 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity/source')
-rw-r--r--connectivity/source/drivers/mysql_jdbc/YDriver.cxx4
-rw-r--r--connectivity/source/drivers/mysql_jdbc/YTable.cxx3
-rw-r--r--connectivity/source/drivers/mysql_jdbc/YUsers.cxx4
-rw-r--r--connectivity/source/drivers/odbc/OConnection.cxx3
-rw-r--r--connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx3
-rw-r--r--connectivity/source/parse/sqlnode.cxx3
6 files changed, 6 insertions, 14 deletions
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())