diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2012-08-30 05:55:35 +0200 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2012-08-30 05:59:40 +0200 |
commit | c556c5bbd2627aafeb895cb1eb3fb7281d67357d (patch) | |
tree | e1512a3709c6ebaab54f392fe07babc72971974e | |
parent | 92656d5de9e16c429c0dbd2db355bee8026303cd (diff) |
fdo#53887 convert filter value as LIKE pattern only on (NOT) LIKE
Change-Id: I24d1f3af5d428e735a94fc9a69960244d0225513
-rw-r--r-- | dbaccess/source/ui/dlg/queryfilter.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/dbaccess/source/ui/dlg/queryfilter.cxx b/dbaccess/source/ui/dlg/queryfilter.cxx index ed22f5aca95b..a8696374338d 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 ); |