[Libreoffice-commits] core.git: dbaccess/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sun Jan 13 13:03:50 UTC 2019


 dbaccess/source/ui/querydesign/QueryDesignView.cxx |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

New commits:
commit 7b475a2fcde27e44a71962f1010f92bf9df87fb1
Author:     Matteo Casalin <matteo.casalin at yahoo.com>
AuthorDate: Sat Dec 29 23:17:13 2018 +0100
Commit:     Matteo Casalin <matteo.casalin at yahoo.com>
CommitDate: Sun Jan 13 14:03:28 2019 +0100

    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 at yahoo.com>

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()) )


More information about the Libreoffice-commits mailing list