Keep pagination code from going into an infinite loop.
Properly handle a Null WidthOverride. Properly handle a note or caution on a section. Remove returns from lists of data points.
This commit is contained in:
parent
8a6e1c1996
commit
768890116c
@ -378,6 +378,7 @@ namespace Volian.Print.Library
|
||||
while (((YSize - yTop) > ySpaceOnCurPage) || PageBreakOnStepList.Count > 0)
|
||||
{
|
||||
ySpaceOnCurPage -= myBottomMsgSpace;
|
||||
vlnParagraph lastBreak = paraBreak;
|
||||
paraBreak = FindPageBreak(yStart, ySpaceOnCurPage, yLowerLimit, myList, paraBreak, yPageSize - (myTopMsgSpace + SixLinesPerInch) - myBottomMsgSpace);
|
||||
if (paraBreak == null)
|
||||
{
|
||||
@ -385,6 +386,10 @@ namespace Volian.Print.Library
|
||||
, MyItemInfo.ItemID, MyItemInfo.MyDocVersion.MyFolder.Name, MyItemInfo.ShortPath);
|
||||
break;
|
||||
}
|
||||
if (lastBreak == paraBreak)
|
||||
{
|
||||
throw (new Exception(string.Format("Pagination Infinite Loop {0}",lastBreak.MyItemInfo.ShortPath)));
|
||||
}
|
||||
//paraBreak.ShowPageBreak(999, paraBreak.MyItemInfo.ShortPath, "Yes",paraBreak.YTop, paraBreak.YSize, paraBreak.Height, false);
|
||||
//_MyLog.InfoFormat("Place to break\r\n==>'Place to Break',{0},'{1}','{2}'"
|
||||
//, paraBreak.MyItemInfo.ItemID, paraBreak.MyItemInfo.MyDocVersion.MyFolder.Name, paraBreak.MyItemInfo.ShortPath);
|
||||
@ -443,6 +448,7 @@ namespace Volian.Print.Library
|
||||
&& myPara.ChildrenRight[0].YSize <= fullPage && myPara.ChildrenRight[0].YSize > spaceOnPage)
|
||||
{
|
||||
//_MyLog.WarnFormat("\r\nMyParaBreak {0},{1},{2},{3},{4}", myPara, myPara.YSize, yUpperLimit, myPara.ChildrenRight[0].YSize, spaceOnPage);
|
||||
if(myPara != lastBreak)
|
||||
return myPara;
|
||||
}
|
||||
// The following lines were added for Comanche Peak ECA-0.1A.SProcedure Steps.S17 (Printed as Step 12)
|
||||
|
@ -2823,7 +2823,8 @@ namespace Volian.Print.Library
|
||||
if (itemInfo.IsStep && itemInfo.MyHLS != null && UseTemplateWidthOrXOff(itemInfo) && (xwid = GetWidthOrStartFromTemplate(itemInfo, formatInfo, true)) > 0)
|
||||
widOvrd = xwid;
|
||||
else
|
||||
widOvrd = itemInfo.FormatStepData == null ? null : (float?)ToInt(itemInfo.FormatStepData.WidthOverride, maxRNO);
|
||||
widOvrd = itemInfo.FormatStepData == null ? null : itemInfo.FormatStepData.WidthOverride == null ? null :
|
||||
(float?)ToInt(itemInfo.FormatStepData.WidthOverride, maxRNO);
|
||||
//widOvrd = itemInfo.FormatStepData == null ? null : itemInfo.FormatStepData.WidthOverride;
|
||||
// Don't adjust the RNO width if in single column mode:
|
||||
if (itemInfo.IsRNOPart && itemInfo.MyParent.IsHigh && itemInfo.MyActiveSection.ColumnMode != 0 && itemInfo.ActiveFormat.MyStepSectionLayoutData.RNOWidthAlt != null)
|
||||
@ -2960,6 +2961,7 @@ namespace Volian.Print.Library
|
||||
private bool UseTemplateWidthOrXOff(ItemInfo itemInfo)
|
||||
{
|
||||
if (!itemInfo.IsStep) return false;
|
||||
if (itemInfo.MyHLS == null) return false;
|
||||
if (itemInfo.MyHLS.FormatStepData.UseSmartTemplate) return false;
|
||||
if (!itemInfo.MyDocStyle.ComponentList) return false;
|
||||
if (itemInfo.MyHLS.FormatStepData.UseOldTemplate)
|
||||
@ -3036,7 +3038,8 @@ namespace Volian.Print.Library
|
||||
/// </summary>
|
||||
public class StepLevelList : SortedDictionary<int, SortedDictionary<float, vlnParagraph>>
|
||||
{
|
||||
public StepLevelList() : base()
|
||||
public StepLevelList()
|
||||
: base()
|
||||
{
|
||||
}
|
||||
public void Add(int stepLevel, float yLocation, vlnParagraph para)
|
||||
|
@ -499,6 +499,7 @@ namespace XYPlots
|
||||
Buff = Buff.Substring(0, Buff.Length - 2) + " \r\n\0x00"; // needs to end with null
|
||||
else if (Buff.EndsWith(">")) // doesn't end with return chars...
|
||||
Buff = Buff.Substring(0, Buff.Length - 1) + " \r\n\0x00"; // needs to end with null
|
||||
Buff = Regex.Replace(Buff, @"([0-9])\r\n([0-9])", "$1 $2");
|
||||
}
|
||||
private void CloseGraph()
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user