|
|
|
@@ -129,7 +129,6 @@ namespace Volian.Print.Library
|
|
|
|
|
// into the box code. Without this check, none of the box code is run. This caused a problem
|
|
|
|
|
// for VCS where two different type notes where not getting separate boxes.
|
|
|
|
|
bool doSeparateBoxHdrChg = false;
|
|
|
|
|
if (childItemInfo.ItemID == 50 || childItemInfo.ItemID == 53) Console.WriteLine("jcb");
|
|
|
|
|
if (childItemInfo.MyPrevious != null && childItemInfo.MyHeader != null && childItemInfo.MyPrevious.MyHeader != null
|
|
|
|
|
&& childItemInfo.MyHeader.CleanText != childItemInfo.MyPrevious.MyHeader.CleanText) doSeparateBoxHdrChg = true;
|
|
|
|
|
|
|
|
|
@@ -174,7 +173,7 @@ namespace Volian.Print.Library
|
|
|
|
|
box.Height = yoff - box.YOffset; // new height, with children
|
|
|
|
|
if (childItemInfo.MyHeader != null && childItemInfo.MyPrevious != null
|
|
|
|
|
&& ((childItemInfo.MyPrevious.IsCaution && childItemInfo.IsCaution) ||
|
|
|
|
|
(childItemInfo.MyPrevious.IsNote && childItemInfo.IsNote)))
|
|
|
|
|
(childItemInfo.MyPrevious.IsNote && childItemInfo.IsNote) || childItemInfo.FormatStepData.SeparateBox))
|
|
|
|
|
yoff += vlnPrintObject.SixLinesPerInch * 2;
|
|
|
|
|
}
|
|
|
|
|
box = new vlnBox();
|
|
|
|
@@ -208,7 +207,6 @@ namespace Volian.Print.Library
|
|
|
|
|
// if doing the component list (FNP), keep track of the bottom most columns' data
|
|
|
|
|
// so this can be returned after the row is done.
|
|
|
|
|
tableBottomMost = Math.Max(tableBottomMost, para.YBottomMost);
|
|
|
|
|
|
|
|
|
|
if (box != null && box.MyParent == null)
|
|
|
|
|
{
|
|
|
|
|
box.MyParent = para;
|
|
|
|
@@ -255,7 +253,6 @@ namespace Volian.Print.Library
|
|
|
|
|
// after the last child substep when doing a Component table row (FNP Component Lists), set the value
|
|
|
|
|
// of the yoff to be the bottom most line in the table.
|
|
|
|
|
if (didComponentTableRow) yoff = tableBottomMost;
|
|
|
|
|
|
|
|
|
|
return yoff;
|
|
|
|
|
}
|
|
|
|
|
public float ToPdf(PdfContentByte cb, float yPageStart, ref float yTopMargin, ref float yBottomMargin)
|
|
|
|
@@ -962,6 +959,8 @@ namespace Volian.Print.Library
|
|
|
|
|
yPageStart -= 2 * SixLinesPerInch;// Allow two lines for top continue message
|
|
|
|
|
if (myMsg.IndexOf(@"%d") > -1)
|
|
|
|
|
myMsg = myMsg.Replace(@"%d", MyItemInfo.MyHLS.MyTab.CleanTextNoSymbols.Trim(" .".ToCharArray()));
|
|
|
|
|
if (myMsg.IndexOf(@"%c") > -1)
|
|
|
|
|
myMsg = myMsg.Replace(@"%c", " ");
|
|
|
|
|
if (!PageBreakOnStep)
|
|
|
|
|
MyPageHelper.TopMessage = new vlnText(cb, this, myMsg, myMsg, docstyle.Layout.LeftMargin + XOffsetBox + docstyle.Continue.Top.Margin ?? 0, yTopMargin + 0.1F, docstyle.Continue.Top.Font);// MyItemInfo.ActiveFormat.PlantFormat.FormatData.Font);
|
|
|
|
|
else
|
|
|
|
@@ -1340,6 +1339,8 @@ namespace Volian.Print.Library
|
|
|
|
|
}
|
|
|
|
|
public vlnParagraph(vlnParagraph parent, PdfContentByte cb, ItemInfo itemInfo, float xoff, float yoff, int rnoLevel, int maxRNO, FormatInfo formatInfo, string prefix, string suffix, float yoffRightParent)
|
|
|
|
|
{
|
|
|
|
|
if (itemInfo.ActiveFormat.MyStepSectionLayoutData.BoxLeftAdj != null)
|
|
|
|
|
_MyBoxLeftAdj = float.Parse(itemInfo.ActiveFormat.MyStepSectionLayoutData.BoxLeftAdj);
|
|
|
|
|
ShowSectionTitles = formatInfo.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.ShowSectionTitles || itemInfo.MyDocStyle.ShowSectionTitles;
|
|
|
|
|
if (itemInfo.IsSection && itemInfo.ActiveSection.DisplayText.ToUpper().Contains("<NO TITLE>") && !itemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.PrintNoTitle) ShowSectionTitles = false;
|
|
|
|
|
|
|
|
|
@@ -2385,11 +2386,11 @@ namespace Volian.Print.Library
|
|
|
|
|
{
|
|
|
|
|
foreach (UnderlineTerminate ut in utl)
|
|
|
|
|
{
|
|
|
|
|
if (rtf.Contains(ut.Text))
|
|
|
|
|
MatchCollection mc = Regex.Matches(rtf, "(?<!Link|ReferencedObject|Transition|TransitionRange)" + ut.Text);
|
|
|
|
|
if (mc.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
int indxC = rtf.IndexOf(ut.Text);
|
|
|
|
|
rtf = rtf.Substring(0, indxC) + @"\ulnone " + rtf.Substring(indxC);
|
|
|
|
|
break;
|
|
|
|
|
Match m = mc[mc.Count - 1];
|
|
|
|
|
rtf = rtf.Substring(0, m.Index) + @"\ulnone " + rtf.Substring(m.Index);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@@ -2402,6 +2403,7 @@ namespace Volian.Print.Library
|
|
|
|
|
get { return _XOffsetBox; }
|
|
|
|
|
set { _XOffsetBox = value; }
|
|
|
|
|
}
|
|
|
|
|
private float _MyBoxLeftAdj = 0;
|
|
|
|
|
private float SetHeader(vlnParagraph para, PdfContentByte cb, ItemInfo itemInfo, FormatInfo formatInfo)
|
|
|
|
|
{
|
|
|
|
|
float xoff = (float)itemInfo.MyDocStyle.Layout.LeftMargin;
|
|
|
|
@@ -2419,7 +2421,7 @@ namespace Volian.Print.Library
|
|
|
|
|
if (bx.TabPos > 0)
|
|
|
|
|
xoff += (float)bx.TabPos; // xoff starts as left margin
|
|
|
|
|
else
|
|
|
|
|
xoff += (float)((bx.TxtStart + XOffsetBox + (bx.TxtWidth / 2)) - (hdrWidth / 2)); // xoff starts as left margin
|
|
|
|
|
xoff += (float)((bx.TxtStart + _MyBoxLeftAdj + XOffsetBox + (bx.TxtWidth / 2)) - (hdrWidth / 2)); // xoff starts as left margin
|
|
|
|
|
}
|
|
|
|
|
else if (formatInfo.MyStepSectionLayoutData.Separator.Location > 0)
|
|
|
|
|
xoff = XOffset + AdjustToCharPosition((float)((para.Width - hdrWidth) / formatInfo.MyStepSectionLayoutData.Separator.Location), itemInfo.MyHeader.MyFont.CPI);
|
|
|
|
@@ -2428,7 +2430,7 @@ namespace Volian.Print.Library
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
xoff = XOffset; // XOffset has left margin included
|
|
|
|
|
vlnHeader myHeader = new vlnHeader(this, cb, itemInfo.MyHeader.Text, itemInfo.MyHeader.CleanText.TrimStart(" ".ToCharArray()), xoff, YOffset, itemInfo.MyHeader.MyFont);
|
|
|
|
|
vlnHeader myHeader = new vlnHeader(this, cb, itemInfo.MyHeader.Text, itemInfo.MyHeader.CleanText.TrimStart(" ".ToCharArray()), xoff + _MyBoxLeftAdj, YOffset, itemInfo.MyHeader.MyFont);
|
|
|
|
|
PartsAbove.Add(myHeader);
|
|
|
|
|
return myHeader.Height + (!MyItemInfo.MyDocStyle.SpecialStepsFoldout || (MyItemInfo.MyDocStyle.ExtraLineHeader && (MyItemInfo.IsCaution || MyItemInfo.IsNote)) ? MyItemInfo.FormatStepData.SpaceIn ? SixLinesPerInch : 0 : 0);
|
|
|
|
|
}
|
|
|
|
@@ -2794,7 +2796,7 @@ namespace Volian.Print.Library
|
|
|
|
|
XOffset = (float)itemInfo.MyDocStyle.Layout.LeftMargin + tabWidth + XOffsetBox;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
XOffset = (float)itemInfo.MyDocStyle.Layout.LeftMargin + (float)bx.TxtStart + tabWidth + XOffsetBox;
|
|
|
|
|
XOffset = (float)itemInfo.MyDocStyle.Layout.LeftMargin + (float)bx.TxtStart + _MyBoxLeftAdj + tabWidth + XOffsetBox;
|
|
|
|
|
if (myTab != null) myTab.XOffset = XOffset - tabWidth;
|
|
|
|
|
}
|
|
|
|
|
//else if (itemInfo.IsRNOPart && !((ItemInfo)itemInfo.ActiveParent).IsHigh)
|
|
|
|
|