[prev in list] [next in list] [prev in thread] [next in thread] 

List:       poi-dev
Subject:    cvs commit: jakarta-poi/src/java/org/apache/poi/hssf/model FormulaParser.java
From:       glens () apache ! org
Date:       2004-04-29 7:16:36
Message-ID: 20040429071636.77541.qmail () minotaur ! apache ! org
[Download RAW message or body]

glens       2004/04/29 00:16:36

  Modified:    src/java/org/apache/poi/hssf/model FormulaParser.java
  Log:
  Bugfix: http://issues.apache.org/bugzilla/show_bug.cgi?id=24925
  
  Revision  Changes    Path
  1.17      +9 -8      \
jakarta-poi/src/java/org/apache/poi/hssf/model/FormulaParser.java  
  Index: FormulaParser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-poi/src/java/org/apache/poi/hssf/model/FormulaParser.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- FormulaParser.java	9 Apr 2004 13:05:17 -0000	1.16
  +++ FormulaParser.java	29 Apr 2004 07:16:36 -0000	1.17
  @@ -738,17 +738,18 @@
       }
       
       private void setParameterRVA(Node n, int formulaType) {
  -        Ptg p = (Ptg) n.getValue();
  +        Ptg p = n.getValue();
  +        int numOperands = n.getNumChildren();
           if (p instanceof AbstractFunctionPtg) {
  -            int numOperands = n.getNumChildren();
  -            for (int i =0;i<n.getNumChildren();i++) {
  +            for (int i =0;i<numOperands;i++) {
                   setParameterRVA(n.getChild(i),((AbstractFunctionPtg)p).getParameterClass(i),formulaType);
                
  -                if (n.getChild(i).getValue() instanceof AbstractFunctionPtg) {
  -                    setParameterRVA(n.getChild(i),formulaType);
  -                }
  -            }  
  +//                if (n.getChild(i).getValue() instanceof AbstractFunctionPtg) {
  +//                    setParameterRVA(n.getChild(i),formulaType);
  +//                }
  +                setParameterRVA(n.getChild(i),formulaType);
  +            }
           } else {
  -            for (int i =0;i<n.getNumChildren();i++) {
  +            for (int i =0;i<numOperands;i++) {
                   setParameterRVA(n.getChild(i),formulaType);
               }
           } 
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-dev-help@jakarta.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic