diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2021-07-16 20:54:16 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-17 11:33:42 +0200 |
commit | 0c8d209683e04f22e924e125f778e00836c0b132 (patch) | |
tree | 32c3d9ee6e09d72bdba24b484b555f8f1b8ad7ec /dbaccess | |
parent | f1f199522617beaa67b76bc79280d1abd4145e2a (diff) |
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@collabora.co.uk>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
(cherry picked from commit 4a096b9c787fa2079ef1c8f00fed91d432d46fae)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119039
Tested-by: Jenkins
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/querydesign/QueryDesignView.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
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() && |