Improved calculation to determine if word section is portrait or landscape, based on docstyle's pagelength, topmargin & pagewidth

This commit is contained in:
Kathy Ruffing 2013-08-20 11:14:41 +00:00
parent 78cf6ccdfd
commit 702980a0e4

View File

@ -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),