[Libreoffice-commits] .: dbaccess/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Aug 29 21:00:20 PDT 2012


 dbaccess/source/ui/dlg/queryfilter.cxx |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit c556c5bbd2627aafeb895cb1eb3fb7281d67357d
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Thu Aug 30 05:55:35 2012 +0200

    fdo#53887 convert filter value as LIKE pattern only on (NOT) LIKE
    
    Change-Id: I24d1f3af5d428e735a94fc9a69960244d0225513

diff --git a/dbaccess/source/ui/dlg/queryfilter.cxx b/dbaccess/source/ui/dlg/queryfilter.cxx
index ed22f5a..a869637 100644
--- a/dbaccess/source/ui/dlg/queryfilter.cxx
+++ b/dbaccess/source/ui/dlg/queryfilter.cxx
@@ -358,7 +358,9 @@ sal_Bool DlgFilterCrit::getCondition(const ListBox& _rField,const ListBox& _rCom
     if ( SQLFilterOperator::SQLNULL != _rFilter.Handle && _rFilter.Handle != SQLFilterOperator::NOT_SQLNULL )
     {
         String sPredicateValue = m_aPredicateInput.getPredicateValue( _rValue.GetText(), getMatchingColumn( _rValue ), sal_False );
-        ::Replace_OS_PlaceHolder( sPredicateValue );
+        if ( _rFilter.Handle == SQLFilterOperator::LIKE ||
+             _rFilter.Handle == SQLFilterOperator::NOT_LIKE )
+            ::Replace_OS_PlaceHolder( sPredicateValue );
         _rFilter.Value <<= ::rtl::OUString(sPredicateValue);
     }
     return bHaving;
@@ -469,7 +471,9 @@ void DlgFilterCrit::SetLine( sal_uInt16 nIdx,const PropertyValue& _rItem,sal_Boo
     ::rtl::OUString aCondition;
     _rItem.Value >>= aCondition;
     String aStr = aCondition;
-    ::Replace_SQL_PlaceHolder(aStr);
+    if ( _rItem.Handle == SQLFilterOperator::LIKE ||
+         _rItem.Handle == SQLFilterOperator::NOT_LIKE )
+        ::Replace_SQL_PlaceHolder(aStr);
     aStr = comphelper::string::stripEnd(aStr, ' ');
 
     Reference< XPropertySet > xColumn = getColumn( _rItem.Name );


More information about the Libreoffice-commits mailing list