This commit is contained in:
Kathy Ruffing 2010-12-07 12:55:17 +00:00
parent a21c2a7fd9
commit 9042c66a69

View File

@ -109,7 +109,7 @@ namespace Volian.Print.Library
Processed = true;
if (_PartsAbove != null && _PartsAbove.Count > 0) yPageStart = PartsAbove.ToPdf(cb, yPageStart, yTopMargin, yBottomMargin);
float yLocation = CalculateYOffset(yPageStart, yTopMargin);
if (MyItemInfo.HasChangeBar()) MyPageHelper.AddChangeBar(DoChangeBar(cb, MyItemInfo, MyPageHelper, XOffset, yLocation, MyPageHelper.MaxRNO, MyItemInfo.ActiveFormat), cbMess);
if (MyItemInfo.HasChangeBar) MyPageHelper.AddChangeBar(DoChangeBar(cb, MyItemInfo, MyPageHelper, XOffset, yLocation, MyPageHelper.MaxRNO, MyItemInfo.ActiveFormat), cbMess);
float retval = yLocation;
if (MyItemInfo.IsFigure)
@ -501,6 +501,13 @@ namespace Volian.Print.Library
return bottom;
}
}
public float YBottomText
{
get
{
return YOffset + Height;
}
}
private vlnParagraph GetFirstPieceLastPart()
{
vlnParagraph para = this;
@ -789,16 +796,42 @@ namespace Volian.Print.Library
string tmpRnoSepStr = formatInfo.MyStepSectionPrintData.RNOSepString;
if (rnoLevel < maxRNO && itemInfo.RNOs != null && tmpRnoSepStr != null)
{
float xsep = MyHighLevelParagraph.XOffset + RnoOffset;
vlnRNOSeparator myRnoSep = new vlnRNOSeparator(this, cb, tmpRnoSepStr, xsep, yoff, formatInfo.PlantFormat.FormatData.Font);
vlnParagraph rno = ChildrenRight[0];
vlnParagraph bottomChild = BottomChild;
float xsep = MyHighLevelParagraph.XOffset + RnoOffset;
vlnRNOSeparator myRnoSep = new vlnRNOSeparator(this, cb, tmpRnoSepStr, xsep, yoff, formatInfo, bottomChild==null?true:bottomChild.MyItemInfo.HasChangeBar);
// TODO: May need to handle more than one RNO column for RNO Separator
rno.LastRNO.PartsBelow.Add(myRnoSep);
if (rno.LastRNO.MyItemInfo.HasChangeBar == false && bottomChild != null && bottomChild.MyItemInfo.HasChangeBar)
bottomChild.PartsBelow.Add(myRnoSep);
else
rno.LastRNO.PartsBelow.Add(myRnoSep);
yoff += myRnoSep.Height + SixLinesPerInch;
}
YBottomMost = yoff;
}
internal vlnParagraph BottomChild
{
get
{
float bottomChildYBottomText = YBottomText;
vlnParagraph bottomChild = this;
foreach (vlnParagraph child in ChildrenRight)
{
vlnParagraph grandChild = child.BottomChild;
if (grandChild != null && grandChild.YBottomText > bottomChildYBottomText) bottomChild = grandChild;
if (grandChild != null && grandChild.YBottomText == bottomChildYBottomText && grandChild.MyItemInfo.HasChangeBar) bottomChild = grandChild;
bottomChildYBottomText = bottomChild.YBottomText;
}
foreach (vlnParagraph child in ChildrenBelow)
{
vlnParagraph grandChild = child.BottomChild;
if (grandChild != null && grandChild.YBottomText > bottomChildYBottomText) bottomChild = grandChild;
if (grandChild != null && grandChild.YBottomText == bottomChildYBottomText && grandChild.MyItemInfo.HasChangeBar) bottomChild = grandChild;
bottomChildYBottomText = bottomChild.YBottomText;
}
return bottomChild;
}
}
private void CalculateXOffset(ItemInfo itemInfo, int maxRNO, FormatInfo formatInfo)
{
bool aerTableOrFigure = itemInfo.FormatStepData.Type.Contains("AER");