]> source.dussan.org Git - poi.git/commitdiff
Bugfix: http://issues.apache.org/bugzilla/show_bug.cgi?id=24925
authorGlen Stampoultzis <glens@apache.org>
Thu, 29 Apr 2004 07:16:36 +0000 (07:16 +0000)
committerGlen Stampoultzis <glens@apache.org>
Thu, 29 Apr 2004 07:16:36 +0000 (07:16 +0000)
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353553 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/poi/hssf/model/FormulaParser.java

index e95bba1ff43842c1c1d52a6ff41f8b01bac06f45..977b8784395ddeae841bc642646ffa049edfaa4a 100644 (file)
@@ -738,17 +738,18 @@ end;
     }
     
     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);
             }
         }