diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2015-01-28 21:09:42 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-03-04 03:17:19 -0800 |
commit | 04341697fbc79fa4c2a07883194ba0929767b9b7 (patch) | |
tree | d9bee2fe99c736eaa06cf4edeed5ccf13494ada5 | |
parent | 6b701c7242f74a6395348f9c9bf2dbb99eb4ee92 (diff) |
not all OrCriteria have three children
and some contain a column in the second child
Change-Id: Ifd69758336233ed0233120b3315d4f33655fa994
Reviewed-on: https://gerrit.libreoffice.org/14719
Tested-by: David Tardon <dtardon@redhat.com>
Reviewed-by: David Tardon <dtardon@redhat.com>
(cherry picked from commit 1ce2461ab77f2ad28671ac1542509bbb16a155ef)
-rw-r--r-- | dbaccess/source/ui/querydesign/QueryDesignView.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index 880cafcb74e9..7f6a1b117d84 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 |