Tag: cws_src680_dba24d
User: oj      
Date: 2007-11-26 07:29:04+0000
Modified:
   dba/connectivity/source/parse/sqlnode.cxx

Log:
 #i83810# normalize nodes

File Changes:

Directory: /dba/connectivity/source/parse/
==========================================

File [changed]: sqlnode.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/parse/sqlnode.cxx?r1=1.49&r2=1.49.2.1
Delta lines:  +20 -22
---------------------
--- sqlnode.cxx 2007-11-01 14:52:34+0000        1.49
+++ sqlnode.cxx 2007-11-26 07:29:01+0000        1.49.2.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: sqlnode.cxx,v $
  *
- *  $Revision: 1.49 $
+ *  $Revision: 1.49.2.1 $
  *
- *  last change: $Author: hr $ $Date: 2007/11/01 14:52:34 $
+ *  last change: $Author: oj $ $Date: 2007/11/26 07:29:01 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -1855,7 +1855,7 @@
         disjunctiveNormalForm(pRight);
 
         OSQLParseNode* pNewNode = NULL;
-        // '(' search_condition ')'
+        // '(' search_condition ')' on left side
         if(pLeft->count() == 3 && SQL_ISRULE(pLeft,boolean_primary) && 
SQL_ISRULE(pLeft->getChild(1),search_condition))
         {
             // and-or tree  on left side
@@ -1875,10 +1875,9 @@
             disjunctiveNormalForm(pSearchCondition);
         }
         else if(pRight->count() == 3 && SQL_ISRULE(pRight,boolean_primary) && 
SQL_ISRULE(pRight->getChild(1),search_condition))
-        {
+        {   // '(' search_condition ')' on right side
             // and-or tree  on right side
-            if ( pRight->getChild(1)->getByRule(OSQLParseNode::boolean_term) )
-            {
+            // a and (b or c)
                 OSQLParseNode* pOr = pRight->getChild(1);
                 OSQLParseNode* pNewLeft = NULL;
                 OSQLParseNode* pNewRight = NULL;
@@ -1894,7 +1893,6 @@
                 replaceAndReset(pSearchCondition,pNewNode);
                 disjunctiveNormalForm(pSearchCondition);
             }
-        }
         else if(SQL_ISRULE(pLeft,boolean_primary) && 
(!SQL_ISRULE(pLeft->getChild(1),search_condition) || 
!SQL_ISRULE(pLeft->getChild(1),boolean_term)))
             pSearchCondition->replace(pLeft, pLeft->removeAt(1));
         else if(SQL_ISRULE(pRight,boolean_primary) && 
(!SQL_ISRULE(pRight->getChild(1),search_condition) || 
!SQL_ISRULE(pRight->getChild(1),boolean_term)))




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to