/**
  * Collects values from a single argument
  */
 private void CollectValues(ValueEval operand, DoubleList temp)
 {
     if (operand is ThreeDEval)
     {
         ThreeDEval ae = (ThreeDEval)operand;
         for (int sIx = ae.FirstSheetIndex; sIx <= ae.LastSheetIndex; sIx++)
         {
             int width  = ae.Width;
             int height = ae.Height;
             for (int rrIx = 0; rrIx < height; rrIx++)
             {
                 for (int rcIx = 0; rcIx < width; rcIx++)
                 {
                     ValueEval ve = ae.GetValue(sIx, rrIx, rcIx);
                     if (!IsSubtotalCounted && ae.IsSubTotal(rrIx, rcIx))
                     {
                         continue;
                     }
                     CollectValue(ve, true, temp);
                 }
             }
         }
         return;
     }
     if (operand is TwoDEval)
     {
         TwoDEval ae     = (TwoDEval)operand;
         int      width  = ae.Width;
         int      height = ae.Height;
         for (int rrIx = 0; rrIx < height; rrIx++)
         {
             for (int rcIx = 0; rcIx < width; rcIx++)
             {
                 ValueEval ve = ae.GetValue(rrIx, rcIx);
                 if (!IsSubtotalCounted && ae.IsSubTotal(rrIx, rcIx))
                 {
                     continue;
                 }
                 CollectValue(ve, true, temp);
             }
         }
         return;
     }
     if (operand is RefEval)
     {
         RefEval re = (RefEval)operand;
         for (int sIx = re.FirstSheetIndex; sIx <= re.LastSheetIndex; sIx++)
         {
             CollectValue(re.GetInnerValueEval(sIx), true, temp);
         }
         return;
     }
     CollectValue((ValueEval)operand, false, temp);
 }
Esempio n. 2
0
 /**
  * don't count cells that are subtotals
  */
 public bool Matches(TwoDEval areEval, int rowIndex, int columnIndex)
 {
     return(!areEval.IsSubTotal(rowIndex, columnIndex));
 }
Esempio n. 3
0
 /**
  * don't count cells that are subtotals
  */
 public bool Matches(TwoDEval areEval, int rowIndex, int columnIndex)
 {
     return !areEval.IsSubTotal(rowIndex, columnIndex);
 }