Esempio n. 1
0
        void CellContents()
        {
            Expr e; double d;
            switch (la.kind) {
            case 20: {
            Get();
            Expr(out e);
            this.cell = Formula.Make(workbook, e);
            break;
            }
            case 16: {
            Get();
            this.cell = new QuoteCell(t.val.Substring(1));
            break;
            }
            case 15: {
            Get();
            this.cell = new TextCell(t.val.Substring(1, t.val.Length-2));
            break;
            }
            case 3: {
            Get();
            long ticks = DateTime.Parse(t.val).Ticks;
            double time = NumberValue.DoubleFromDateTimeTicks(ticks);
            this.cell = new NumberCell(time);

            break;
            }
            case 2: {
            Number(out d);
            this.cell = new NumberCell(d);
            break;
            }
            case 18: {
            Get();
            Number(out d);
            this.cell = new NumberCell(-d);
            break;
            }
            default: SynErr(42); break;
            }
        }
Esempio n. 2
0
File: Cells.cs Progetto: Dugin13/P10
 // Use at manual cell update, and only if the oldCell is never used again
 public void TransferSupportTo(ref Cell newCell)
 {
     if (supportSet != null) {
     newCell = newCell ?? new BlankCell();
     newCell.supportSet = supportSet;
       }
 }