From 702980a0e44d874ffb615cebc66032f66e82cbbd Mon Sep 17 00:00:00 2001 From: Kathy Date: Tue, 20 Aug 2013 11:14:41 +0000 Subject: [PATCH] Improved calculation to determine if word section is portrait or landscape, based on docstyle's pagelength, topmargin & pagewidth --- PROMS/DataLoader/Sections.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/PROMS/DataLoader/Sections.cs b/PROMS/DataLoader/Sections.cs index 7bcb9b9e..cc04a631 100644 --- a/PROMS/DataLoader/Sections.cs +++ b/PROMS/DataLoader/Sections.cs @@ -54,7 +54,11 @@ namespace DataLoader //int docstyleindx = GetDocStyleIndx(dstyleindx, format, procitem, docver,Number,Title); int docstyleindx = GetDocStyleIndx(dstyleindx, format, procitem, Number, Title); DocStyle myDocStyle = format.PlantFormat.DocStyles.DocStyleList[docstyleindx]; - bool isLandscape = myDocStyle.Layout.PageWidth > myDocStyle.Layout.PageLength; + + // Originally there was no determination as to whether to set landscape mode. Code was added on + // 6/11/13 to compare the PageWidth & PageLength. This code was incorrectly setting some of the + // word documents to landscape (FNP cover pages). Adding in the topmargin fixed this. + bool isLandscape = myDocStyle.Layout.PageWidth > (myDocStyle.Layout.TopMargin + myDocStyle.Layout.PageLength); // Adjust the section number. The 16bit vfw code was sometimes printing section numbers // differently than what was stored as data. For example VEWCNOFN: OFN MA-001, the section // number was '1.' and 16bit printed it as '1.0'. The flag that caused this was (surprisingly),