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(); }
protected override void Write(PPTXRenderer renderer, QuoteBlock obj) { renderer.PushBlockSetting(renderer.Options.QuoteBlock); renderer.StartTextArea(); renderer.WriteChildren(obj); renderer.EndTextArea(); renderer.PopBlockSetting(); }
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(); }
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(); }