Output formatting.
- NEU: Formatierung der Ausgabe mit Absatzvorlage.
This commit is contained in:
@ -145,6 +145,8 @@ namespace zaaReloaded2.Formatter
|
||||
current++;
|
||||
}
|
||||
}
|
||||
CreateParagraphStyle();
|
||||
_secondaryBuffer.ParagraphStyle = zaaReloaded2.Properties.Settings.Default.ParagraphStyleName;
|
||||
_secondaryBuffer.Flush();
|
||||
}
|
||||
|
||||
@ -206,6 +208,34 @@ namespace zaaReloaded2.Formatter
|
||||
ProcessAllTimePoints(controlElement.FormatElements);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a zaaReloaded2 paragraph style in the document.
|
||||
/// </summary>
|
||||
public void CreateParagraphStyle()
|
||||
{
|
||||
if (Document != null)
|
||||
{
|
||||
Style style;
|
||||
// Don't see a better way to check for the existence of a particular
|
||||
// paragraph style than by using a try...catch construction.
|
||||
try
|
||||
{
|
||||
style = Document.Styles[Properties.Settings.Default.ParagraphStyleName];
|
||||
}
|
||||
catch
|
||||
{
|
||||
style = Document.Styles.Add(Properties.Settings.Default.ParagraphStyleName);
|
||||
style.Font.Size = 10; // pt
|
||||
style.Font.Bold = 0;
|
||||
style.Font.Italic = 0;
|
||||
style.Font.Underline = 0;
|
||||
style.ParagraphFormat.LeftIndent = 36; // pt
|
||||
style.ParagraphFormat.FirstLineIndent = -36; // pt
|
||||
style.ParagraphFormat.Alignment = WdParagraphAlignment.wdAlignParagraphJustify;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Protected methods
|
||||
|
Reference in New Issue
Block a user