This commit is contained in:
parent
f399ad350a
commit
9023e7c899
@ -194,7 +194,7 @@ namespace Volian.Print.Library
|
|||||||
if (MyPageHelper.MyTOCPageCounts.ContainsKey(tocKey))
|
if (MyPageHelper.MyTOCPageCounts.ContainsKey(tocKey))
|
||||||
{
|
{
|
||||||
PageCount pc = MyPageHelper.MyTOCPageCounts[tocKey];
|
PageCount pc = MyPageHelper.MyTOCPageCounts[tocKey];
|
||||||
pc.Total = MyPageHelper.CurrentPageNumber;
|
pc.Total = MyPageHelper.CurrentTOCPageNumber + 1;
|
||||||
pc.DrawTemplates();
|
pc.DrawTemplates();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1016,7 +1016,7 @@ namespace Volian.Print.Library
|
|||||||
if (itemInfo.MyContent.Text != null)
|
if (itemInfo.MyContent.Text != null)
|
||||||
{
|
{
|
||||||
ProcedureInfo proc = itemInfo.MyProcedure;
|
ProcedureInfo proc = itemInfo.MyProcedure;
|
||||||
// DocVersionInfo dvi = proc.ActiveParent as DocVersionInfo;
|
// DocVersionInfo dvi = proc.ActiveParent as DocVersionInfo;
|
||||||
DocVersionInfo dvi = proc.MyDocVersion;
|
DocVersionInfo dvi = proc.MyDocVersion;
|
||||||
ROFstInfo rofst = dvi.DocVersionAssociations[0].MyROFst;
|
ROFstInfo rofst = dvi.DocVersionAssociations[0].MyROFst;
|
||||||
rofst.docVer = dvi;
|
rofst.docVer = dvi;
|
||||||
@ -1029,36 +1029,36 @@ namespace Volian.Print.Library
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
string[] subs = m.Groups[3].Value.Split(" ".ToCharArray());
|
string[] subs = m.Groups[3].Value.Split(" ".ToCharArray());
|
||||||
string roid = subs[1];
|
string roid = subs[1];
|
||||||
string val = lookup.GetRoValue(subs[1]);
|
string val = lookup.GetRoValue(subs[1]);
|
||||||
if (val == null) val = lookup.GetRoValue(subs[1].Substring(0, 12));
|
if (val == null) val = lookup.GetRoValue(subs[1].Substring(0, 12));
|
||||||
if (val != null)
|
if (val != null)
|
||||||
{
|
{
|
||||||
string[] vals = val.Split("\n".ToCharArray());
|
string[] vals = val.Split("\n".ToCharArray());
|
||||||
Width = Int32.Parse(vals[3], System.Globalization.NumberStyles.AllowHexSpecifier) * MyItemInfo.FormatStepData.Font.CharsToTwips;
|
Width = Int32.Parse(vals[3], System.Globalization.NumberStyles.AllowHexSpecifier) * MyItemInfo.FormatStepData.Font.CharsToTwips;
|
||||||
int lines = Int32.Parse(vals[2], System.Globalization.NumberStyles.AllowHexSpecifier);
|
int lines = Int32.Parse(vals[2], System.Globalization.NumberStyles.AllowHexSpecifier);
|
||||||
Height = lines * SixLinesPerInch;
|
Height = lines * SixLinesPerInch;
|
||||||
//yForCheckoff = yoff + Height - SixLinesPerInch;
|
//yForCheckoff = yoff + Height - SixLinesPerInch;
|
||||||
if (dropCheckoff)
|
if (dropCheckoff)
|
||||||
yForCheckoff += Height - SixLinesPerInch; // place checkoff on last row of text
|
yForCheckoff += Height - SixLinesPerInch; // place checkoff on last row of text
|
||||||
yoff += (Height + (SixLinesPerInch)); // RHM 20120925 - Eliminate extra space after Figure
|
yoff += (Height + (SixLinesPerInch)); // RHM 20120925 - Eliminate extra space after Figure
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ROImageInfo roImage = ROImageInfo.GetByROFstID_FileName(rofst.ROFstID, vals[0]);
|
ROImageInfo roImage = ROImageInfo.GetByROFstID_FileName(rofst.ROFstID, vals[0]);
|
||||||
if (roImage != null)
|
if (roImage != null)
|
||||||
ImageText = val;
|
ImageText = val;
|
||||||
else
|
else
|
||||||
erMsg = string.Format("Image {0} does not exist.", vals[0]);
|
erMsg = string.Format("Image {0} does not exist.", vals[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
erMsg = string.Format("Image {0} does not exist, error = {1}.", vals[0], ex.Message);
|
erMsg = string.Format("Image {0} does not exist, error = {1}.", vals[0], ex.Message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (erMsg != null) Rtf = GetRtf(erMsg, itemInfo.ActiveFormat.PlantFormat.FormatData.Font);
|
if (erMsg != null) Rtf = GetRtf(erMsg, itemInfo.ActiveFormat.PlantFormat.FormatData.Font);
|
||||||
CalculateXOffset(itemInfo, maxRNO, formatInfo);
|
CalculateXOffset(itemInfo, maxRNO, formatInfo);
|
||||||
}
|
}
|
||||||
@ -1091,13 +1091,15 @@ namespace Volian.Print.Library
|
|||||||
else
|
else
|
||||||
if (itemInfo.FormatStepData != null && itemInfo.FormatStepData.StepPrintData != null) XOffset += (float)(itemInfo.FormatStepData.StepPrintData.PosAdjust ?? 0);
|
if (itemInfo.FormatStepData != null && itemInfo.FormatStepData.StepPrintData != null) XOffset += (float)(itemInfo.FormatStepData.StepPrintData.PosAdjust ?? 0);
|
||||||
|
|
||||||
bool printMetaHdr = false;
|
if (itemInfo.IsSection && formatInfo.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.ShowSectionTitles
|
||||||
if (itemInfo.Steps != null && itemInfo.IsSection && itemInfo.Sections != null && itemInfo.Sections.Count > 0)
|
&& !MyItemInfo.MyDocStyle.CancelSectTitle)
|
||||||
{
|
{
|
||||||
SectionConfig sc = itemInfo.MyConfig as SectionConfig;
|
if (MyItemInfo.MyDocStyle.Layout.SectionMacro != null)
|
||||||
if ((sc != null && sc.Section_PrintHdr == "Y") && itemInfo.ActiveFormat.PlantFormat.FormatData.SectData.UseMetaSections) printMetaHdr = true;
|
{
|
||||||
|
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
|
// If WCN checklists, the substeps are printed in a row, need to keep track of the 'longest' in
|
||||||
// y direction (bottommost) across the row.
|
// y direction (bottommost) across the row.
|
||||||
if (itemInfo.IsStep && itemInfo.MyHLS.FormatStepData.UseSmartTemplate && (TheStepLevel(itemInfo) > 0))
|
if (itemInfo.IsStep && itemInfo.MyHLS.FormatStepData.UseSmartTemplate && (TheStepLevel(itemInfo) > 0))
|
||||||
@ -1106,10 +1108,9 @@ namespace Volian.Print.Library
|
|||||||
savCheckListBottomMost = yoff + Height + SixLinesPerInch;
|
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
|
// 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. .
|
// text) for wcn checklist, i.e.
|
||||||
if ((!itemInfo.IsStepSection && !itemInfo.MyHLS.FormatStepData.UseSmartTemplate)
|
if ((!itemInfo.IsStepSection && !itemInfo.MyHLS.FormatStepData.UseSmartTemplate) // regular step
|
||||||
|| printMetaHdr ||
|
|| (formatInfo.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.ShowSectionTitles
|
||||||
(formatInfo.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.ShowSectionTitles
|
|
||||||
&& !MyItemInfo.MyDocStyle.CancelSectTitle
|
&& !MyItemInfo.MyDocStyle.CancelSectTitle
|
||||||
&& !MyItemInfo.MyDocStyle.SpecialStepsFoldout)
|
&& !MyItemInfo.MyDocStyle.SpecialStepsFoldout)
|
||||||
// In WCN Checklist: I don't have children or if I have children the first child doesn't alignwithparent.
|
// In WCN Checklist: I don't have children or if I have children the first child doesn't alignwithparent.
|
||||||
@ -1117,11 +1118,19 @@ namespace Volian.Print.Library
|
|||||||
&& ((itemInfo.Steps == null || itemInfo.Steps.Count == 0)
|
&& ((itemInfo.Steps == null || itemInfo.Steps.Count == 0)
|
||||||
|| !itemInfo.Steps[0].FormatStepData.StepLayoutData.AlignWithParentTab)))
|
|| !itemInfo.Steps[0].FormatStepData.StepLayoutData.AlignWithParentTab)))
|
||||||
{
|
{
|
||||||
yoff += Height;
|
bool doprint = true;
|
||||||
yoff += AdjustForBlankLines();
|
if (MyItemInfo.IsSection) // if on a section, be sure that section title should print.
|
||||||
if (dropCheckoff)
|
{
|
||||||
yForCheckoff += Height - SixLinesPerInch; // place checkoff on last row of text
|
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;
|
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)
|
private int TheStepLevel(ItemInfo itemInfo)
|
||||||
{
|
{
|
||||||
if (itemInfo.IsHigh) return -1;
|
if (itemInfo.IsHigh) return -1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user