B2015-219: for figures that extend into the RNO column, move below RNO if it extends past AER (in y-direction)

This commit is contained in:
Kathy Ruffing 2016-02-16 15:17:51 +00:00
parent 23da5f869d
commit 2490413441

View File

@ -3248,22 +3248,7 @@ namespace Volian.Print.Library
// Adjust the XOffset before determining if the table will overlap the RNO column RHM 20150529
CalculateXOffsetGridOrFigure(itemInfo, maxRNO, formatInfo);
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 xMinRno = FindMinXOffsetRno(parRno);
if (XOffset + Width > xMinRno - 12) // 12 = 2 characters, so that tables don't almost touch & look like an overlap
{
if ((float)MyItemInfo.MyDocStyle.Layout.LeftMargin + Width > xMinRno)
{
yoff = yoffRightParent;
YOffset = yoff;
}
else
XOffset = (float)MyItemInfo.MyDocStyle.Layout.LeftMargin;
}
}
yoff = AdjustLocIfLongerRNO(itemInfo, yoff, yoffRightParent);
// 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())
@ -3321,6 +3306,7 @@ namespace Volian.Print.Library
Width *= (h2/h1);
}
//yForCheckoff = yoff + Height - SixLinesPerInch;
yoff = AdjustLocIfLongerRNO(itemInfo, yoff, yoffRightParent);
if (dropCheckoff)
yForCheckoff += Height - SixLinesPerInch; // place checkoff on last row of text
bool noborder = MyItemInfo.FormatStepData.Type.ToUpper().Contains("BORDERLESS");
@ -3739,6 +3725,27 @@ namespace Volian.Print.Library
if (XOffsetCenter != null) XOffset = (float)XOffsetCenter;
ProfileTimer.Pop(profileDepth);
}
private float AdjustLocIfLongerRNO(ItemInfo itemInfo, float yoff, float yoffRightParent)
{
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 xMinRno = FindMinXOffsetRno(parRno);
if (XOffset + Width > xMinRno - 12) // 12 = 2 characters, so that tables don't almost touch & look like an overlap
{
if ((float)MyItemInfo.MyDocStyle.Layout.LeftMargin + Width > xMinRno)
{
yoff = yoffRightParent;
YOffset = yoff;
}
else
XOffset = (float)MyItemInfo.MyDocStyle.Layout.LeftMargin;
}
}
return yoff;
}
private float FindMinXOffsetRno(vlnParagraph parRno)
{
// Find the minimum xoffset in the rno column that overlaps in the y direction with