summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-11-02 18:59:49 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-11-03 17:11:14 +0100
commitab285c743afa1c8769581871d7b56374fd8c49f1 (patch)
treed5628df49fb4db29d474e5e7b7cef4072c33153a /dbaccess
parentf4544f3903fed3a656e3cd57e1bd83582e024b96 (diff)
loplugin:stringadd
tweak the plugin to be more permissive, then validate by hand afterwards Change-Id: I40c5c911fe6ff7e45baaca372abf7dac211d9654 Reviewed-on: https://gerrit.libreoffice.org/81942 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/core/api/SingleSelectQueryComposer.cxx5
-rw-r--r--dbaccess/source/ui/dlg/DbAdminImpl.cxx3
-rw-r--r--dbaccess/source/ui/misc/singledoccontroller.cxx8
-rw-r--r--dbaccess/source/ui/querydesign/QueryDesignView.cxx3
4 files changed, 8 insertions, 11 deletions
diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
index 7a8f2d9cc8b3..81f7a549d8a3 100644
--- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
+++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
@@ -1728,9 +1728,8 @@ void OSingleSelectQueryComposer::setConditionByColumn( const Reference< XPropert
if ( !sFilter.isEmpty() && !aSQL.isEmpty() )
{
- OUString sTemp(L_BRACKET + sFilter + R_BRACKET);
- sTemp += andCriteria ? OUStringLiteral(STR_AND) : OUStringLiteral(STR_OR);
- sFilter = sTemp;
+ sFilter = L_BRACKET + sFilter + R_BRACKET +
+ (andCriteria ? OUStringLiteral(STR_AND) : OUStringLiteral(STR_OR));
}
sFilter += aSQL;
diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
index 04a4da3a4aa3..c5cb06c6c645 100644
--- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx
+++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
@@ -1016,8 +1016,7 @@ void ODbDataSourceAdministrationHelper::convertUrl(SfxItemSet& _rDest)
}
else
{
- OUString sNewUrl = pCollection->getPrefix(eType);
- sNewUrl += sUrlPart;
+ OUString sNewUrl = pCollection->getPrefix(eType) + sUrlPart;
_rDest.Put( SfxStringItem( DSID_CONNECTURL, sNewUrl ) );
}
}
diff --git a/dbaccess/source/ui/misc/singledoccontroller.cxx b/dbaccess/source/ui/misc/singledoccontroller.cxx
index b4000c4ba8b1..bd915b0a5547 100644
--- a/dbaccess/source/ui/misc/singledoccontroller.cxx
+++ b/dbaccess/source/ui/misc/singledoccontroller.cxx
@@ -104,8 +104,8 @@ namespace dbaui
aReturn.bEnabled = isEditable() && GetUndoManager().GetUndoActionCount() != 0;
if ( aReturn.bEnabled )
{
- OUString sUndo(DBA_RES(STR_UNDO_COLON) + " ");
- sUndo += GetUndoManager().GetUndoActionComment();
+ OUString sUndo = DBA_RES(STR_UNDO_COLON) + " " +
+ GetUndoManager().GetUndoActionComment();
aReturn.sTitle = sUndo;
}
break;
@@ -114,8 +114,8 @@ namespace dbaui
aReturn.bEnabled = isEditable() && GetUndoManager().GetRedoActionCount() != 0;
if ( aReturn.bEnabled )
{
- OUString sRedo(DBA_RES(STR_REDO_COLON) + " ");
- sRedo += GetUndoManager().GetRedoActionComment();
+ OUString sRedo = DBA_RES(STR_REDO_COLON) + " " +
+ GetUndoManager().GetRedoActionComment();
aReturn.sTitle = sRedo;
}
break;
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index e4b6ad431ea4..231d8fd6a701 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -2927,8 +2927,7 @@ std::unique_ptr<OSQLParseNode> OQueryDesignView::getPredicateTreeFromEntry(const
if ( nType == DataType::OTHER || (sFunction.isEmpty() && pEntry->isNumericOrAggregateFunction()) )
{
// first try the international version
- OUString sSql;
- sSql += "SELECT * FROM x WHERE " + pEntry->GetField() + _sCriteria;
+ OUString sSql = "SELECT * FROM x WHERE " + pEntry->GetField() + _sCriteria;
std::unique_ptr<OSQLParseNode> pParseNode( rParser.parseTree( _rsErrorMessage, sSql, true ) );
nType = DataType::DOUBLE;
if (pParseNode)