summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2018-01-25 14:52:43 +0100
committerEike Rathke <erack@redhat.com>2018-02-22 14:43:42 +0100
commit074cda388a8c378f3ab433c1f4a5f086b4dcd67e (patch)
tree5dd8382c1a9bece94344816bab2e7bdfdb1b6b9a /svx/source
parent2110c7260ef8f536e2d8517145b91a62b6c52b68 (diff)
tdf#107134: add comparator in form filter
Change-Id: I86d3b5c4ebd231bdad70dc9f5a364658cfca6df4 Reviewed-on: https://gerrit.libreoffice.org/48609 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> (cherry picked from commit 819ba42b3409bd2f66593f619f1934ea7f461364) Reviewed-on: https://gerrit.libreoffice.org/49681 Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/form/formcontroller.cxx34
1 files changed, 34 insertions, 0 deletions
diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx
index 15be71774403..f7d53f99128a 100644
--- a/svx/source/form/formcontroller.cxx
+++ b/svx/source/form/formcontroller.cxx
@@ -51,6 +51,7 @@
#include <com/sun/star/lang/NoSupportException.hpp>
#include <com/sun/star/sdb/ParametersRequest.hpp>
#include <com/sun/star/sdb/RowChangeAction.hpp>
+#include <com/sun/star/sdb/SQLFilterOperator.hpp>
#include <com/sun/star/sdb/XInteractionSupplyParameters.hpp>
#include <com/sun/star/sdbc/ColumnValue.hpp>
#include <com/sun/star/sdbc/DataType.hpp>
@@ -3170,6 +3171,39 @@ void FormController::setFilter(::std::vector<FmFieldInfo>& rFieldInfos)
if ( pParseNode != nullptr )
{
OUString sCriteria;
+ switch (pRefValues[j].Handle)
+ {
+ case css::sdb::SQLFilterOperator::EQUAL:
+ sCriteria += "=";
+ break;
+ case css::sdb::SQLFilterOperator::NOT_EQUAL:
+ sCriteria += "!=";
+ break;
+ case css::sdb::SQLFilterOperator::LESS:
+ sCriteria += "<";
+ break;
+ case css::sdb::SQLFilterOperator::GREATER:
+ sCriteria += ">";
+ break;
+ case css::sdb::SQLFilterOperator::LESS_EQUAL:
+ sCriteria += "<=";
+ break;
+ case css::sdb::SQLFilterOperator::GREATER_EQUAL:
+ sCriteria += ">=";
+ break;
+ case css::sdb::SQLFilterOperator::LIKE:
+ sCriteria += "LIKE ";
+ break;
+ case css::sdb::SQLFilterOperator::NOT_LIKE:
+ sCriteria += "NOT LIKE ";
+ break;
+ case css::sdb::SQLFilterOperator::SQLNULL:
+ sCriteria += "IS NULL";
+ break;
+ case css::sdb::SQLFilterOperator::NOT_SQLNULL:
+ sCriteria += "IS NOT NULL";
+ break;
+ }
pParseNode->parseNodeToPredicateStr( sCriteria
,xConnection
,xFormatter