예제 #1
0
        public CellQueryOutput <string> GetFormulas(SurfaceTarget surface)
        {
            RestrictToShapesOnly(surface);

            var srcstream        = this._build_src_stream();
            var values           = surface.GetFormulasU(srcstream);
            var seg_builder      = new VisioAutomation.Utilities.ArraySegmentReader <string>(values);
            var output_for_shape = this._create_output_for_shape(surface.ID16, seg_builder);

            return(output_for_shape);
        }
예제 #2
0
        public SectionQueryResults <string> GetFormulas(SurfaceTarget surface, ShapeIDPairs shapeidpairs)
        {
            // Store information about the sections we need to query
            var cache = _create_sectionquerycache(shapeidpairs);

            // Perform the query
            var srcstream = this._build_sidsrc_stream(shapeidpairs, cache);
            var values    = surface.GetFormulasU(srcstream);
            var reader    = new VASS.Internal.ArraySegmentReader <string>(values);
            var results   = this._create_outputs_for_shapes(shapeidpairs, cache, reader);

            return(results);
        }
예제 #3
0
        public CellQueryOutputList <string> GetFormulas(SurfaceTarget surface, IList <int> shapeids)
        {
            var shapes = new List <Microsoft.Office.Interop.Visio.Shape>(shapeids.Count);

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

            var srcstream   = this._build_sidsrc_stream(shapeids);
            var values      = surface.GetFormulasU(srcstream);
            var seg_builder = new VisioAutomation.Utilities.ArraySegmentReader <string>(values);
            var list        = this._create_outputs_for_shapes(shapeids, seg_builder);

            return(list);
        }
예제 #4
0
        public CellQueryResults <string> GetFormulas(SurfaceTarget surface, IList <int> shapeids)
        {
            var srcstream = this._build_sidsrc_stream(shapeids);
            var values    = surface.GetFormulasU(srcstream);
            var reader    = new Internal.ArraySegmentReader <string>(values);
            var rows      = this._shapesid_to_rows(shapeids, reader);

            var cellqueryresults = new CellQueryResults <string>(rows.Count);

            cellqueryresults.AddRange(rows);

            return(cellqueryresults);
        }
예제 #5
0
        public CellQueryResults <string> GetFormulas(SurfaceTarget surface)
        {
            _restrict_to_shapes_only(surface);

            var srcstream = this._build_src_stream();
            var values    = surface.GetFormulasU(srcstream);
            var reader    = new Internal.ArraySegmentReader <string>(values);
            var row       = this._shapedata_to_row(surface.ID16, reader);

            var cellqueryresults = new CellQueryResults <string>(1);

            cellqueryresults.Add(row);

            return(cellqueryresults);
        }
예제 #6
0
        public SectionQueryShapeResults <string> GetFormulas(SurfaceTarget surface)
        {
            _RestrictToShapesOnly(surface);

            var shapeidpairs = ShapeIDPairs.FromShapes(surface.Shape);
            var cache        = this._create_sectionquerycache(shapeidpairs);

            var srcstream        = this._build_src_stream(cache);
            var values           = surface.GetFormulasU(srcstream);
            var shape_index      = 0;
            var shape_cache_item = cache[shape_index];
            var reader           = new VASS.Internal.ArraySegmentReader <string>(values);
            var output_for_shape = this._create_output_for_shape(surface.ID16, shape_cache_item, reader);

            return(output_for_shape);
        }
예제 #7
0
        public SectionsQueryOutput <string> GetFormulas(SurfaceTarget surface)
        {
            RestrictToShapesOnly(surface);

            var shapes = new List <Microsoft.Office.Interop.Visio.Shape> {
                surface.Shape
            };

            this.cache_section_info(shapes);
            var srcstream        = this._build_src_stream();
            var values           = surface.GetFormulasU(srcstream);
            var shape_index      = 0;
            var sectioninfo      = this.GetSectionInfoForShape(shape_index, _cache);
            var seg_builder      = new VisioAutomation.Utilities.ArraySegmentReader <string>(values);
            var output_for_shape = this._create_output_for_shape(surface.ID16, sectioninfo, seg_builder);

            return(output_for_shape);
        }