[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - svx/source
Julien Nabet
serval2412 at yahoo.fr
Thu Feb 22 13:44:07 UTC 2018
svx/source/form/formcontroller.cxx | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
New commits:
commit 074cda388a8c378f3ab433c1f4a5f086b4dcd67e
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Thu Jan 25 14:52:43 2018 +0100
tdf#107134: add comparator in form filter
Change-Id: I86d3b5c4ebd231bdad70dc9f5a364658cfca6df4
Reviewed-on: https://gerrit.libreoffice.org/48609
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
(cherry picked from commit 819ba42b3409bd2f66593f619f1934ea7f461364)
Reviewed-on: https://gerrit.libreoffice.org/49681
Reviewed-by: Eike Rathke <erack at redhat.com>
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
More information about the Libreoffice-commits
mailing list