Fixed code to initialize MS Word sections if Document Style does not specify font.

Added code to handle refreshing the Edit Screen when a section is moved.
Added code to refresh the Edit Screen when a section is moved.
This commit is contained in:
Rich
2013-03-12 15:01:46 +00:00
parent 5588328899
commit e063da6198
3 changed files with 12 additions and 5 deletions

View File

@@ -220,8 +220,8 @@ namespace Volian.Controls.Library
if (MyDocumentInfo.Config == null || MyDocumentInfo.Config == "")
{
DocStyle ds = MyDocumentInfo.DocumentEntries[0].MyContent.ContentItems[0].MyDocStyle;
doc.Application.Selection.Font.Name = ds.Font.Family;
doc.Application.Selection.Font.Size = (float)ds.Font.Size;
if (ds.Font.Family != null) doc.Application.Selection.Font.Name = ds.Font.Family;
if (ds.Font.Size != null) doc.Application.Selection.Font.Size = (float)ds.Font.Size;
doc.Application.Selection.ParagraphFormat.SpaceBefore = 0;
doc.Application.Selection.ParagraphFormat.SpaceAfter = 0;
doc.Application.Selection.ParagraphFormat.LineSpacingRule = LBWdLineSpacing.wdLineSpaceExactly;