summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-03-24 19:08:40 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-03-25 06:21:25 +0000
commitd638a512ac19fa68f7760ff110469337f061f481 (patch)
treea5f9d74252f31be1a90b3bcbd346ea58dea217cb /dbaccess/source/ui
parent4ca4282517d02592966576fc642048b3d5ae5532 (diff)
loplugin:stringadd in d*
after my patch to merge the bufferadd loplugin into stringadd Change-Id: I625a0adf89f54ea25f0377a266c37acf9a37d723 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149550 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess/source/ui')
-rw-r--r--dbaccess/source/ui/misc/DExport.cxx3
-rw-r--r--dbaccess/source/ui/misc/WCopyTable.cxx3
-rw-r--r--dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx3
-rw-r--r--dbaccess/source/ui/misc/defaultobjectnamecheck.cxx3
-rw-r--r--dbaccess/source/ui/querydesign/QueryDesignView.cxx24
5 files changed, 14 insertions, 22 deletions
diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx
index d45b791af1af..fdc6bc4b3d26 100644
--- a/dbaccess/source/ui/misc/DExport.cxx
+++ b/dbaccess/source/ui/misc/DExport.cxx
@@ -823,8 +823,7 @@ Reference< XPreparedStatement > ODatabaseExport::createPreparedStatement( const
{
if ( !elem.isEmpty() )
{
- aSql.append(elem);
- aSql.append(",");
+ aSql.append(elem + ",");
aValues.append("?,");
}
}
diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx
index c5db4b2fd956..4d8e73141a5c 100644
--- a/dbaccess/source/ui/misc/WCopyTable.cxx
+++ b/dbaccess/source/ui/misc/WCopyTable.cxx
@@ -213,8 +213,7 @@ OUString ObjectCopySource::getSelectStatement() const
}
else
{ // table
- OUStringBuffer aSQL;
- aSQL.append( "SELECT " );
+ OUStringBuffer aSQL( "SELECT " );
// we need to create the sql stmt with column names
// otherwise it is possible that names don't match
diff --git a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
index d4b039ce66ef..12a73c78877f 100644
--- a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
+++ b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
@@ -535,8 +535,7 @@ namespace dbaui
Reference< XTitle > xTitle(getPrivateModel(),UNO_QUERY);
if ( xTitle.is() )
{
- sTitle.append( xTitle->getTitle() );
- sTitle.append(" : ");
+ sTitle.append( xTitle->getTitle() + " : ");
}
sTitle.append( getPrivateTitle() );
return sTitle.makeStringAndClear();
diff --git a/dbaccess/source/ui/misc/defaultobjectnamecheck.cxx b/dbaccess/source/ui/misc/defaultobjectnamecheck.cxx
index d2a158d2b76e..736d9378ae9b 100644
--- a/dbaccess/source/ui/misc/defaultobjectnamecheck.cxx
+++ b/dbaccess/source/ui/misc/defaultobjectnamecheck.cxx
@@ -88,8 +88,7 @@ namespace dbaui
OUStringBuffer aCompleteName;
if ( !msRelativeRoot.isEmpty() )
{
- aCompleteName.append( msRelativeRoot );
- aCompleteName.append( "/" );
+ aCompleteName.append( msRelativeRoot + "/" );
}
aCompleteName.append( _rObjectName );
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index c081012ddf2a..1c23e936b016 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -291,11 +291,12 @@ namespace
{
if(!aCondition.isEmpty())
aCondition.append(C_AND);
- aCondition.append(quoteTableAlias(true,pData->GetAliasName(JTCS_FROM),aQuote));
- aCondition.append(::dbtools::quoteName(aQuote, lineData->GetFieldName(JTCS_FROM) ));
- aCondition.append(" = ");
- aCondition.append(quoteTableAlias(true,pData->GetAliasName(JTCS_TO),aQuote));
- aCondition.append(::dbtools::quoteName(aQuote, lineData->GetFieldName(JTCS_TO) ));
+ aCondition.append(
+ quoteTableAlias(true,pData->GetAliasName(JTCS_FROM),aQuote)
+ + ::dbtools::quoteName(aQuote, lineData->GetFieldName(JTCS_FROM) )
+ + " = "
+ + quoteTableAlias(true,pData->GetAliasName(JTCS_TO),aQuote)
+ + ::dbtools::quoteName(aQuote, lineData->GetFieldName(JTCS_TO) ));
}
}
catch(SQLException&)
@@ -668,8 +669,7 @@ namespace
field->isNumericOrAggregateFunction() ||
field->isOtherFunction()))
{
- aTmpStr.append(" AS ");
- aTmpStr.append(::dbtools::quoteName(aQuote, rFieldAlias));
+ aTmpStr.append(" AS " + ::dbtools::quoteName(aQuote, rFieldAlias));
}
aFieldListStr.append(aTmpStr);
aTmpStr.setLength(0);
@@ -2771,14 +2771,11 @@ OUString OQueryDesignView::getStatement()
OUStringBuffer aSqlCmd("SELECT ");
if(rController.isDistinct())
aSqlCmd.append(" DISTINCT ");
- aSqlCmd.append(aFieldListStr);
- aSqlCmd.append(" FROM ");
- aSqlCmd.append(aTableListStr);
+ aSqlCmd.append(aFieldListStr + " FROM " + aTableListStr);
if (!aCriteriaListStr.isEmpty())
{
- aSqlCmd.append(" WHERE ");
- aSqlCmd.append(aCriteriaListStr);
+ aSqlCmd.append(" WHERE " + aCriteriaListStr);
}
Reference<XDatabaseMetaData> xMeta;
if ( xConnection.is() )
@@ -2791,8 +2788,7 @@ OUString OQueryDesignView::getStatement()
// ----------------- construct GroupBy and attach ------------
if(!aHavingStr.isEmpty())
{
- aSqlCmd.append(" HAVING ");
- aSqlCmd.append(aHavingStr);
+ aSqlCmd.append(" HAVING " + aHavingStr);
}
// ----------------- construct sorting and attach ------------
OUString sOrder;