Output formatting.

- NEU: Formatierung der Ausgabe mit Absatzvorlage.
This commit is contained in:
Daniel Kraus
2015-08-05 21:52:06 +02:00
parent d0bd7dd2a5
commit 2cefede3c0
5 changed files with 58 additions and 1 deletions

View File

@ -53,6 +53,12 @@ namespace zaaReloaded2.Formatter
/// </summary>
public bool HasBufferedText { get { return _buffer.Length > 0; } }
/// <summary>
/// Gets or sets the desired paragraph style when flushing into
/// a Document.
/// </summary>
public string ParagraphStyle { get; set; }
#endregion
#region Constructors
@ -113,7 +119,13 @@ namespace zaaReloaded2.Formatter
if (Document != null)
{
Document.Range().Text = _buffer.ToString();
Document.ActiveWindow.Selection.ClearCharacterDirectFormatting();
Document.ActiveWindow.Selection.ClearParagraphDirectFormatting();
if (!string.IsNullOrEmpty(ParagraphStyle))
{
Document.ActiveWindow.Selection.set_Style(ParagraphStyle);
}
Document.ActiveWindow.Selection.Range.Text = _buffer.ToString();
}
if (Parent != null)
{