dbaccess/source/ui/querydesign/QueryDesignView.cxx | 6 ++++-- include/connectivity/sqlnode.hxx | 5 ++--- 2 files changed, 6 insertions(+), 5 deletions(-)
New commits: commit bec15074ae8eca9ff7deb795aae0e7a2f9789aaf Author: Lionel Elie Mamane <lio...@mamane.lu> Date: Wed Jan 28 21:10:53 2015 +0100 That is well worth an assert The exception thrown by at() is not treated meaningfully anyway. Change-Id: I8c243541271d7da76b2a9b102e058b5f2d1ad6d3 diff --git a/include/connectivity/sqlnode.hxx b/include/connectivity/sqlnode.hxx index bf7f476..b6c6234 100644 --- a/include/connectivity/sqlnode.hxx +++ b/include/connectivity/sqlnode.hxx @@ -446,10 +446,9 @@ namespace connectivity inline OSQLParseNode* OSQLParseNode::getChild(sal_uInt32 nPos) const { - OSL_ENSURE(nPos < m_aChildren.size(), "Invalid Position"); + assert(nPos < m_aChildren.size()); - // return m_aChildren[nPos]; - return m_aChildren.at(nPos); + return m_aChildren[nPos]; } // utilities to query for a specific rule, token or punctuation commit b63547c8ea8ac2e198193cba1026e7729c70f43a Author: Lionel Elie Mamane <lio...@mamane.lu> Date: Wed Jan 28 21:09:42 2015 +0100 not all OrCriteria have three children and some contain a column in the second child Change-Id: Ifd69758336233ed0233120b3315d4f33655fa994 diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index 8acc411..032ca0d 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -1305,10 +1305,12 @@ namespace { bool bRet = true; ::connectivity::OSQLParseNode* pFirstColumnRef = _pFirstColumnRef; - for (int i = 0; i < 3 && bRet; i+=2) + for (size_t i = 0; bRet && i < _pCondition->count() && bRet; ++i) { const ::connectivity::OSQLParseNode* pChild = _pCondition->getChild(i); - if ( SQL_ISRULE(pChild,search_condition) ) + if ( pChild->isToken() ) + continue; + else if ( SQL_ISRULE(pChild,search_condition) ) bRet = CheckOrCriteria(pChild,pFirstColumnRef); else { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits