summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2015-01-28 21:09:42 +0100
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2015-02-09 10:46:46 +0000
commita9cbae63a43cbdafd245eb67c09832d554f51c93 (patch)
treeeb93efc3a5d15634b3c5c5f7c5050c07832c4259
parente33e78a6fce0faf86f944cfc13726d4f132ef4e5 (diff)
not all OrCriteria have three children
and some contain a column in the second child Change-Id: I60aca574815251902aa7dd1056903bdade9e21a1 Reviewed-on: https://gerrit.libreoffice.org/14340 Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
-rw-r--r--dbaccess/source/ui/querydesign/QueryDesignView.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index 312395d0674d..b2efec03899f 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -1304,9 +1304,11 @@ namespace
{
bool bRet = true;
::connectivity::OSQLParseNode* pFirstColumnRef = _pFirstColumnRef;
- for (int i = 0; i < 3 && bRet; i+=2)
+ for (size_t i = 0; i < _pCondition->count() && bRet; ++i)
{
const ::connectivity::OSQLParseNode* pChild = _pCondition->getChild(i);
+ if ( pChild->isToken() )
+ continue;
if ( SQL_ISRULE(pChild,search_condition) )
bRet = CheckOrCriteria(pChild,pFirstColumnRef);
else