This commit is contained in:
parent
f399ad350a
commit
9023e7c899
@ -194,7 +194,7 @@ namespace Volian.Print.Library
|
||||
if (MyPageHelper.MyTOCPageCounts.ContainsKey(tocKey))
|
||||
{
|
||||
PageCount pc = MyPageHelper.MyTOCPageCounts[tocKey];
|
||||
pc.Total = MyPageHelper.CurrentPageNumber;
|
||||
pc.Total = MyPageHelper.CurrentTOCPageNumber + 1;
|
||||
pc.DrawTemplates();
|
||||
}
|
||||
}
|
||||
@ -1016,7 +1016,7 @@ namespace Volian.Print.Library
|
||||
if (itemInfo.MyContent.Text != null)
|
||||
{
|
||||
ProcedureInfo proc = itemInfo.MyProcedure;
|
||||
// DocVersionInfo dvi = proc.ActiveParent as DocVersionInfo;
|
||||
// DocVersionInfo dvi = proc.ActiveParent as DocVersionInfo;
|
||||
DocVersionInfo dvi = proc.MyDocVersion;
|
||||
ROFstInfo rofst = dvi.DocVersionAssociations[0].MyROFst;
|
||||
rofst.docVer = dvi;
|
||||
@ -1091,13 +1091,15 @@ namespace Volian.Print.Library
|
||||
else
|
||||
if (itemInfo.FormatStepData != null && itemInfo.FormatStepData.StepPrintData != null) XOffset += (float)(itemInfo.FormatStepData.StepPrintData.PosAdjust ?? 0);
|
||||
|
||||
bool printMetaHdr = false;
|
||||
if (itemInfo.Steps != null && itemInfo.IsSection && itemInfo.Sections != null && itemInfo.Sections.Count > 0)
|
||||
if (itemInfo.IsSection && formatInfo.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.ShowSectionTitles
|
||||
&& !MyItemInfo.MyDocStyle.CancelSectTitle)
|
||||
{
|
||||
SectionConfig sc = itemInfo.MyConfig as SectionConfig;
|
||||
if ((sc != null && sc.Section_PrintHdr == "Y") && itemInfo.ActiveFormat.PlantFormat.FormatData.SectData.UseMetaSections) printMetaHdr = true;
|
||||
if (MyItemInfo.MyDocStyle.Layout.SectionMacro != null)
|
||||
{
|
||||
string macro = GetMacroName(MyItemInfo.MyDocStyle.Layout.SectionMacro);
|
||||
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
|
||||
// y direction (bottommost) across the row.
|
||||
if (itemInfo.IsStep && itemInfo.MyHLS.FormatStepData.UseSmartTemplate && (TheStepLevel(itemInfo) > 0))
|
||||
@ -1106,22 +1108,29 @@ namespace Volian.Print.Library
|
||||
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)
|
||||
|| printMetaHdr ||
|
||||
(formatInfo.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.ShowSectionTitles
|
||||
// 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.
|
||||
|| (!itemInfo.IsStepSection && itemInfo.MyHLS.FormatStepData.UseSmartTemplate
|
||||
&& ((itemInfo.Steps == null || itemInfo.Steps.Count == 0)
|
||||
|| !itemInfo.Steps[0].FormatStepData.StepLayoutData.AlignWithParentTab)))
|
||||
{
|
||||
bool doprint = true;
|
||||
if (MyItemInfo.IsSection) // if on a section, be sure that section title should print.
|
||||
{
|
||||
SectionConfig sch = MyItemInfo.MyConfig as SectionConfig;
|
||||
if (sch != null && sch.Section_PrintHdr != "Y") doprint = false;
|
||||
}
|
||||
if (doprint)
|
||||
{
|
||||
yoff += Height;
|
||||
yoff += AdjustForBlankLines();
|
||||
if (dropCheckoff)
|
||||
yForCheckoff += Height - SixLinesPerInch; // place checkoff on last row of text
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1209,6 +1218,13 @@ namespace Volian.Print.Library
|
||||
if (savCheckListBottomMost != 0 && savCheckListBottomMost > YBottomMost) YBottomMost = savCheckListBottomMost;
|
||||
}
|
||||
|
||||
private string GetMacroName(string str)
|
||||
{
|
||||
int mindx = str.IndexOf(@"{!");
|
||||
string macro = str.Substring(mindx + 2, str.Length - 3);
|
||||
return macro;
|
||||
}
|
||||
|
||||
private int TheStepLevel(ItemInfo itemInfo)
|
||||
{
|
||||
if (itemInfo.IsHigh) return -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user