dbaccess/source/ui/querydesign/QueryDesignView.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
New commits: commit 4a096b9c787fa2079ef1c8f00fed91d432d46fae Author: Julien Nabet <[email protected]> AuthorDate: Fri Jul 16 20:54:16 2021 +0200 Commit: Julien Nabet <[email protected]> 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 <[email protected]> Reviewed-by: Julien Nabet <[email protected]> Tested-by: Julien Nabet <[email protected]> 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() && _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
