Exemple #1
0
        private static void AddTextElementToParagraph(
            ParagraphElement paragraph,
            string text,
            TextElement.TextStyle currentStyle,
            bool insertSpaceBefore)
        {
            Contract.Requires(paragraph != null);
            Contract.Requires(text != null);
            TextElement newStyleChild = CreateTextElement(
                insertSpaceBefore ? ' ' + text : text,
                currentStyle);

            paragraph.AddChild(newStyleChild);
        }
Exemple #2
0
 private static TextElement CreateTextElement(string text, TextElement.TextStyle currentStyle)
 {
     Contract.Requires(text != null);
     return(new TextElement(text, currentStyle));
 }