Fix table location in y direction if off aer substep where HLS has long RNO

This commit is contained in:
Kathy Ruffing 2013-12-18 16:43:27 +00:00
parent 65dd986027
commit 1510f4e3e9

View File

@ -1641,6 +1641,20 @@ namespace Volian.Print.Library
MyGrid = new vlnTable(myFlexGrid, cb);
Height = MyGrid.Height;
Width = MyGrid.Width;
if (!itemInfo.IsInRNO && yoffRightParent > yoff && itemInfo.FormatStepData.Type.Contains("AER"))
{
// is the width of this table going to cause the table to overlap the RNO
vlnParagraph parRno = FindParentRNO();
float xparRno = parRno.XOffset;
if (parRno.MyTab != null) xparRno = parRno.MyTab.XOffset;
if (XOffset + Width > xparRno)
{
yoff = yoffRightParent;
YOffset = yoff;
}
}
// if the table does not have a border, only move down one line:
float yoffForBorder = 2 * SixLinesPerInch;
if (myFlexGrid.BorderStyle == C1.Win.C1FlexGrid.Util.BaseControls.BorderStyleEnum.None && !myFlexGrid.TopRowHasBorder())
@ -1860,6 +1874,7 @@ namespace Volian.Print.Library
yoffadj = -SixLinesPerInch;
}
if (yOffRight < yoffRightParent) yOffRight = yoffRightParent;
bool rightLonger = yOffRight > yoff;
if (!aerTableOrFigure && itemInfo.RNOLevel == 0) // Centered Table
yoff = ChildrenBelow.Add(cb, itemInfo.Tables, XOffset, rightLonger ? yOffRight : yoff + yoffadj, yOffRight + yoffadj, rnoLevel, maxRNO, formatInfo);
@ -1911,6 +1926,12 @@ namespace Volian.Print.Library
if (savCheckListBottomMost != 0) YBottomMost = Math.Max(savCheckListBottomMost, YBottomMost);
}
private vlnParagraph FindParentRNO()
{
if (ChildrenRight != null && ChildrenRight.Count > 0) return ChildrenRight[0];
return MyParent.FindParentRNO();
}
private string GetMacroName(string str)
{
int mindx = str.IndexOf(@"{!");