예제 #1
0
        public ListOutput <ShapeSheet.CellData> GetFormulasAndResults(ShapeSheetSurface surface, IList <int> shapeids)
        {
            var srcstream     = this._build_sidsrc_stream(surface, shapeids);
            var unitcodes     = this._build_unit_code_array(shapeids.Count);
            var results       = QueryHelpers.GetResults_SIDSRC <string>(surface, srcstream, unitcodes);
            var formulas      = QueryHelpers.GetFormulasU_SIDSRC(surface, srcstream);
            var combined_data = CellData.Combine(formulas, results);
            var r             = this._create_outputs_for_shapes(shapeids, combined_data);

            return(r);
        }
예제 #2
0
        public Output <ShapeSheet.CellData> GetFormulasAndResults(ShapeSheetSurface surface)
        {
            var srcstream     = this._build_src_stream(surface);
            var unitcodes     = this._build_unit_code_array(1);
            var formulas      = QueryHelpers.GetFormulasU_SRC(surface, srcstream);
            var results       = QueryHelpers.GetResults_SRC <string>(surface, srcstream, unitcodes);
            var combined_data = CellData.Combine(formulas, results);

            var shape_index      = 0;
            var cursor           = 0;
            var subqueryinfo     = this._safe_get_subquery_output_for_shape(shape_index);
            var output_for_shape = this._create_output_for_shape <ShapeSheet.CellData>(surface.Target.ID16, combined_data, subqueryinfo, ref cursor);

            return(output_for_shape);
        }
예제 #3
0
        public QueryOutputCollection <ShapeSheet.CellData> GetFormulasAndResults(ShapeSheetSurface surface, IList <int> shapeids)
        {
            var shapes = new List <IVisio.Shape>(shapeids.Count);

            shapes.AddRange(shapeids.Select(shapeid => surface.Target.Shapes.ItemFromID16[(short)shapeid]));

            this.cache_section_info(shapes);
            var            srcstream     = this._build_sidsrc_stream(shapeids);
            const object[] unitcodes     = null;
            var            results       = surface.GetResults <string>(srcstream, unitcodes);
            var            formulas      = surface.GetFormulasU(srcstream);
            var            combined_data = CellData.Combine(formulas, results);

            var seg_builder = new VisioAutomation.Utilities.ArraySegmentReader <CellData>(combined_data);
            var r           = this._create_outputs_for_shapes(shapeids, _cache, seg_builder);

            return(r);
        }
예제 #4
0
        public QueryOutput <ShapeSheet.CellData> GetFormulasAndResults(ShapeSheetSurface surface)
        {
            RestrictToShapesOnly(surface);

            var shapes = new List <IVisio.Shape> {
                surface.Target.Shape
            };

            this.cache_section_info(shapes);
            var            srcstream     = this._build_src_stream();
            const object[] unitcodes     = null;
            var            formulas      = surface.GetFormulasU(srcstream);
            var            results       = surface.GetResults <string>(srcstream, unitcodes);
            var            combined_data = CellData.Combine(formulas, results);

            var shape_index      = 0;
            var sectioninfo      = this.GetSectionInfoForShape(shape_index, _cache);
            var seg_builder      = new VisioAutomation.Utilities.ArraySegmentReader <CellData>(combined_data);
            var output_for_shape = this._create_output_for_shape(surface.Target.ID16, sectioninfo, seg_builder);

            return(output_for_shape);
        }