Esempio n. 1
0
        protected override void Write(PPTXRenderer renderer, ListBlock listBlock)
        {
            renderer.PushBlockSetting(renderer.Options.List);

            renderer.StartTextArea();

            for (var i = 0; i < listBlock.Count; i++)
            {
                var item     = listBlock[i];
                var listItem = (ListItemBlock)item;

                renderer.AddTextRow(new PPTXText()
                {
                    Bullet = listBlock.IsOrdered ? PPTXBullet.Number : PPTXBullet.Circle
                });

                renderer.WriteChildren(listItem);

                renderer.WriteReturn();
            }

            renderer.EndTextArea();

            renderer.PopBlockSetting();
        }
Esempio n. 2
0
        protected override void Write(PPTXRenderer renderer, QuoteBlock obj)
        {
            renderer.PushBlockSetting(renderer.Options.QuoteBlock);

            renderer.StartTextArea();

            renderer.WriteChildren(obj);

            renderer.EndTextArea();

            renderer.PopBlockSetting();
        }
Esempio n. 3
0
        protected override void Write(PPTXRenderer renderer, CodeBlock obj)
        {
            renderer.PushBlockSetting(renderer.Options.Code);

            renderer.Write(" ");
            renderer.WriteReturn();
            renderer.WriteLeafRawLines(obj);
            renderer.WriteReturn();
            renderer.Write(" ");

            renderer.PopBlockSetting();

            renderer.EndTextArea();
        }
Esempio n. 4
0
        protected override void Write(PPTXRenderer renderer, ParagraphBlock obj)
        {
            if (obj.Parent is MarkdownDocument)
            {
                renderer.PushBlockSetting(renderer.Options.Normal);
            }

            renderer.WriteLeafInline(obj);

            if (obj.Parent is MarkdownDocument)
            {
                renderer.PopBlockSetting();
                renderer.EndTextArea();
            }
        }
        protected override void Write(PPTXRenderer renderer, LinkReferenceDefinition linkDef)
        {
            renderer.StartTextArea();
            renderer.Write('[');
            renderer.Write(linkDef.Label);
            renderer.Write("]: ");

            renderer.Write(linkDef.Url);

            if (linkDef.Title != null)
            {
                renderer.Write(" \"");
                renderer.Write(linkDef.Title.Replace("\"", "\\\""));
                renderer.Write('"');
            }
            renderer.EndTextArea();
        }
Esempio n. 6
0
        protected override void Write(PPTXRenderer renderer, HeadingBlock obj)
        {
            var _block = renderer.Options.Normal;

            switch (obj.Level)
            {
            case 1:
                _block = renderer.Options.Header1;
                break;

            case 2:
                _block = renderer.Options.Header2;
                break;
            }

            renderer.PushBlockSetting(_block);

            renderer.StartTextArea();

            renderer.WriteLeafInline(obj);
            renderer.PopBlockSetting();

            renderer.EndTextArea();
        }
 protected override void Write(PPTXRenderer renderer, LinkReferenceDefinitionGroup obj)
 {
     renderer.StartTextArea();
     renderer.WriteChildren(obj);
     renderer.EndTextArea();
 }