[Libreoffice-commits] .: Branch 'libreoffice-3-6' - dbaccess/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Aug 30 03:03:53 PDT 2012


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

New commits:
commit 5b43272845878243ce94c1170776ec87c19ad6fd
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
    Reviewed-on: https://gerrit.libreoffice.org/513
    Reviewed-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>
    Reviewed-by: Andras Timar <atimar at suse.com>
    Tested-by: Andras Timar <atimar at suse.com>

diff --git a/dbaccess/source/ui/dlg/queryfilter.cxx b/dbaccess/source/ui/dlg/queryfilter.cxx
index a639828..0f0d248 100644
--- a/dbaccess/source/ui/dlg/queryfilter.cxx
+++ b/dbaccess/source/ui/dlg/queryfilter.cxx
@@ -370,7 +370,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;
@@ -486,7 +488,9 @@ void DlgFilterCrit::SetLine( sal_uInt16 nIdx,const PropertyValue& _rItem,sal_Boo
     ::rtl::OUString aCondition;
     _rItem.Value >>= aCondition;
     String aStr = aCondition.getStr();
-    ::Replace_SQL_PlaceHolder(aStr);
+    if ( _rItem.Handle == SQLFilterOperator::LIKE ||
+         _rItem.Handle == SQLFilterOperator::NOT_LIKE )
+        ::Replace_SQL_PlaceHolder(aStr);
     aStr.EraseTrailingChars();
 
     Reference< XPropertySet > xColumn = getColumn( _rItem.Name );


More information about the Libreoffice-commits mailing list