public void Commit(SurfaceTarget surface, VisioAutomation.ShapeSheet.CellValueType type)
        {
            if ((this._records == null || this._records.Count < 1))
            {
                return;
            }

            var stream = this._records.BuildStreamArray(StreamType.SidSrc);
            var items  = this._records.BuildValuesArray();

            if (stream.Array.Length == 0)
            {
                throw new VisioAutomation.Exceptions.InternalAssertionException();
            }

            if (type == CellValueType.Formula)
            {
                var flags = this._compute_setformula_flags();
                int c     = surface.SetFormulas(stream, items, (short)flags);
            }
            else
            {
                const object[] unitcodes = null;
                var            flags     = this._compute_setresults_flags();
                surface.SetResults(stream, unitcodes, items, (short)flags);
            }
        }
示例#2
0
        private void CommitFormulas(SurfaceTarget surface)
        {
            if ((this._formulaRecords == null || this._formulaRecords.Count < 1))
            {
                return;
            }

            var stream   = this.buildstream_src(this._formulaRecords);
            var formulas = this._formulaRecords.BuildValues();

            if (stream.Array.Length == 0)
            {
                throw new VisioAutomation.Exceptions.InternalAssertionException();
            }

            var flags = this.ComputeGetFormulaFlags();

            int c = surface.SetFormulas(stream, formulas, (short)flags);
        }
        public void CommitFormulas(SurfaceTarget surface)
        {
            if ((this._records == null || this._records.Count < 1))
            {
                return;
            }

            var stream   = this._records.BuildStreamArray(StreamType.SidSrc);
            var formulas = this._records.BuildValuesArray();

            if (stream.Array.Length == 0)
            {
                throw new VisioAutomation.Exceptions.InternalAssertionException();
            }

            var flags = this._compute_setformula_flags();

            int c = surface.SetFormulas(stream, formulas, (short)flags);
        }