diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index a87b2de3..ac607cbd 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -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(@"{!");