[Libreoffice-commits] core.git: dbaccess/source
Julien Nabet (via logerrit)
logerrit at kemper.freedesktop.org
Sat Jul 17 07:05:29 UTC 2021
dbaccess/source/ui/querydesign/QueryDesignView.cxx | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
New commits:
commit 4a096b9c787fa2079ef1c8f00fed91d432d46fae
Author: Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Fri Jul 16 20:54:16 2021 +0200
Commit: Julien Nabet <serval2412 at yahoo.fr>
CommitDate: Sat Jul 17 09:04:54 2021 +0200
tdf#143400: fix query with most functions could not be created in GUI
Regression from:
https://cgit.freedesktop.org/libreoffice/core/commit/?id=04aafba860f613c20e7078d038cc83eb02de0b54
loplugin:stringadd simplify some *StringBuffer operations
pulled from a larger patch which I created with a more permissive
variant of this plugin
Specifically here:
-------------- dbaccess/source/ui/querydesign/QueryDesignView.cxx --------------
index 22408bbc58aa..63c5d07998ec 100644
@@ -658,11 +658,10 @@ namespace
if ( field->isAggregateFunction() )
{
OSL_ENSURE(!field->GetFunction().isEmpty(),"Function name must not be empty! ;-(");
- OUStringBuffer aTmpStr2( field->GetFunction());
- aTmpStr2.append("(");
- aTmpStr2.append(aTmpStr.makeStringAndClear());
- aTmpStr2.append(")");
- aTmpStr = aTmpStr2;
+ aTmpStr = field->GetFunction() +
+ "(" +
+ aTmpStr +
+ ")";
}
if (!rFieldAlias.isEmpty() &&
Change-Id: Ib0b57e6c44a58a6a5f9c98aebc6a1213b35108d1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119088
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
Tested-by: Julien Nabet <serval2412 at yahoo.fr>
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index baf90e28997b..cc2bcf2828d4 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -658,10 +658,8 @@ namespace
if ( field->isAggregateFunction() )
{
OSL_ENSURE(!field->GetFunction().isEmpty(),"Function name must not be empty! ;-(");
- aTmpStr = field->GetFunction() +
- "(" +
- aTmpStr +
- ")";
+ OUStringBuffer aTmpStr2( field->GetFunction() + "(" + aTmpStr.makeStringAndClear() + ")");
+ aTmpStr = aTmpStr2;
}
if (!rFieldAlias.isEmpty() &&
More information about the Libreoffice-commits
mailing list