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:
parent
23da5f869d
commit
2490413441
@ -3248,22 +3248,7 @@ namespace Volian.Print.Library
|
|||||||
// Adjust the XOffset before determining if the table will overlap the RNO column RHM 20150529
|
// Adjust the XOffset before determining if the table will overlap the RNO column RHM 20150529
|
||||||
CalculateXOffsetGridOrFigure(itemInfo, maxRNO, formatInfo);
|
CalculateXOffsetGridOrFigure(itemInfo, maxRNO, formatInfo);
|
||||||
|
|
||||||
if (!itemInfo.IsInRNO && yoffRightParent > yoff && itemInfo.FormatStepData.Type.Contains("AER"))
|
yoff = AdjustLocIfLongerRNO(itemInfo, yoff, yoffRightParent);
|
||||||
{
|
|
||||||
// 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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// if the table does not have a border, only move down one line:
|
// if the table does not have a border, only move down one line:
|
||||||
float yoffForBorder = 2 * SixLinesPerInch;
|
float yoffForBorder = 2 * SixLinesPerInch;
|
||||||
if (MyFlexGrid.BorderStyle == C1.Win.C1FlexGrid.Util.BaseControls.BorderStyleEnum.None && !MyFlexGrid.TopRowHasBorder())
|
if (MyFlexGrid.BorderStyle == C1.Win.C1FlexGrid.Util.BaseControls.BorderStyleEnum.None && !MyFlexGrid.TopRowHasBorder())
|
||||||
@ -3321,6 +3306,7 @@ namespace Volian.Print.Library
|
|||||||
Width *= (h2/h1);
|
Width *= (h2/h1);
|
||||||
}
|
}
|
||||||
//yForCheckoff = yoff + Height - SixLinesPerInch;
|
//yForCheckoff = yoff + Height - SixLinesPerInch;
|
||||||
|
yoff = AdjustLocIfLongerRNO(itemInfo, yoff, yoffRightParent);
|
||||||
if (dropCheckoff)
|
if (dropCheckoff)
|
||||||
yForCheckoff += Height - SixLinesPerInch; // place checkoff on last row of text
|
yForCheckoff += Height - SixLinesPerInch; // place checkoff on last row of text
|
||||||
bool noborder = MyItemInfo.FormatStepData.Type.ToUpper().Contains("BORDERLESS");
|
bool noborder = MyItemInfo.FormatStepData.Type.ToUpper().Contains("BORDERLESS");
|
||||||
@ -3739,6 +3725,27 @@ namespace Volian.Print.Library
|
|||||||
if (XOffsetCenter != null) XOffset = (float)XOffsetCenter;
|
if (XOffsetCenter != null) XOffset = (float)XOffsetCenter;
|
||||||
ProfileTimer.Pop(profileDepth);
|
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)
|
private float FindMinXOffsetRno(vlnParagraph parRno)
|
||||||
{
|
{
|
||||||
// Find the minimum xoffset in the rno column that overlaps in the y direction with
|
// Find the minimum xoffset in the rno column that overlaps in the y direction with
|
||||||
|
Loading…
x
Reference in New Issue
Block a user