B2018-096 AEP 082.002CD Note Box overlapping Step Box
This commit is contained in:
parent
3cfe32d02d
commit
9cbbd3e9de
@ -75,7 +75,21 @@ namespace Volian.Print.Library
|
||||
const string BoxAsteriskTopBottom = "*.*.*. . . .*.*. .*. . "; // fnp
|
||||
const string BoxLineTopBottom = "\x2500.\x2500.\x2500. . . .\x2500.\x2500. .\x2500. . "; // fnp
|
||||
const string BoxAsteriskTopBotton2 = " .*. . . . . . . .*. . "; // Robinson (CPL)
|
||||
|
||||
public vlnBox MyParentBox
|
||||
{
|
||||
get
|
||||
{
|
||||
// B2018-096 AEP 082.002CD Note Box overlapping Step Box
|
||||
vlnParagraph parent = MyParent.MyParent;
|
||||
if(parent == null) return null;
|
||||
if (!parent.MyItemInfo.FormatStepData.BoxIt) return null;
|
||||
if (parent.PartsContainer == null) return null;
|
||||
foreach(vlnPrintObject obj in parent.PartsContainer)
|
||||
if (obj is vlnBox)
|
||||
return(obj as vlnBox);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
public override float ToPdf(PdfContentByte cb, float yPageStart, ref float yTopMargin, ref float yBottomMargin)
|
||||
{
|
||||
if (MyBox == null) return yPageStart;
|
||||
@ -93,6 +107,8 @@ namespace Volian.Print.Library
|
||||
myBoxLeftAdj = float.Parse(MyParent.MyItemInfo.ActiveFormat.MyStepSectionLayoutData.BoxLeftAdj);
|
||||
left += myBoxLeftAdj;
|
||||
float right = (float)MyParent.MyItemInfo.MyDocStyle.Layout.LeftMargin + (float)(MyBox.End ?? DefEnd);
|
||||
if (MyParentBox != null)// B2018-096 AEP 082.002CD Note Box overlapping Step Box
|
||||
right = (float)MyParent.MyItemInfo.MyDocStyle.Layout.LeftMargin + MyParentBox.DefEnd - SixLinesPerInch/2;
|
||||
right += myBoxLeftAdj;
|
||||
iTextSharp.text.Color boxColor = new iTextSharp.text.Color(PrintOverride.OverrideBoxColor(System.Drawing.Color.Black));
|
||||
cb.SetColorStroke(boxColor);
|
||||
|
@ -5330,8 +5330,8 @@ namespace Volian.Print.Library
|
||||
// else
|
||||
// xoff = XOffset;
|
||||
//}
|
||||
|
||||
vlnHeader myHeader = new vlnHeader(this, cb, itemInfo.MyHeader.Text, itemInfo.MyHeader.CleanText.TrimStart(" ".ToCharArray()), xoff + _MyBoxLeftAdj, YOffset, itemInfo.MyHeader.MyFont);
|
||||
// B2018-096 AEP 082.002CD Note Box overlapping Step Box
|
||||
vlnHeader myHeader = new vlnHeader(this, cb, itemInfo.MyHeader.Text, itemInfo.MyHeader.CleanText.TrimStart(" ".ToCharArray()), xoff + AdjustHeader + _MyBoxLeftAdj, YOffset, itemInfo.MyHeader.MyFont);
|
||||
PartsAbove.Add(myHeader);
|
||||
//return myHeader.Height + (!MyItemInfo.MyDocStyle.SpecialStepsFoldout || (MyItemInfo.MyDocStyle.ExtraLineHeader && (MyItemInfo.IsCaution || MyItemInfo.IsNote)) ? SixLinesPerInch : 0);
|
||||
// Only use SpaceIn property for Cautions or Notes
|
||||
@ -6028,6 +6028,12 @@ namespace Volian.Print.Library
|
||||
get { return _CheckOffWidth; }
|
||||
set { _CheckOffWidth = value; }
|
||||
}
|
||||
private float _AdjustHeader = 0;// B2018-096 AEP 082.002CD Note Box overlapping Step Box
|
||||
public float AdjustHeader
|
||||
{
|
||||
get { return _AdjustHeader; }
|
||||
set { _AdjustHeader = value; }
|
||||
}
|
||||
public void AdjustWidth(ItemInfo itemInfo, int maxRNO, FormatInfo formatInfo, vlnTab myTab)
|
||||
{
|
||||
int? bxIndx = itemInfo.IsStep ? itemInfo.FormatStepData.StepLayoutData.STBoxindex : null;
|
||||
@ -6154,7 +6160,12 @@ namespace Volian.Print.Library
|
||||
Width = (float)formatInfo.MyStepSectionLayoutData.WidT - tabWidth;
|
||||
}
|
||||
else
|
||||
Width = _WidthAdjustBox + (float)bx.TxtWidth - tabWidth; // add 1 to get it to wrap like 16Bit
|
||||
{
|
||||
float oldWidth = _WidthAdjustBox + (float)bx.TxtWidth - tabWidth; // add 1 to get it to wrap like 16Bit
|
||||
// B2018-096 AEP 082.002CD Note Box overlapping Step Box
|
||||
Width = Math.Min(MyParent.Width + MyParent.XOffset - XOffset, oldWidth);
|
||||
AdjustHeader = (Width - oldWidth)/2;
|
||||
}
|
||||
}
|
||||
else if ((itemInfo.IsCaution || itemInfo.IsNote) && !itemInfo.FormatStepData.UseOldTemplate)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user