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);
            }
        }
Esempio n. 2
0
        private void CommitResults(SurfaceTarget surface)
        {
            if (this._resultRecords == null || this._resultRecords.Count < 1)
            {
                return;
            }

            var            stream    = this.buildstream_src(this._resultRecords);
            var            results   = this._resultRecords.BuildValues();
            const object[] unitcodes = null;

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

            var flags = this.ComputeGetResultFlags();

            surface.SetResults(stream, unitcodes, results, (short)flags);
        }