summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/querydesign
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-06-03 10:17:13 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-06-03 11:34:19 +0200
commitc1965859c05ccd13859198fe1479167afb4efc7c (patch)
treea53501190021be0a0a626e8dfdc48cf16143492f /dbaccess/source/ui/querydesign
parent1fc5b6c9bd138d974f1d5fc3546b702bc4fc568c (diff)
elide some makeStringAndClear() class
when we are passing the result to a string_view, it is pointless. Change-Id: I4c780bd8dd356bd764b9f88400a41cca6d85f84b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135337 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess/source/ui/querydesign')
-rw-r--r--dbaccess/source/ui/querydesign/QueryDesignView.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index 15a482e91cb2..f5e4288e95d0 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -659,7 +659,7 @@ namespace
if ( field->isAggregateFunction() )
{
OSL_ENSURE(!field->GetFunction().isEmpty(),"Function name must not be empty! ;-(");
- OUStringBuffer aTmpStr2( field->GetFunction() + "(" + aTmpStr.makeStringAndClear() + ")");
+ OUStringBuffer aTmpStr2( field->GetFunction() + "(" + aTmpStr + ")");
aTmpStr = aTmpStr2;
}
@@ -671,7 +671,8 @@ namespace
aTmpStr.append(" AS ");
aTmpStr.append(::dbtools::quoteName(aQuote, rFieldAlias));
}
- aFieldListStr.append(aTmpStr.makeStringAndClear());
+ aFieldListStr.append(aTmpStr);
+ aTmpStr.setLength(0);
aFieldListStr.append(", ");
}
}
@@ -2777,7 +2778,7 @@ OUString OQueryDesignView::getStatement()
if (!aCriteriaListStr.isEmpty())
{
aSqlCmd.append(" WHERE ");
- aSqlCmd.append(aCriteriaListStr.makeStringAndClear());
+ aSqlCmd.append(aCriteriaListStr);
}
Reference<XDatabaseMetaData> xMeta;
if ( xConnection.is() )
@@ -2791,7 +2792,7 @@ OUString OQueryDesignView::getStatement()
if(!aHavingStr.isEmpty())
{
aSqlCmd.append(" HAVING ");
- aSqlCmd.append(aHavingStr.makeStringAndClear());
+ aSqlCmd.append(aHavingStr);
}
// ----------------- construct sorting and attach ------------
OUString sOrder;