Esempio n. 1
0
        public bool AddUnfoundFormulaReference(int sheet, int row, int col)
        {
            TriCoord coord = new TriCoord(sheet, row, col);

            this._unfoundFormulaRefList.Add(coord);
            return(true);
        }
Esempio n. 2
0
        public override bool Equals(object obj)
        {
            TriCoord coord = obj as TriCoord;

            if (coord == null)
            {
                return(false);
            }
            return(((coord.Sheet == this.Sheet) && (coord.Row == this.Row)) && (coord.Col == this.Col));
        }
Esempio n. 3
0
        public bool AddSharedFormula(int sheet, int rowFirst, int rowLast, short colFirst, short colLast, byte[] formula, byte[] extra, string baseFormula, LinkTable linkTable)
        {
            SharedFormula formula2 = new SharedFormula(sheet, rowFirst, rowLast, colFirst, colLast, formula, extra, baseFormula);
            Vector <Vector <List <SharedFormula> > > vector = null;

            if (!this._sharedFormulas.ContainsKey(sheet))
            {
                this._sharedFormulas.Add(sheet, new Vector <Vector <List <SharedFormula> > >());
            }
            vector = this._sharedFormulas[sheet];
            for (int i = rowFirst; i <= rowLast; i++)
            {
                if (vector[i] == null)
                {
                    vector[i] = new Vector <List <SharedFormula> >();
                }
                Vector <List <SharedFormula> > vector2 = vector[i];
                for (int j = colFirst; j <= colLast; j++)
                {
                    if (vector2[j] == null)
                    {
                        vector2[j] = new List <SharedFormula>();
                    }
                    vector2[j].Add(formula2);
                }
            }
            if (this._unfoundFormulaRefList.Count > 0)
            {
                int num3 = this._unfoundFormulaRefList.Count;
                for (int k = 0; k < num3; k++)
                {
                    TriCoord coord = (TriCoord)this._unfoundFormulaRefList[k];
                    if (((coord.Col >= colFirst) && (coord.Row >= rowFirst)) && ((coord.Row <= rowLast) && (coord.Col <= colLast)))
                    {
                        MemoryStream stream = new MemoryStream(formula);
                        new BinaryReader((Stream)stream).Close();
                        this._unfoundFormulaRefList.RemoveAt(k);
                        break;
                    }
                }
            }
            return(true);
        }