From f0bb7a73c2eaededdf4d4842b1132627a6a0a3fc Mon Sep 17 00:00:00 2001 From: John Date: Tue, 12 Mar 2013 17:47:22 +0000 Subject: [PATCH] =?UTF-8?q?Backed=20out=20(for=20now)=20the=20fix=20to=20i?= =?UTF-8?q?nitialize=20MS=20Word=20sections=20if=20the=20document=20style?= =?UTF-8?q?=20=20didn=E2=80=99t=20specify=20a=20font.-=20because=20it=20ca?= =?UTF-8?q?used=20problems=20with=20Westinghouse=20data?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PROMS/Volian.Controls.Library/DSOTabPanel.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/PROMS/Volian.Controls.Library/DSOTabPanel.cs b/PROMS/Volian.Controls.Library/DSOTabPanel.cs index de778d60..29c576bb 100644 --- a/PROMS/Volian.Controls.Library/DSOTabPanel.cs +++ b/PROMS/Volian.Controls.Library/DSOTabPanel.cs @@ -220,8 +220,12 @@ namespace Volian.Controls.Library if (MyDocumentInfo.Config == null || MyDocumentInfo.Config == "") { DocStyle ds = MyDocumentInfo.DocumentEntries[0].MyContent.ContentItems[0].MyDocStyle; - 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; + // this will cause an error and goto the Catch if the family or size is null, + // Westinghouse needs it to to this - at least for now + //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.Font.Name = ds.Font.Family; + 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;