Exemplo n.º 1
0
        public static List <TextFormat> GetFormat(IVisio.Page page, IList <int> shapeids)
        {
            var charcells      = CharacterCells.GetCells(page, shapeids);
            var paracells      = ParagraphCells.GetCells(page, shapeids);
            var textblockcells = TextBlockCells.GetCells(page, shapeids);
            var page_shapes    = page.Shapes;
            var formats        = new List <TextFormat>(shapeids.Count);

            for (int i = 0; i < shapeids.Count; i++)
            {
                var format = new TextFormat();
                format.CharacterFormats = charcells[i];
                format.ParagraphFormats = paracells[i];
                format.TextBlock        = textblockcells[i];
                formats.Add(format);

                var shape = page_shapes.ItemFromID[shapeids[i]];
                format.CharacterTextRuns = TextFormat.GetTextRuns(shape, IVisio.VisRunTypes.visCharPropRow, true);
                format.ParagraphTextRuns = TextFormat.GetTextRuns(shape, IVisio.VisRunTypes.visParaPropRow, true);

                format.TabStops = TextHelper.GetTabStops(shape);
            }

            return(formats);
        }
Exemplo n.º 2
0
        public static TextFormat GetFormat(IVisio.Shape shape)
        {
            var cells = new TextFormat();

            cells.CharacterFormats  = CharacterCells.GetCells(shape);
            cells.ParagraphFormats  = ParagraphCells.GetCells(shape);
            cells.TextBlock         = TextBlockCells.GetCells(shape);
            cells.CharacterTextRuns = TextFormat.GetTextRuns(shape, IVisio.VisRunTypes.visCharPropRow, true);
            cells.ParagraphTextRuns = TextFormat.GetTextRuns(shape, IVisio.VisRunTypes.visParaPropRow, true);
            cells.TabStops          = TextFormat.GetTabStops(shape);
            return(cells);
        }
Exemplo n.º 3
0
            public ParagraphCells GetCells(VA.ShapeSheet.CellData <double>[] row)
            {
                var cells = new ParagraphCells();

                cells.IndentFirst        = row[IndentFirst.Ordinal];
                cells.IndentLeft         = row[IndentLeft.Ordinal];
                cells.IndentRight        = row[IndentRight.Ordinal];
                cells.SpacingAfter       = row[SpaceAfter.Ordinal];
                cells.SpacingBefore      = row[SpaceBefore.Ordinal];
                cells.SpacingLine        = row[SpaceLine.Ordinal];
                cells.HorizontalAlign    = row[HorzAlign.Ordinal].ToInt();
                cells.Bullet             = row[Bullet.Ordinal].ToInt();
                cells.BulletFont         = row[BulletFont.Ordinal].ToInt();
                cells.BulletFontSize     = row[BulletFontSize.Ordinal].ToInt();
                cells.LocBulletFont      = row[LocalizeBulletFont.Ordinal].ToInt();
                cells.TextPosAfterBullet = row[TextPosAfterBullet.Ordinal];
                cells.Flags        = row[Flags.Ordinal].ToInt();
                cells.BulletString = ""; // TODO: Figure out some way of getting this

                return(cells);
            }
            public ParagraphCells GetCells(VA.ShapeSheet.CellData<double>[] row)
            {
                var cells = new ParagraphCells();
                cells.IndentFirst = row[IndentFirst.Ordinal];
                cells.IndentLeft = row[IndentLeft.Ordinal];
                cells.IndentRight = row[IndentRight.Ordinal];
                cells.SpacingAfter = row[SpaceAfter.Ordinal];
                cells.SpacingBefore = row[SpaceBefore.Ordinal];
                cells.SpacingLine = row[SpaceLine.Ordinal];
                cells.HorizontalAlign = row[HorzAlign.Ordinal].ToInt();
                cells.Bullet = row[Bullet.Ordinal].ToInt();
                cells.BulletFont = row[BulletFont.Ordinal].ToInt();
                cells.BulletFontSize = row[BulletFontSize.Ordinal].ToInt();
                cells.LocBulletFont = row[LocalizeBulletFont.Ordinal].ToInt();
                cells.TextPosAfterBullet = row[TextPosAfterBullet.Ordinal];
                cells.Flags = row[Flags.Ordinal].ToInt();
                cells.BulletString = ""; // TODO: Figure out some way of getting this

                return cells;
            }