This commit is contained in:
2013-02-20 11:45:14 +00:00
parent 4c673f0ea3
commit 0a1d868d4a
7 changed files with 522 additions and 38 deletions

View File

@@ -369,7 +369,7 @@ namespace Volian.Print.Library
}
// Now do the bottom line for this item.
Paragraph crossLine = new Paragraph(bottomOfTable ? bx.BXLMID : bx.BXMID, iSymblFont);
float yloc = yPageStart - this.YBottomMost + 15;
float yloc = yPageStart - this.YBottomMost + 18;
Rtf2Pdf.TextAt(cb, leftLine, float.Parse(vertPos[0]) + (float)ii.MyDocStyle.Layout.LeftMargin - csize, yloc, lWidth, 100, null, yBottomMargin);
float hPos = float.Parse(vertPos[0]) + csize;
int doHorizCnt = 0;
@@ -609,7 +609,7 @@ namespace Volian.Print.Library
}
// Only do foldout page if not done for section break, i.e. check the there's a previous step.
if (MyItemInfo.MyPrevious != null && MyItemInfo.FoldoutIndex()>-1)
PromsPrinter.DoFoldoutPage(cb, "HLS", MyPageHelper.TextLayer, MyPageHelper);
PromsPrinter.DoFoldoutPage(cb, "HLS", MyPageHelper.TextLayer, MyPageHelper, MyItemInfo.FoldoutIndex());
yPageStart = yTopMargin + YTopMost;
DoCheckOffHeader(cb, MyItemInfo, yLocation, yTopMargin, yPageStart);
MyPageHelper.YMultiplier = 1;
@@ -650,7 +650,7 @@ namespace Volian.Print.Library
ResetDocStyleAndValues(ref yTopMargin, ref yBottomMargin);
DebugText.WriteLine("Paginate2");
if (MyItemInfo.FoldoutIndex()>-1)
PromsPrinter.DoFoldoutPage(cb, "Break within Step", MyPageHelper.TextLayer, MyPageHelper); // temporary foldout
PromsPrinter.DoFoldoutPage(cb, "Break within Step", MyPageHelper.TextLayer, MyPageHelper, MyItemInfo.FoldoutIndex()); // temporary foldout
// If there is a box, adjust the yTopMost to include it.
float yTopMost = YTopMost;
//if (YVeryTop < yTopMost) Console.WriteLine("{0},{1},{2}", MyItemInfo.DBSequence, yTopMost, YVeryTop);
@@ -689,7 +689,7 @@ namespace Volian.Print.Library
MyPageHelper.PageBookmarks.Add(MyItemInfo, ((si.DisplayNumber ?? "") == "" ? "" : si.DisplayNumber + " - ") + si.DisplayText, null);
}
if (MyItemInfo.FoldoutIndex() > -1)
PromsPrinter.DoFoldoutPage(cb, "HLS (7 lpi) break", MyPageHelper.TextLayer, MyPageHelper);
PromsPrinter.DoFoldoutPage(cb, "HLS (7 lpi) break", MyPageHelper.TextLayer, MyPageHelper, MyItemInfo.FoldoutIndex());
}
if (MyItemInfo.MyParent != null && MyItemInfo.MyParent.IsStepSection &&
MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.ShowSectionTitles
@@ -1194,20 +1194,17 @@ namespace Volian.Print.Library
PartsAbove.Add(new vlnMacro(xoff, yoff, macro));
}
}
// If WCN checklists, the substeps are printed in a row, need to keep track of the 'longest' in
// If checklists, the substeps are printed in a row, need to keep track of the 'longest' in
// y direction (bottommost) across the row.
if (itemInfo.IsStep && itemInfo.MyHLS.FormatStepData.UseSmartTemplate && (TheStepLevel(itemInfo) > 0))
{
// do I need to get max of savCheckListBottomMost & (yoff+Height+SixLinesPerInch)
if (itemInfo.IsStep && itemInfo.MyHLS.FormatStepData.UseSmartTemplate && (TheStepLevel(itemInfo) >= 0))
savCheckListBottomMost = yoff + Height + SixLinesPerInch;
}
// Get Y offset for regular steps, or if section title is output or if not within row (not last column of
// text) for wcn checklist, i.e.
if ((!itemInfo.IsStepSection && !itemInfo.MyHLS.FormatStepData.UseSmartTemplate) // regular step
|| (formatInfo.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.ShowSectionTitles
&& !MyItemInfo.MyDocStyle.CancelSectTitle
&& !MyItemInfo.MyDocStyle.SpecialStepsFoldout)
// In WCN Checklist: I don't have children or if I have children the first child doesn't alignwithparent.
// In Checklist: I don't have children or if I have children the first child doesn't alignwithparent.
|| (!itemInfo.IsStepSection && itemInfo.MyHLS.FormatStepData.UseSmartTemplate
&& ((itemInfo.Steps == null || itemInfo.Steps.Count == 0)
|| !itemInfo.Steps[0].FormatStepData.StepLayoutData.AlignWithParentTab)))
@@ -1307,9 +1304,10 @@ namespace Volian.Print.Library
}
YBottomMost = yoff;
// For WCN Checklist, the substeps are in rows of data. The YBottomMost is the bottom most for
// For Checklist, the substeps are in rows of data. The YBottomMost is the bottom most for
// the row.
if (savCheckListBottomMost != 0 && savCheckListBottomMost > YBottomMost) YBottomMost = savCheckListBottomMost;
if (savCheckListBottomMost != 0 && savCheckListBottomMost > YBottomMost)
YBottomMost = savCheckListBottomMost;
}
private string GetMacroName(string str)
@@ -2101,7 +2099,7 @@ namespace Volian.Print.Library
int? bxIndx = itemInfo.IsStep ? formatInfo.PlantFormat.FormatData.StepDataList[typ].StepLayoutData.STBoxindex : null;
float? widOvrd = 0;
float xwid = 0;
if (itemInfo.IsStep && itemInfo.MyHLS.FormatStepData.UseSmartTemplate && (xwid = GetWidthFromTemplate(itemInfo, formatInfo))>0)
if (itemInfo.IsStep && itemInfo.MyHLS.FormatStepData.UseSmartTemplate && (xwid = GetWidthFromTemplate(itemInfo, formatInfo)) > 0)
widOvrd = xwid;
else
widOvrd = itemInfo.FormatStepData == null ? null : itemInfo.FormatStepData.WidthOverride;