This commit is contained in:
Kathy Ruffing 2012-10-26 10:30:47 +00:00
parent 84cc475d90
commit 85971ff103

View File

@ -60,6 +60,9 @@ namespace Volian.Print.Library
} }
float mySize = YSize * MyPageHelper.YMultiplier; float mySize = YSize * MyPageHelper.YMultiplier;
vlnParagraph firstChild = ChildrenBelow.Count > 0 ? ChildrenBelow[0] : null; vlnParagraph firstChild = ChildrenBelow.Count > 0 ? ChildrenBelow[0] : null;
// 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];
float ySizeIncludingFirst = firstChild == null ? YSize : firstChild.YSize + (firstChild.YTopMost - YTopMost); float ySizeIncludingFirst = firstChild == null ? YSize : firstChild.YSize + (firstChild.YTopMost - YTopMost);
bool KeepStepsOnPage = MyItemInfo.ActiveFormat.MyStepSectionLayoutData.KeepStepsOnPage; bool KeepStepsOnPage = MyItemInfo.ActiveFormat.MyStepSectionLayoutData.KeepStepsOnPage;
if (MyItemInfo.IsStepSection) if (MyItemInfo.IsStepSection)
@ -164,7 +167,7 @@ namespace Volian.Print.Library
//Console.WriteLine("'7LPI',{0},{1}", MyItemInfo.DBSequence, YSize); //Console.WriteLine("'7LPI',{0},{1}", MyItemInfo.DBSequence, YSize);
return 3; // High Level Step can fit at SevenLinesPerInch return 3; // High Level Step can fit at SevenLinesPerInch
} }
else // The entire step cannot fit on a blank page. else // The entire step cannot fit on a blank page or KeepStepsOnPage is true.
{ {
// if there is more than half a page left, then start to print on the current page // if there is more than half a page left, then start to print on the current page
float myFirstPieceSize = GetFirstPieceSize(); //Case 0 float myFirstPieceSize = GetFirstPieceSize(); //Case 0
@ -179,10 +182,11 @@ namespace Volian.Print.Library
ShowPageBreak(8, "First HLS has to split on current page", firstStep, YSize, yPageSize, yWithinMargins, ManualPageBreak); ShowPageBreak(8, "First HLS has to split on current page", firstStep, YSize, yPageSize, yWithinMargins, ManualPageBreak);
else else
ShowPageBreak(6, "HLS will have to split on current page", "Special", YSize, yPageSize, yWithinMargins, ManualPageBreak); ShowPageBreak(6, "HLS will have to split on current page", "Special", YSize, yPageSize, yWithinMargins, ManualPageBreak);
//BuildPageBreakList(yWithinMargins+SixLinesPerInch,yPageSize-2*SixLinesPerInch); // Determine items where page break(s) occur // if the HLS is part of a Smart Template (i.e. WCNCKL table), don't add in an extra line because
//BuildPageBreakList(yWithinMargins + SixLinesPerInch, yPageSize); // Case 5 - Determine items where page break(s) occur // that makes pagination work incorrectly because the Smart Template has a 'table' line after the
// Pagination Fix Break1LineShort3a // text.
BuildPageBreakList(yWithinMargins + SixLinesPerInch, yPageSize + yExtra2,KeepStepsOnPage); // Case 5 - Determine items where page break(s) occur BuildPageBreakList(yWithinMargins + SixLinesPerInch, yPageSize + yExtra2, KeepStepsOnPage); // Case 5 - Determine items where page break(s) occur
//BuildPageBreakList(yWithinMargins + (MyItemInfo.FormatStepData.UseSmartTemplate?0:SixLinesPerInch), yPageSize + yExtra2, KeepStepsOnPage); // Case 5 - Determine items where page break(s) occur
return 0; // Stay on this page return 0; // Stay on this page
} }