|
|
|
@@ -143,8 +143,8 @@ namespace Volian.Print.Library
|
|
|
|
|
Processed = true;
|
|
|
|
|
if (_PartsAbove != null && _PartsAbove.Count > 0) yPageStart = PartsAbove.ToPdf(cb, yPageStart, ref yTopMargin, ref yBottomMargin);
|
|
|
|
|
if (MyItemInfo.IsHigh && MyItemInfo.MyDocStyle.SpecialStepsFoldout) yPageStart -= SixLinesPerInch;
|
|
|
|
|
//SHE if (MyItemInfo.IsHigh && !MyItemInfo.ActiveFormat.MyStepSectionLayoutData.DoSTExtraAtTop && (yPageStart - YTopMost == yTopMargin))
|
|
|
|
|
//SHE yPageStart += ((MyItemInfo.FormatStepData == null) ? 0 : MyItemInfo.FormatStepData.StepLayoutData.STExtraSpace ?? 0);
|
|
|
|
|
if (MyItemInfo.IsHigh && !MyItemInfo.ActiveFormat.MyStepSectionLayoutData.DoSTExtraAtTop && (yPageStart - YTopMost == yTopMargin))
|
|
|
|
|
yPageStart += ((MyItemInfo.FormatStepData == null) ? 0 : MyItemInfo.FormatStepData.StepLayoutData.STExtraSpace ?? 0);
|
|
|
|
|
float yLocation = CalculateYOffset(yPageStart, yTopMargin);
|
|
|
|
|
if (MyItemInfo.HasChangeBar && MyPageHelper.ChangeBarDefinition.MyChangeBarType != PrintChangeBar.Without) MyPageHelper.AddChangeBar(DoChangeBar(cb, MyItemInfo, MyPageHelper, XOffset, yLocation, MyPageHelper.MaxRNO, MyItemInfo.ActiveFormat), cbMess);
|
|
|
|
|
float retval = yLocation;
|
|
|
|
@@ -1035,14 +1035,6 @@ namespace Volian.Print.Library
|
|
|
|
|
mytab.XOffset += mytab.Width;
|
|
|
|
|
XOffset = mytab.XOffset + mytab.Width;
|
|
|
|
|
}
|
|
|
|
|
//SHE if this is the High Level RNO step (MyTopRNO) and we are numbering the RNO, adjust the xoffset to
|
|
|
|
|
//SHE include the HLS tab size.
|
|
|
|
|
//SHEif (!itemInfo.IsSection && itemInfo.FormatStepData.NumberHighLevel && itemInfo.IsRNOPart && itemInfo.ItemID == MyTopRNO.MyItemInfo.ItemID)
|
|
|
|
|
//SHE{
|
|
|
|
|
//SHE float tadj = itemInfo.MyHLS.FormatStepData.TabData.RNOIdentPrint == null || itemInfo.MyHLS.FormatStepData.TabData.RNOIdentPrint == "" ? mytab.Text.Length * 6 : (itemInfo.MyHLS.FormatStepData.TabData.RNOIdentPrint.Length * 6);
|
|
|
|
|
//SHE mytab.XOffset += tadj;
|
|
|
|
|
//SHE XOffset = mytab.XOffset + (tadj + 6); // had to do this to get it to match 16 bit for SHE.
|
|
|
|
|
//SHE}
|
|
|
|
|
AdjustWidth(itemInfo, maxRNO, formatInfo, mytab);
|
|
|
|
|
AdjustXOffsetForTab(itemInfo, maxRNO, formatInfo, mytab, xMetaAdj);
|
|
|
|
|
if (itemInfo.MyHeader != null && itemInfo.MyHeader.Text != null && !doSectTab)
|
|
|
|
@@ -1081,6 +1073,12 @@ namespace Volian.Print.Library
|
|
|
|
|
myBullet.Rtf = myBullet.Rtf.Replace("\u25CF", @"\f1\u9679?\f0 ");
|
|
|
|
|
PartsLeft.Add(myBullet);
|
|
|
|
|
}
|
|
|
|
|
if (itemInfo.MyTab.AsteriskOffset != 0)
|
|
|
|
|
{
|
|
|
|
|
// the '-24' was used for the SHE format to get the continuous HLS's asterisk to match 16bit.
|
|
|
|
|
vlnText myAsterisk = new vlnText(cb, this, "*", "*", mytab.XOffset - 24, YOffset, MyItemInfo.FormatStepData.TabData.Font);
|
|
|
|
|
PartsLeft.Add(myAsterisk);
|
|
|
|
|
}
|
|
|
|
|
if (itemInfo.IsRNOPart)
|
|
|
|
|
{
|
|
|
|
|
// there may be other places that double space, but this supports it for RNOs (the DoubleRNOspace flag)
|
|
|
|
@@ -1106,7 +1104,7 @@ namespace Volian.Print.Library
|
|
|
|
|
if (dropCheckoff)
|
|
|
|
|
yForCheckoff += Height - SixLinesPerInch; // place checkoff on last row of text
|
|
|
|
|
yoff += (Height + (2 * SixLinesPerInch));
|
|
|
|
|
CalculateXOffset(itemInfo, maxRNO, formatInfo);
|
|
|
|
|
CalculateXOffsetGridOrFigure(itemInfo, maxRNO, formatInfo);
|
|
|
|
|
yoff = (float)Math.Ceiling(yoff); // RHM 20120925 - Make sure that yOff is an integer value after a grid
|
|
|
|
|
}
|
|
|
|
|
else if (itemInfo.IsFigure) // if a figure we've got to determine the size:
|
|
|
|
@@ -1159,7 +1157,7 @@ namespace Volian.Print.Library
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (erMsg != null) Rtf = GetRtf(erMsg, itemInfo.ActiveFormat.PlantFormat.FormatData.Font);
|
|
|
|
|
CalculateXOffset(itemInfo, maxRNO, formatInfo);
|
|
|
|
|
CalculateXOffsetGridOrFigure(itemInfo, maxRNO, formatInfo);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
@@ -1196,7 +1194,7 @@ namespace Volian.Print.Library
|
|
|
|
|
if (itemInfo.IsTablePart) // Not for grid, this is for old-style tables.
|
|
|
|
|
{
|
|
|
|
|
Width = GetTableWidth(cb, IParagraph, MyItemInfo.MyDocStyle.Layout.PageWidth);
|
|
|
|
|
CalculateXOffset(itemInfo, maxRNO, formatInfo);
|
|
|
|
|
CalculateXOffsetGridOrFigure(itemInfo, maxRNO, formatInfo);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
if (itemInfo.FormatStepData != null && itemInfo.FormatStepData.StepPrintData != null) XOffset += (float)(itemInfo.FormatStepData.StepPrintData.PosAdjust ?? 0);
|
|
|
|
@@ -1252,17 +1250,10 @@ namespace Volian.Print.Library
|
|
|
|
|
if (formatInfo.PlantFormat.FormatData.ProcData.CheckOffData.SkipSpaces)
|
|
|
|
|
{
|
|
|
|
|
if (mytab != null)
|
|
|
|
|
{
|
|
|
|
|
int cntspac = 0;
|
|
|
|
|
xloc_co = mytab.XOffset;
|
|
|
|
|
// SHE commented out next two lines - may need to control this by format flag
|
|
|
|
|
for (int c = 0; c < itemInfo.MyTab.CleanText.Length; c++) if (itemInfo.MyTab.CleanText[c] == ' ') cntspac++;
|
|
|
|
|
xloc_co = xloc_co - (cntspac * 6);
|
|
|
|
|
}
|
|
|
|
|
//SHE else
|
|
|
|
|
//SHE xloc_co = XOffset; //there's no tab - put checkoff at step's xoff. Macro should back up from step's x.
|
|
|
|
|
else
|
|
|
|
|
xloc_co = XOffset; //there's no tab - put checkoff at step's xoff. Macro should back up from step's x.
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
PartsRight.Add(new vlnMacro(xloc_co, yForCheckoff, co.Macro));
|
|
|
|
|
}
|
|
|
|
|
float yOffRight = yoff;
|
|
|
|
@@ -1299,7 +1290,6 @@ namespace Volian.Print.Library
|
|
|
|
|
SectionConfig sc = itemInfo.MyConfig as SectionConfig;
|
|
|
|
|
if (sc != null && sc.SubSection_Edit != "Y") printsteps = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (itemInfo.Steps != null && printsteps) yoff = ChildrenBelow.Add(cb, itemInfo.Steps, XOffset, yoff, yOffRight, rnoLevel, maxRNO, formatInfo);
|
|
|
|
|
if (itemInfo.Sections != null) yoff = ChildrenBelow.Add(cb, itemInfo.Sections, xoff, yoff, yoff, rnoLevel, maxRNO, formatInfo);
|
|
|
|
|
if (itemInfo.Procedures != null) yoff = ChildrenBelow.Add(cb, itemInfo.Procedures, xoff, yoff, yoff, rnoLevel, maxRNO, formatInfo);
|
|
|
|
@@ -1496,14 +1486,13 @@ namespace Volian.Print.Library
|
|
|
|
|
return bottomChild;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
private void CalculateXOffset(ItemInfo itemInfo, int maxRNO, FormatInfo formatInfo)
|
|
|
|
|
private void CalculateXOffsetGridOrFigure(ItemInfo itemInfo, int maxRNO, FormatInfo formatInfo)
|
|
|
|
|
{
|
|
|
|
|
bool aerTableOrFigure = itemInfo.FormatStepData.Type.Contains("AER");
|
|
|
|
|
vlnParagraph hls1 = MyParent;
|
|
|
|
|
while (hls1.MyParent != null && !hls1.MyItemInfo.IsHigh) hls1 = hls1.MyParent;
|
|
|
|
|
float colR = float.Parse(formatInfo.MyStepSectionLayoutData.ColRTable.Split(",".ToCharArray())[itemInfo.ColumnMode]);
|
|
|
|
|
//SHE float xLowerLimit = hls1.PartsLeft != null && hls1.PartsLeft.Count > 0 ? hls1.PartsLeft[0].XOffset : hls1.XOffset;
|
|
|
|
|
float xLowerLimit = hls1.XOffset;
|
|
|
|
|
float xLowerLimit = hls1.PartsLeft != null && hls1.PartsLeft.Count > 0 ? hls1.PartsLeft[0].XOffset : hls1.XOffset;
|
|
|
|
|
float xUpperLimit = hls1.XOffset + hls1.Width + colR * itemInfo.ColumnMode;
|
|
|
|
|
float TableCenterPos = float.Parse(formatInfo.MyStepSectionLayoutData.TableCenterPos.Split(",".ToCharArray())[itemInfo.ColumnMode]);
|
|
|
|
|
if (formatInfo.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.TieTabToLevel)
|
|
|
|
@@ -2069,6 +2058,14 @@ namespace Volian.Print.Library
|
|
|
|
|
XOffset -= (itemInfo.MyTab.Offset - hls.MyTab.Offset);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// if the step is within the rno and we're numbering the high level rno, we've got to account for the
|
|
|
|
|
// indenting (increased x offset) for the top level rno's tab, if there is no top level rno:
|
|
|
|
|
if (itemInfo.FormatStepData.NumberHighLevel && (itemInfo.MyHLS.RNOs == null || itemInfo.MyHLS.RNOs.Count<=0))
|
|
|
|
|
{
|
|
|
|
|
// add in the size that an RNO off HLS would take.
|
|
|
|
|
XOffset += tabWidth;
|
|
|
|
|
if (myTab != null) myTab.XOffset += tabWidth;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (MyParent != null)
|
|
|
|
|
{
|
|
|
|
@@ -2122,7 +2119,7 @@ namespace Volian.Print.Library
|
|
|
|
|
widOvrd = xwid;
|
|
|
|
|
else
|
|
|
|
|
widOvrd = itemInfo.FormatStepData == null ? null : itemInfo.FormatStepData.WidthOverride;
|
|
|
|
|
if (itemInfo.IsRNOPart && itemInfo.ActiveFormat.MyStepSectionLayoutData.RNOWidthAlt != null)
|
|
|
|
|
if (itemInfo.IsRNOPart && itemInfo.MyParent.IsHigh && itemInfo.ActiveFormat.MyStepSectionLayoutData.RNOWidthAlt != null)
|
|
|
|
|
{
|
|
|
|
|
string[] splitRNOWidthAlt = itemInfo.ActiveFormat.MyStepSectionLayoutData.RNOWidthAlt.Split(',');
|
|
|
|
|
float ovrd = (itemInfo.RNOLevel < splitRNOWidthAlt.Length) ? float.Parse(splitRNOWidthAlt[itemInfo.RNOLevel]) : 0;
|
|
|
|
|