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

Lionel Elie Mamane lionel at mamane.lu
Fri Apr 28 15:25:40 UTC 2017


 connectivity/source/commontools/parameters.cxx |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 9e6b275a19b3f11e9a5d87d1cbb9ad192705572f
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Fri Apr 28 17:19:44 2017 +0200

    tdf#107457 don't quote columns referred by expression (not by name)
    
    Change-Id: I4894313ec27d716e9899c885ddc6be38a2447689

diff --git a/connectivity/source/commontools/parameters.cxx b/connectivity/source/commontools/parameters.cxx
index 4f0caca3b4de..3ef722a8fdf9 100644
--- a/connectivity/source/commontools/parameters.cxx
+++ b/connectivity/source/commontools/parameters.cxx
@@ -224,7 +224,12 @@ namespace dbtools
         {
             OUString colName;
             xDetailField->getPropertyValue("RealName") >>= colName;
-            sFilter += quoteName( m_sIdentifierQuoteString, colName ) + " = :";
+            sal_Bool isFunction(false);
+            xDetailField->getPropertyValue("Function") >>= isFunction;
+            if (isFunction)
+                sFilter += colName;
+            else
+                sFilter += quoteName( m_sIdentifierQuoteString, colName );
         }
 
         // generate a parameter name which is not already used
@@ -235,7 +240,7 @@ namespace dbtools
             o_rNewParamName += "_";
         }
 
-        return sFilter += o_rNewParamName;
+        return sFilter += " =:" + o_rNewParamName;
     }
 
 


More information about the Libreoffice-commits mailing list