diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2012-08-30 03:58:55 +0200 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2012-08-30 05:23:06 +0200 |
commit | 3655f2546500d52f2e555fb8d4964a26cf0f341e (patch) | |
tree | 8515464a86a69e9fe4aea5d99f04fa01f4d77c32 /dbaccess | |
parent | 92f877ab098d2003581b73a5f0ec0f0038ef84cd (diff) |
fdo#48807 autofilter should not use LIKE operator
This demonstrates a confusion between *values* and *patterns*
Change-Id: I207aa53950166e915bbad22b022c88d07ee6300d
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/api/querycomposer.cxx | 18 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/brwctrlr.cxx | 17 |
2 files changed, 2 insertions, 33 deletions
diff --git a/dbaccess/source/core/api/querycomposer.cxx b/dbaccess/source/core/api/querycomposer.cxx index 01e5adc3fbe6..1c72c7800e84 100644 --- a/dbaccess/source/core/api/querycomposer.cxx +++ b/dbaccess/source/core/api/querycomposer.cxx @@ -225,23 +225,7 @@ void SAL_CALL OQueryComposer::appendFilterByColumn( const Reference< XPropertySe m_xComposerHelper->setQuery(getQuery()); m_xComposerHelper->setFilter(::rtl::OUString()); - sal_Int32 nOp = SQLFilterOperator::EQUAL; - if ( column.is() ) - { - sal_Int32 nType = 0; - column->getPropertyValue(PROPERTY_TYPE) >>= nType; - switch(nType) - { - case DataType::VARCHAR: - case DataType::CHAR: - case DataType::LONGVARCHAR: - nOp = SQLFilterOperator::LIKE; - break; - default: - nOp = SQLFilterOperator::EQUAL; - } - } - m_xComposerHelper->appendFilterByColumn(column,sal_True,nOp); + m_xComposerHelper->appendFilterByColumn(column, sal_True, SQLFilterOperator::EQUAL); FilterCreator aFilterCreator; aFilterCreator.append(getFilter()); diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx index d28d5821a059..a2931e72971f 100644 --- a/dbaccess/source/ui/browser/brwctrlr.cxx +++ b/dbaccess/source/ui/browser/brwctrlr.cxx @@ -2216,22 +2216,7 @@ void SbaXDataBrowserController::Execute(sal_uInt16 nId, const Sequence< Property sal_Bool bParserSuccess = sal_False; - sal_Int32 nOp = SQLFilterOperator::EQUAL; - if ( xField.is() ) - { - sal_Int32 nType = 0; - xField->getPropertyValue(PROPERTY_TYPE) >>= nType; - switch(nType) - { - case DataType::VARCHAR: - case DataType::CHAR: - case DataType::LONGVARCHAR: - nOp = SQLFilterOperator::LIKE; - break; - default: - nOp = SQLFilterOperator::EQUAL; - } - } + const sal_Int32 nOp = SQLFilterOperator::EQUAL; if ( bHaving ) { |