diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2018-12-29 23:17:13 +0100 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2019-01-13 14:03:28 +0100 |
commit | 7b475a2fcde27e44a71962f1010f92bf9df87fb1 (patch) | |
tree | a894764f30b36f2787ad64b606e46187c0852279 /dbaccess | |
parent | 6e3c4ae8bca898700cde9caaff43c3a8a61eebc2 (diff) |
No need to look for separator presence before using getToken
Change-Id: I2782dc02bfc9ef7f9a4a3efd8f90a4193a80cbad
Reviewed-on: https://gerrit.libreoffice.org/66219
Tested-by: Jenkins
Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/querydesign/QueryDesignView.cxx | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index af315749012d..3b0fec6e836d 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -2917,13 +2917,10 @@ std::unique_ptr<OSQLParseNode> OQueryDesignView::getPredicateTreeFromEntry(const // we have a function here so we have to distinguish the type of return vOUalue OUString sFunction; if ( pEntry->isNumericOrAggreateFunction() ) - sFunction = pEntry->GetFunction(); + sFunction = pEntry->GetFunction().getToken(0, '('); if ( sFunction.isEmpty() ) - sFunction = pEntry->GetField(); - - if (sFunction.indexOf('(')>=0) // sFunctions has at least 2 tokens - sFunction = sFunction.getToken(0,'('); // this should be the name of the function + sFunction = pEntry->GetField().getToken(0, '('); sal_Int32 nType = ::connectivity::OSQLParser::getFunctionReturnType(sFunction,&rParser.getContext()); if ( nType == DataType::OTHER || (sFunction.isEmpty() && pEntry->isNumericOrAggreateFunction()) ) |