예제 #1
0
파일: Formula.cs 프로젝트: wikijm/Macrome
        public Formula(Cell cell, FormulaValue formulaValue, bool fAlwaysCalc, CellParsedFormula cellParsedFormula) : base(RecordType.Formula, 0)
        {
            this.val  = formulaValue.Bytes;
            this.rw   = cell.Rw;
            this.col  = cell.Col;
            this.ixfe = cell.IXFe;
            ProcessFormulaValue();

            this.fAlwaysCalc = fAlwaysCalc;
            //TODO add handling for shared formulas
            this.fShrFmla     = false;
            this.fClearErrors = true;

            uint flags = 0;

            flags      = flags | Utils.BoolToBitmask(fAlwaysCalc, 0x01);
            flags      = flags | Utils.BoolToBitmask(fShrFmla, 0x08);
            flags      = flags | Utils.BoolToBitmask(fClearErrors, 0x20);
            this.grbit = (ushort)flags;

            this.cce      = cellParsedFormula.cce;
            this.ptgStack = cellParsedFormula.PtgStack;

            this._length = CalculateLength();
        }
예제 #2
0
파일: Formula.cs 프로젝트: wikijm/Macrome
        public void SetCellParsedFormula(CellParsedFormula cellParsedFormula)
        {
            this.cce      = cellParsedFormula.cce;
            this.ptgStack = cellParsedFormula.PtgStack;

            this._length = CalculateLength();
        }