NSPIFG support

NSPIFG2 missing genmac
NSP IFG improvements
This commit is contained in:
2013-07-17 13:09:04 +00:00
parent 60fc6bbd18
commit 15efb46dd3
7 changed files with 61 additions and 18 deletions

View File

@@ -42,6 +42,17 @@ namespace Volian.Print.Library
// procedure in questions was VEWCNEMG\EMGAPP.PRC, ES-01, Step 8.
bool ManualPageBreak = false;
float yEndMsg = !MyItemInfo.IsSection && MyItemInfo.MyHLS.NextItem == null && (MyItemInfo.MyDocStyle.End.Message ?? "") != "" ? 2 * SixLinesPerInch : 0;
// The following code is to fix a pagination issue in SHE. It was decided to not put it into development
// because some of the pagination logic may be redesigned. Without this fix, some pages had a page break
// before they should. I did not want to lose this code, in case at some point we want to revisit this.
// if doing an end message & we already are ending with a blank line, add one line for the end message
// otherwise, we need to add two lines, i.e. ((2 * SixLinesPerInch) - yEndsWithBlankLine)
// this change was necessary to fix a pagination problem in Shearon Harris, EOPs, User Guide, Attachment 2.
//float yEndsWithBlankLine = AdjustForBlankLines();
//KBR debug: if (yEndsWithBlankLine != 0) Console.WriteLine("*** yEndsWithBlankLine = {0}", yEndsWithBlankLine);
//float yEndMsg = !MyItemInfo.IsSection && MyItemInfo.MyHLS.NextItem == null && (MyItemInfo.MyDocStyle.End.Message ?? "") != "" ? ((2 * SixLinesPerInch) - yEndsWithBlankLine) : 0;
float yWithinMargins = CalculateYLocation(yLocation, yTopMargin) - yBottomMargin; // -SixLinesPerInch;
bool isFirstChild = MyItemInfo.MyPrevious == null;
bool nearTheTop = (yWithinMargins < yPageSize) && (yWithinMargins > (yPageSize - 5 * SixLinesPerInch));
@@ -64,7 +75,7 @@ namespace Volian.Print.Library
// Steps that have the smart template (the WCNCKL format for example), always include two children.
if (MyItemInfo.IsHigh && MyItemInfo.FormatStepData.UseSmartTemplate && ChildrenBelow.Count > 1)
firstChild = ChildrenBelow[1];
if (firstChild != null && !firstChild.MyItemInfo.IsNumbered) // If not numbered get the last child
if (firstChild != null && firstChild.MyItemInfo != null && !firstChild.MyItemInfo.IsNumbered) // If not numbered get the last child
firstChild = firstChild.MyParent.ChildrenBelow[firstChild.MyParent.ChildrenBelow.Count - 1];
float ySizeIncludingFirst = firstChild == null ? YSize : firstChild.YSize + (firstChild.YTopMost - YTopMost);
bool KeepStepsOnPage = MyItemInfo.ActiveFormat.MyStepSectionLayoutData.KeepStepsOnPage;
@@ -127,7 +138,7 @@ namespace Volian.Print.Library
return 0; // Don't Paginate (page break) on a Step Section if it's first thing on page
}
if (!MyItemInfo.IsHigh) return 0; // Don't Paginate on a Substep level
MyPageHelper.HLSText = MyItemInfo.DisplayText; // save the High Level Step Text
//MyPageHelper.HLSText = MyItemInfo.DisplayText; // save the High Level Step Text
//Console.WriteLine("{0} Paginate", MyPageHelper.HLSText);
StepConfig sc1 = MyItemInfo.MyConfig as StepConfig;
ManualPageBreak = MyPageHelper.OriginalPageBreak ? (sc1 == null ? false : sc1.Step_ManualPagebreak) :