Kaydet (Commit) 7b475a2f authored tarafından Matteo Casalin's avatar Matteo Casalin

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: 's avatarMatteo Casalin <matteo.casalin@yahoo.com>
üst 6e3c4ae8
......@@ -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()) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment