private void setParameterRVA(Node n, int expectedClass, int formulaType) {
   Ptg p = (Ptg) n.getValue();
   if (expectedClass == Ptg.CLASS_REF) { // pg 15, table 1
     if (p.getDefaultOperandClass() == Ptg.CLASS_REF) {
       setClass(n, Ptg.CLASS_REF);
     }
     if (p.getDefaultOperandClass() == Ptg.CLASS_VALUE) {
       if (formulaType == FORMULA_TYPE_CELL || formulaType == FORMULA_TYPE_SHARED) {
         setClass(n, Ptg.CLASS_VALUE);
       } else {
         setClass(n, Ptg.CLASS_ARRAY);
       }
     }
     if (p.getDefaultOperandClass() == Ptg.CLASS_ARRAY) {
       setClass(n, Ptg.CLASS_ARRAY);
     }
   } else if (expectedClass == Ptg.CLASS_VALUE) { // pg 15, table 2
     if (formulaType == FORMULA_TYPE_NAMEDRANGE) {
       setClass(n, Ptg.CLASS_ARRAY);
     } else {
       setClass(n, Ptg.CLASS_VALUE);
     }
   } else { // Array class, pg 16.
     if (p.getDefaultOperandClass() == Ptg.CLASS_VALUE
         && (formulaType == FORMULA_TYPE_CELL || formulaType == FORMULA_TYPE_SHARED)) {
       setClass(n, Ptg.CLASS_VALUE);
     } else {
       setClass(n, Ptg.CLASS_ARRAY);
     }
   }
 }
 private void setRootLevelRVA(Node n, int formulaType) {
   // Pg 16, excelfileformat.pdf @ openoffice.org
   Ptg p = (Ptg) n.getValue();
   if (formulaType == FormulaParser.FORMULA_TYPE_NAMEDRANGE) {
     if (p.getDefaultOperandClass() == Ptg.CLASS_REF) {
       setClass(n, Ptg.CLASS_REF);
     } else {
       setClass(n, Ptg.CLASS_ARRAY);
     }
   } else {
     setClass(n, Ptg.CLASS_VALUE);
   }
 }