B2017-224 Top Continue Messages were not printing. Logic for background printing was running when it should not.
This commit is contained in:
parent
6d350ed94f
commit
9458f378e2
@ -79,10 +79,10 @@ namespace Volian.Print.Library
|
||||
int maxRnoSav = maxRNO;
|
||||
foreach (ItemInfo iChildItemInfo in itemInfoList)
|
||||
{
|
||||
if(pp != null) pp.OnStatusChanged((iChildItemInfo.DisplayNumber ?? "") == "" ? iChildItemInfo.DisplayText : iChildItemInfo.DisplayNumber, PromsPrinterStatusType.LoadVlnParagraph);
|
||||
if (pp != null) pp.OnStatusChanged((iChildItemInfo.DisplayNumber ?? "") == "" ? iChildItemInfo.DisplayText : iChildItemInfo.DisplayNumber, PromsPrinterStatusType.LoadVlnParagraph);
|
||||
if (iChildItemInfo.IsFootnote)
|
||||
{
|
||||
vlnParagraph para = new vlnParagraph(Parent, cb, iChildItemInfo, xoff, yoff, rnoLevel, maxRNO, formatInfo, null, null, yoffRight, true, iChildItemInfo.IsSection ? pp :null);
|
||||
vlnParagraph para = new vlnParagraph(Parent, cb, iChildItemInfo, xoff, yoff, rnoLevel, maxRNO, formatInfo, null, null, yoffRight, true, iChildItemInfo.IsSection ? pp : null);
|
||||
continue; // don't add it, vlnParagraph adds this item to the footnote list in ToPdf.
|
||||
}
|
||||
maxRNO = maxRnoSav;
|
||||
@ -90,7 +90,7 @@ namespace Volian.Print.Library
|
||||
if (iChildItemInfo.IsSection && (iChildItemInfo as SectionInfo).ColumnMode != maxRNO)
|
||||
maxRNO = (iChildItemInfo as SectionInfo).ColumnMode;
|
||||
int maxRnoTemplate = iChildItemInfo.TemplateChildColumnMode;
|
||||
if (maxRnoTemplate >= 0) maxRNO = maxRnoTemplate-1;
|
||||
if (maxRnoTemplate >= 0) maxRNO = maxRnoTemplate - 1;
|
||||
ItemInfo childItemInfo = iChildItemInfo;
|
||||
int? bxIndx = childItemInfo.FormatStepData == null ? -1 : childItemInfo.FormatStepData.StepLayoutData.STBoxindex;
|
||||
// if the Caution or Note is not boxed, then use ColT to set the starting column of the Note or Caution
|
||||
@ -104,7 +104,7 @@ namespace Volian.Print.Library
|
||||
// by the first level of children. The data for the column is the child of the column header.
|
||||
// Sometimes the column will not have data, the following handles that case. Also, use
|
||||
// the boolean didComponentTableRow to keep track of the bottom most yoff of the table row.
|
||||
if ((childItemInfo.MyDocStyle.ComponentList) && childItemInfo.MyParent.IsInTemplate()||
|
||||
if ((childItemInfo.MyDocStyle.ComponentList) && childItemInfo.MyParent.IsInTemplate() ||
|
||||
(childItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm && childItemInfo.IsInTemplate()))
|
||||
{
|
||||
if (childItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm)
|
||||
@ -231,7 +231,7 @@ namespace Volian.Print.Library
|
||||
if (box != null)
|
||||
{
|
||||
box.Height = yoff - box.YOffset; // new height, with children
|
||||
if (formatInfo.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm ||
|
||||
if (formatInfo.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm ||
|
||||
formatInfo.PlantFormat.FormatData.PrintData.SpecialCaseCalvert)
|
||||
{
|
||||
if (childItemInfo.MyHeader != null && childItemInfo.MyPrevious != null
|
||||
@ -386,7 +386,7 @@ namespace Volian.Print.Library
|
||||
if (box.MyParent.MyItemInfo.MyContent.Text.StartsWith(@"\u160?") && box.MyParent.MyItemInfo.DisplayText.Length == 1)
|
||||
{
|
||||
box.Height -= 3 * vlnPrintObject.SixLinesPerInch;
|
||||
yoff -= vlnPrintObject.SixLinesPerInch;
|
||||
yoff -= vlnPrintObject.SixLinesPerInch;
|
||||
}
|
||||
else
|
||||
yoff += 2 * vlnPrintObject.SixLinesPerInch;
|
||||
@ -454,7 +454,7 @@ namespace Volian.Print.Library
|
||||
get { return _IsWordDocPara; }
|
||||
set { _IsWordDocPara = value; }
|
||||
}
|
||||
public static bool HasPrefPageBreak = false; // use to track page breaks for supp info
|
||||
public static bool HasPrefPageBreak = false; // use to track page breaks for supp info
|
||||
public bool PrefPageBreak = false;
|
||||
private bool _ShowSectionTitles;
|
||||
public bool ShowSectionTitles
|
||||
@ -473,7 +473,7 @@ namespace Volian.Print.Library
|
||||
// //if((PartsLeft[0] as vlnTab).Text[0] != '\u25CF')
|
||||
// _MyLog.WarnFormat("NoteTab '{0}','{1}','{2}','{3}','{4}','{5}','{6}'", (PartsAbove[0] as vlnHeader).Text, (PartsLeft[0] as vlnTab).Text, MyItemInfo.MyProcedure.DisplayNumber, MyItemInfo.MyHLS.DisplayText,
|
||||
// MyItemInfo.ShortPath, MyItemInfo.FormatStepData.TabData.IdentPrint, MyItemInfo.FormatStepData.TabData.IdentEdit);
|
||||
//
|
||||
//
|
||||
// B2017-105 if a symbol character was set to a bigger font size, then the positioning of the larger symbol character was printing too high on the line
|
||||
// found with Wolf Creek use of the empty box symbol
|
||||
foreach (Chunk chk in IParagraph.Chunks)
|
||||
@ -512,7 +512,7 @@ namespace Volian.Print.Library
|
||||
yPageStart = yTopMargin + YTopMost;
|
||||
}
|
||||
else
|
||||
yPageStart = yTopMargin + YOffset;
|
||||
yPageStart = yTopMargin + YOffset;
|
||||
}
|
||||
else
|
||||
yPageStart = PartsAbove.ToPdf(cb, yPageStart, ref yTopMargin, ref yBottomMargin);
|
||||
@ -620,12 +620,12 @@ namespace Volian.Print.Library
|
||||
if (pc.Total == 0)
|
||||
{
|
||||
pc.Total = MyPageHelper.CurrentTOCPageNumber + 1;
|
||||
pc.DrawTemplates();
|
||||
pc.DrawTemplates();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!doprint) return yPageStart;
|
||||
if (_PartsLeft != null && _PartsLeft.Count > 0) yPageStart = PartsLeft.ToPdf(cb, yPageStart, ref yTopMargin, ref yBottomMargin);
|
||||
if (_PartsRight != null && _PartsRight.Count > 0) yPageStart = PartsRight.ToPdf(cb, yPageStart, ref yTopMargin, ref yBottomMargin);
|
||||
@ -889,10 +889,10 @@ namespace Volian.Print.Library
|
||||
private float DrawGrid(PdfContentByte cb, ref float yPageStart, float yTopMargin, float yBottomMargin, ref float yLocation)
|
||||
{
|
||||
//DebugText.WriteLine("{0},'{1}','{2}','<<END>>'", MyItemInfo.ItemID, MyItemInfo.ShortPath, FormattedText);
|
||||
if(DebugText.IsOpen)DebugText.WriteLine("{0},'{1}','{2}','<<END>>',{3}", MyItemInfo.ItemID, MyItemInfo.ShortPath, MyItemInfo.MyContent.Text, XOffset);
|
||||
//if (MyItemInfo.InList(11019,11024,111026)) // RHM20150507 Table Scrunch
|
||||
// Console.WriteLine("here");
|
||||
float heightBefore = MyGrid.Height+4 * MyPageHelper.YMultiplier;
|
||||
if (DebugText.IsOpen) DebugText.WriteLine("{0},'{1}','{2}','<<END>>',{3}", MyItemInfo.ItemID, MyItemInfo.ShortPath, MyItemInfo.MyContent.Text, XOffset);
|
||||
//if (MyItemInfo.InList(11019,11024,111026)) // RHM20150507 Table Scrunch
|
||||
// Console.WriteLine("here");
|
||||
float heightBefore = MyGrid.Height + 4 * MyPageHelper.YMultiplier;
|
||||
if (Rtf2Pdf.GetTableScrunchingStatus(TableScrunching.Phase1) && heightBefore > (yLocation - yBottomMargin))
|
||||
{
|
||||
//MyGrid.TooBig = (MyItemInfo.MyDocStyle.Layout.FooterLength ?? 0) + SixLinesPerInch + MyGrid.Height - (yLocation - yBottomMargin);
|
||||
@ -920,7 +920,7 @@ namespace Volian.Print.Library
|
||||
}
|
||||
}
|
||||
}
|
||||
MyPageHelper.BottomContent=yLocation-(MyGrid.Height + 4 * MyPageHelper.YMultiplier);
|
||||
MyPageHelper.BottomContent = yLocation - (MyGrid.Height + 4 * MyPageHelper.YMultiplier);
|
||||
float retval = Rtf2Pdf.GridAt(cb, MyGrid, XOffset, yLocation, Width, 100, DebugInfo, yBottomMargin, !MyItemInfo.FormatStepData.Type.Contains("Borderless"));
|
||||
if (MyGrid.Height > (yTopMargin - yBottomMargin))
|
||||
{
|
||||
@ -933,16 +933,16 @@ namespace Volian.Print.Library
|
||||
private void FixMessages(vlnChangeBar vcb, float heightDif)
|
||||
{
|
||||
SortedDictionary<float, vlnChangeBarMessage> msd = vcb.Messages;
|
||||
vcb.Messages = new SortedDictionary<float,vlnChangeBarMessage>();
|
||||
vcb.Messages = new SortedDictionary<float, vlnChangeBarMessage>();
|
||||
foreach (float key in msd.Keys)
|
||||
{
|
||||
vcb.Messages.Add(key+heightDif, msd[key]);
|
||||
vcb.Messages.Add(key + heightDif, msd[key]);
|
||||
}
|
||||
}
|
||||
|
||||
private float DrawText(PdfContentByte cb, ref float yPageStart, float yTopMargin, float yBottomMargin, ref float yLocation)
|
||||
{
|
||||
if(DebugText.IsOpen)DebugText.WriteLine("{0},'{1}','{2}','<<END>>'", MyItemInfo.ItemID, MyItemInfo.DBSequence, FormattedText);
|
||||
if (DebugText.IsOpen) DebugText.WriteLine("{0},'{1}','{2}','<<END>>'", MyItemInfo.ItemID, MyItemInfo.DBSequence, FormattedText);
|
||||
//Console.WriteLine("{0},{1},'{2}','<<END>>'", MyItemInfo.ItemID, MyItemInfo.DBSequence, IParagraph.Content);
|
||||
float retval = yLocation;
|
||||
if (MyItemInfo.IsRtfRaw)
|
||||
@ -1011,14 +1011,14 @@ namespace Volian.Print.Library
|
||||
Chunk chk1 = IParagraph.Chunks[0] as Chunk;
|
||||
//Console.WriteLine("\"Desination\"\t{0}", MyItemInfo.ItemID);
|
||||
if (MyItemInfo.MyContent.Text.ToUpper().Contains("LINK:TR"))
|
||||
Console.WriteLine("Missing Transition {0}",MyItemInfo.ItemID);
|
||||
Console.WriteLine("Missing Transition {0}", MyItemInfo.ItemID);
|
||||
chk1.SetLocalDestination(string.Format("ItemID={0}", MyItemInfo.ItemID)); // Destination
|
||||
if (MyItemInfo.MyContent.ContentTransitionCount > 0)
|
||||
{
|
||||
TransitionInfo ti = MyItemInfo.MyContent.ContentTransitions[0];
|
||||
ItemInfo tiDefault = GetDefaultItemInfo(ti.MyItemToID);
|
||||
if (ti.MyItemToID.MyProcedure.ItemID == MyItemInfo.MyProcedure.ItemID &&
|
||||
! MyItemInfo.ActiveSection.DisplayNumber.ToUpper().StartsWith("FOLDOUT"))
|
||||
!MyItemInfo.ActiveSection.DisplayNumber.ToUpper().StartsWith("FOLDOUT"))
|
||||
{ // Local Go To
|
||||
if (ti.MyItemToID.MyContent.Type > 19999)
|
||||
foreach (Chunk chk in IParagraph.Chunks)
|
||||
@ -1082,7 +1082,7 @@ namespace Volian.Print.Library
|
||||
{
|
||||
if (MyItemInfo.IsStepSection && MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvert && (MyItemInfo.ActiveSection as SectionInfo).HasInitials)
|
||||
{
|
||||
if (MyPageHelper.PrintInitials(cb,yLocation,(float) MyItemInfo.MyDocStyle.Layout.LeftMargin))
|
||||
if (MyPageHelper.PrintInitials(cb, yLocation, (float)MyItemInfo.MyDocStyle.Layout.LeftMargin))
|
||||
{
|
||||
//if(yLocation != yTopMargin)
|
||||
// Console.WriteLine("'{0}',{1},'{2}',{3},{4},{5},{6}", MyItemInfo.MyProcedure.DisplayNumber, MyItemInfo.ItemID
|
||||
@ -1115,7 +1115,7 @@ namespace Volian.Print.Library
|
||||
}
|
||||
private ItemInfo GetDefaultItemInfo(ItemInfo myItemInfo)
|
||||
{
|
||||
if (myItemInfo.IsProcedure &&myItemInfo.Sections != null)
|
||||
if (myItemInfo.IsProcedure && myItemInfo.Sections != null)
|
||||
{
|
||||
SectionInfo siProcedureSteps = null;
|
||||
foreach (SectionInfo si in myItemInfo.Sections)
|
||||
@ -1150,7 +1150,7 @@ namespace Volian.Print.Library
|
||||
get { return vlnParagraph._MissingInitials; }
|
||||
set { vlnParagraph._MissingInitials = value; }
|
||||
}
|
||||
public static void TextAt(PdfContentByte cb,VlnSvgPageHelper myPageHelper,PageItem pi,float yloc, float leftMargin)
|
||||
public static void TextAt(PdfContentByte cb, VlnSvgPageHelper myPageHelper, PageItem pi, float yloc, float leftMargin)
|
||||
{
|
||||
System.Drawing.Color sysColor = PrintOverride.OverrideSvgColor(System.Drawing.Color.Black);
|
||||
cb.SaveState();
|
||||
@ -1160,7 +1160,7 @@ namespace Volian.Print.Library
|
||||
int fontStyle = 0;
|
||||
bool underline = false;
|
||||
if (pi == null) // The header for the signoffs is missing in the current section format.
|
||||
// An Example can currently be found in Calvert OI-34
|
||||
// An Example can currently be found in Calvert OI-34
|
||||
{
|
||||
if (!MissingInitials) // Only show this once.
|
||||
{
|
||||
@ -1182,11 +1182,11 @@ namespace Volian.Print.Library
|
||||
{
|
||||
ct.SetSimpleColumn((float)pi.Col + leftMargin, yloc + 6.9F, (float)pi.Col + 100 + leftMargin, yloc - 50);
|
||||
fontStyle = (pi.Font.WindowsFont.Bold ? iTextSharp.text.Font.BOLD : 0) + (pi.Font.WindowsFont.Italic ? iTextSharp.text.Font.ITALIC : 0);
|
||||
font = FontFactory.GetFont(pi.Font.Family, BaseFont.IDENTITY_H, BaseFont.EMBEDDED,(float) pi.Font.Size,fontStyle);
|
||||
font = FontFactory.GetFont(pi.Font.Family, BaseFont.IDENTITY_H, BaseFont.EMBEDDED, (float)pi.Font.Size, fontStyle);
|
||||
underline = pi.Font.WindowsFont.Underline;
|
||||
}
|
||||
Chunk chk = new Chunk("INITIALS", font);
|
||||
if(underline)
|
||||
if (underline)
|
||||
chk.SetUnderline(new iTextSharp.text.Color(sysColor), 0, 0.05F, 0, -.131F, PdfContentByte.LINE_CAP_ROUND); // Relative Based upon font size
|
||||
Phrase ph = new Phrase(chk);
|
||||
ct.AddElement(ph);
|
||||
@ -1362,7 +1362,7 @@ namespace Volian.Print.Library
|
||||
// numbers were determined by trial and error.
|
||||
|
||||
// only add gap if centered, i.e. in 2 column mode & table is centered
|
||||
if (MyItemInfo.ColumnMode > 0 && (!MyItemInfo.FormatStepData.Type.Contains("AER") && !MyItemInfo.IsInRNO))
|
||||
if (MyItemInfo.ColumnMode > 0 && (!MyItemInfo.FormatStepData.Type.Contains("AER") && !MyItemInfo.IsInRNO))
|
||||
{
|
||||
float top = CalculateYOffset(yPageStart, yTopMargin) - (7 * MyPageHelper.YMultiplier);
|
||||
float adjtop = 0;
|
||||
@ -1384,7 +1384,7 @@ namespace Volian.Print.Library
|
||||
if (!Rtf2Pdf.PdfDebug) return "No Path";
|
||||
int profileDepth = ProfileTimer.Push(">>>> vlnParagraph.DebugInfo");
|
||||
string retval = string.Format("DebugID = {0}, ID={1} Type={2} TypeName='{3}' StepLevel={4} ShortPath={5} Width={6} Left={7} YOffset={8}",
|
||||
DebugId, MyItemInfo.ItemID, MyItemInfo.FormatStepType, MyItemInfo.FormatStepData == null ? "NoStepData" : MyItemInfo.FormatStepData.Type, MyItemInfo.StepLevel, MyItemInfo.ShortPath, Width, XOffset, YOffset);
|
||||
DebugId, MyItemInfo.ItemID, MyItemInfo.FormatStepType, MyItemInfo.FormatStepData == null ? "NoStepData" : MyItemInfo.FormatStepData.Type, MyItemInfo.StepLevel, MyItemInfo.ShortPath, Width, XOffset, YOffset);
|
||||
ProfileTimer.Pop(profileDepth);
|
||||
return retval;
|
||||
}
|
||||
@ -1474,7 +1474,7 @@ namespace Volian.Print.Library
|
||||
return (prTab + thisTab.Trim()).TrimEnd(".".ToCharArray());
|
||||
}
|
||||
private static bool DoSubs = true; // flag whether to print substeps (don't if doing continued checklist header)
|
||||
protected float _ContinueHeight=0;
|
||||
protected float _ContinueHeight = 0;
|
||||
public virtual float ContinueHeight
|
||||
{
|
||||
get
|
||||
@ -1485,7 +1485,7 @@ namespace Volian.Print.Library
|
||||
&& MyItemInfo.MyDocStyle.Continue.Top.Message.Contains("%s")
|
||||
&& MyItemInfo.MyDocStyle.Continue.Top.Message.ToUpper().EndsWith(" (Continued)".ToUpper()))
|
||||
{
|
||||
string suffix = MyItemInfo.MyDocStyle.Continue.Top.Message.Replace("%sR","").Replace("%s","");
|
||||
string suffix = MyItemInfo.MyDocStyle.Continue.Top.Message.Replace("%sR", "").Replace("%s", "");
|
||||
_ContinueHeight = GetParagraphHeight(MyContentByte, IParagraph, suffix, Width);
|
||||
}
|
||||
ProfileTimer.Pop(profileDepth);
|
||||
@ -1561,7 +1561,7 @@ namespace Volian.Print.Library
|
||||
// out the variable that flags a continue message
|
||||
MyPageHelper.OldTemplateContMsg = false;
|
||||
|
||||
if(DebugText.IsOpen) DebugText.WriteLine("ToPdf1:{0},'{1}',{2},{3},{4},{5}", MyItemInfo.ItemID, MyItemInfo.ShortPath, XOffset, yLocation, yPageStart, YTopMost);
|
||||
if (DebugText.IsOpen) DebugText.WriteLine("ToPdf1:{0},'{1}',{2},{3},{4},{5}", MyItemInfo.ItemID, MyItemInfo.ShortPath, XOffset, yLocation, yPageStart, YTopMost);
|
||||
int profileDepth1 = ProfileTimer.Push(">>>> vlnParagraph.Paginate");
|
||||
int paginate = Paginate(yLocation, yTopMargin, yBottomMargin);
|
||||
ProfileTimer.Pop(profileDepth1);
|
||||
@ -1577,7 +1577,7 @@ namespace Volian.Print.Library
|
||||
// if this has a caution/note with supinfo, that is id that needs to go in pagination list, unless it is in there.
|
||||
int aboveSupinfoId = ChildrenAboveHaveSupInfo();
|
||||
if (supInfoSect.StepSectPageBreaksForSupInfo.Contains(aboveSupinfoId)) aboveSupinfoId = -1;
|
||||
supInfoSect.StepSectPageBreaksForSupInfo.Add(aboveSupinfoId!=-1?aboveSupinfoId:MyItemInfo.SupInfos[0].ItemID);
|
||||
supInfoSect.StepSectPageBreaksForSupInfo.Add(aboveSupinfoId != -1 ? aboveSupinfoId : MyItemInfo.SupInfos[0].ItemID);
|
||||
MyPromsPrinter.NeedSupInfoBreak = false;
|
||||
}
|
||||
bool itemIsPrinted = false;
|
||||
@ -1655,19 +1655,19 @@ namespace Volian.Print.Library
|
||||
yPageStart -= SixLinesPerInch;
|
||||
if (MyPageHelper.ParaBreaks.Count > 0 && MyPageHelper.ParaBreaks[0].CompressFirstPartOfStep)
|
||||
MyPageHelper.YMultiplier = _SevenLinesPerInch / SixLinesPerInch;
|
||||
if(CompressFoldout)
|
||||
if (CompressFoldout)
|
||||
MyPageHelper.YMultiplier = _SevenLinesPerInch / SixLinesPerInch;
|
||||
|
||||
///else
|
||||
/// MyPageHelper.YMultiplier = 1;
|
||||
break;
|
||||
// .oooooo. .o
|
||||
// d8P' `Y8b o888
|
||||
//888 .oooo. .oooo.o .ooooo. 888
|
||||
//888 `P )88b d88( "8 d88' `88b 888
|
||||
//888 .oP"888 `"Y88b. 888ooo888 888
|
||||
//`88b ooo d8( 888 o. )88b 888 .o 888
|
||||
// `Y8bood8P' `Y888""8o 8""888P' `Y8bod8P' o888o
|
||||
// .oooooo. .o
|
||||
// d8P' `Y8b o888
|
||||
//888 .oooo. .oooo.o .ooooo. 888
|
||||
//888 `P )88b d88( "8 d88' `88b 888
|
||||
//888 .oP"888 `"Y88b. 888ooo888 888
|
||||
//`88b ooo d8( 888 o. )88b 888 .o 888
|
||||
// `Y8bood8P' `Y888""8o 8""888P' `Y8bod8P' o888o
|
||||
case 1: // Break on High Level Step
|
||||
if (MyPromsPrinter.SupInfoPrintType == E_SupInfoPrintType.DoPageBreaks)
|
||||
{
|
||||
@ -1678,7 +1678,7 @@ namespace Volian.Print.Library
|
||||
else MyPromsPrinter.NeedSupInfoBreak = true;
|
||||
supInfoSect.StepSectPageBreaks.Add(MyItemInfo.ItemID);
|
||||
}
|
||||
YTopMost=OutputOtherPageSteps(cb, YTopMost, yPageStart, yTopMargin, yBottomMargin);
|
||||
YTopMost = OutputOtherPageSteps(cb, YTopMost, yPageStart, yTopMargin, yBottomMargin);
|
||||
docstyle = MyItemInfo.MyDocStyle;
|
||||
if (MyPageHelper.NotesToFootNotes != null && MyPageHelper.NotesToFootNotes.Count > 0) MyPageHelper.NotesToFootNotesYoffset = CalculateYLocation(yLocation, yTopMargin);
|
||||
bool doSectionContinue = !MyItemInfo.IsSection && ((docstyle.StructureStyle.Style & E_DocStructStyle.BottomSectionContinue) == E_DocStructStyle.BottomSectionContinue);
|
||||
@ -1715,10 +1715,10 @@ namespace Volian.Print.Library
|
||||
// preceeding foldout.
|
||||
if (MyItemInfo.FoldoutIndex() <= -1)
|
||||
{
|
||||
MyPageHelper.OnBlankPage = true;
|
||||
cb.PdfDocument.Add(new iTextSharp.text.Table(1));
|
||||
MyPromsPrinter.NewPage();
|
||||
//_MyLog.InfoFormat("NewPage 10 blank {0}", cb.PdfWriter.CurrentPageNumber);
|
||||
MyPageHelper.OnBlankPage = true;
|
||||
cb.PdfDocument.Add(new iTextSharp.text.Table(1));
|
||||
MyPromsPrinter.NewPage();
|
||||
//_MyLog.InfoFormat("NewPage 10 blank {0}", cb.PdfWriter.CurrentPageNumber);
|
||||
}
|
||||
}
|
||||
// See comments under case 0 explaining supinfo/facing page processing.
|
||||
@ -1746,7 +1746,7 @@ namespace Volian.Print.Library
|
||||
DoCheckOffHeader(cb, MyItemInfo, yLocation, yTopMargin, yPageStart);
|
||||
SectionTopMessage(cb, yTopMargin, yLocation); // does wcntraining & suppinfo section title
|
||||
if (MyPageHelper.CreatingSupInfoPage) yPageStart -= (2 * SixLinesPerInch);
|
||||
if (doSectionContinue ) DoTopContinueMsg(cb, ref yPageStart, yTopMargin, docstyle , null);
|
||||
if (doSectionContinue) DoTopContinueMsg(cb, ref yPageStart, yTopMargin, docstyle, null);
|
||||
// If "ContinueSectionHeader" (format flag) is true then print the section title with "(Continued)" appended to it
|
||||
if (!MyItemInfo.IsSection && MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.ContinueSectionHeader && (!MyItemInfo.IsSection || MyItemInfo.IsSeparateSubsection))
|
||||
{
|
||||
@ -1773,7 +1773,7 @@ namespace Volian.Print.Library
|
||||
else MyPromsPrinter.NeedSupInfoBreak = true;
|
||||
supInfoSect.StepSectPageBreaks.Add(MyItemInfo.ItemID);
|
||||
}
|
||||
YTopMost=OutputOtherPageSteps(cb, YTopMost, yPageStart, yTopMargin, yBottomMargin);
|
||||
YTopMost = OutputOtherPageSteps(cb, YTopMost, yPageStart, yTopMargin, yBottomMargin);
|
||||
docstyle = MyItemInfo.MyDocStyle;
|
||||
bool doAlarmBox = false;
|
||||
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm)
|
||||
@ -1878,24 +1878,24 @@ namespace Volian.Print.Library
|
||||
// in the document style that includes 'Continued'
|
||||
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvert)
|
||||
{
|
||||
string myMsg = MyItemInfo.MyDocStyle.Continue.Top.Message;
|
||||
if (myMsg == null || myMsg == "")
|
||||
{
|
||||
// There is no message, but still need to check if there is a Section Title Continued message:
|
||||
// This was added for BGE OI34 (if break was within step, no section title continue message was printed)
|
||||
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.ContinueSectionHeader)
|
||||
{
|
||||
SectionConfig sch = MyItemInfo.ActiveSection.MyConfig as SectionConfig;
|
||||
doSectionTitleContinued = (sch == null || sch.Section_PrintHdr == "Y") && !MyItemInfo.MyDocStyle.CancelSectTitle;
|
||||
}
|
||||
else
|
||||
doSectionTitleContinued = false;
|
||||
}
|
||||
else
|
||||
string myMsg = MyItemInfo.MyDocStyle.Continue.Top.Message;
|
||||
if (myMsg == null || myMsg == "")
|
||||
{
|
||||
// There is no message, but still need to check if there is a Section Title Continued message:
|
||||
// This was added for BGE OI34 (if break was within step, no section title continue message was printed)
|
||||
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.ContinueSectionHeader)
|
||||
{
|
||||
SectionConfig sch = MyItemInfo.ActiveSection.MyConfig as SectionConfig;
|
||||
doSectionTitleContinued = (sch == null || sch.Section_PrintHdr == "Y") && !MyItemInfo.MyDocStyle.CancelSectTitle;
|
||||
}
|
||||
else
|
||||
doSectionTitleContinued = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
SectionConfig sch = MyItemInfo.ActiveSection.MyConfig as SectionConfig;
|
||||
doSectionTitleContinued = (sch == null || sch.Section_PrintHdr == "Y") && !MyItemInfo.MyDocStyle.CancelSectTitle;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1903,12 +1903,12 @@ namespace Volian.Print.Library
|
||||
doSectionTitleContinued = (sch == null || sch.Section_PrintHdr == "Y") && !MyItemInfo.MyDocStyle.CancelSectTitle;
|
||||
}
|
||||
}
|
||||
addExtraLines = SectionTopMessage(cb, yTopMargin, yLocation); // this does wcntraining top section continue message and supplemental info message
|
||||
addExtraLines = SectionTopMessage(cb, yTopMargin, yLocation); // this does wcntraining top section continue message and supplemental info message
|
||||
if (MyPageHelper.CreatingSupInfoPage) yPageStart -= (2 * SixLinesPerInch);
|
||||
if (!addExtraLines && (!doSectionTitleContinued || !SectionShowTitles))
|
||||
addExtraLines = DoTopContinueMsg(cb, ref yPageStart, yTopMargin, docstyle, doThreeContinues && MyItemInfo.MyParent != null && MyItemInfo.MyParent.MyTab != null ? MyItemInfo.MyParent.MyTab.CleanText : null);
|
||||
|
||||
if (CompressPartOfStep)
|
||||
if (CompressPartOfStep)
|
||||
{
|
||||
MyPageHelper.YMultiplier = _SevenLinesPerInch / SixLinesPerInch;
|
||||
CompressPartOfStep = false;
|
||||
@ -1935,13 +1935,13 @@ namespace Volian.Print.Library
|
||||
if (MyItemInfo.MyPrevious != null && MyItemInfo.MyPrevious.TemplateIndex > 0 && MyItemInfo.ActiveFormat.PlantFormat.FormatData.Templates[MyItemInfo.MyPrevious.TemplateIndex].hmacro > 0)
|
||||
yPageStart += (3 * SixLinesPerInch);
|
||||
}
|
||||
// Now check if this is a template type step & if so, add the HLS's prefix/suffix to it.
|
||||
// Now check if this is a template type step & if so, add the HLS's prefix/suffix to it.
|
||||
// Since the entire checklist HLS (checklist table header) is printed as part of the
|
||||
// continue, create a new paragraph to handle pagination and printing.
|
||||
if (MyItemInfo.MyHLS != null && MyItemInfo.MyHLS.FormatStepData.UseSmartTemplate)
|
||||
{
|
||||
DoSubs = false;
|
||||
vlnParagraph smartPara = new vlnParagraph(MyParent.MyParent, cb, MyItemInfo.MyHLS, MyParent.XOffset, yPageStart, 0, 0, MyParent.MyItemInfo.ActiveFormat, null, " (Continued)", 0,false, MyPromsPrinter);
|
||||
vlnParagraph smartPara = new vlnParagraph(MyParent.MyParent, cb, MyItemInfo.MyHLS, MyParent.XOffset, yPageStart, 0, 0, MyParent.MyItemInfo.ActiveFormat, null, " (Continued)", 0, false, MyPromsPrinter);
|
||||
smartPara.PrintHeader = true;
|
||||
float mytmpfloat = smartPara.ParagraphToPdf(cb, yPageStart, yTopMargin, yBottomMargin);
|
||||
yPageStart -= smartPara.Height;
|
||||
@ -1966,7 +1966,7 @@ namespace Volian.Print.Library
|
||||
}
|
||||
if (!firstHighLevelStep)
|
||||
{
|
||||
YTopMost=OutputOtherPageSteps(cb, YTopMost, yPageStart, yTopMargin, yBottomMargin);
|
||||
YTopMost = OutputOtherPageSteps(cb, YTopMost, yPageStart, yTopMargin, yBottomMargin);
|
||||
if (MyPageHelper.NotesToFootNotes != null && MyPageHelper.NotesToFootNotes.Count > 0) MyPageHelper.NotesToFootNotesYoffset = CalculateYLocation(yLocation, yTopMargin);
|
||||
MyPromsPrinter.NewPage(); // HLS (7 lpi) breakif (MyItemInfo.IsSection)
|
||||
//_MyLog.InfoFormat("NewPage 12 {0}", cb.PdfWriter.CurrentPageNumber);
|
||||
@ -2059,7 +2059,7 @@ namespace Volian.Print.Library
|
||||
// get to the correct section for the message, i.e. if on a section, the message should be the parent
|
||||
// section (not the activesection which is myself); if on a step, the message should be the active section
|
||||
ItemInfo sectForCont = MyItemInfo.IsSection && MyItemInfo.MyParent.IsSection ? MyItemInfo.MyParent : MyItemInfo.ActiveSection;
|
||||
sectContPara = new vlnParagraph(MyParent.MyParent, cb, sectForCont, MyParent.XOffset, 0, 0, 0, MyParent.MyItemInfo.ActiveFormat, null, (contMsg == null || contMsg == "") ? " (Continued)" : contMsg, 0, false,MyPromsPrinter);
|
||||
sectContPara = new vlnParagraph(MyParent.MyParent, cb, sectForCont, MyParent.XOffset, 0, 0, 0, MyParent.MyItemInfo.ActiveFormat, null, (contMsg == null || contMsg == "") ? " (Continued)" : contMsg, 0, false, MyPromsPrinter);
|
||||
if (sectContPara.PartsLeft.Count > 0)
|
||||
{
|
||||
vlnTab vt = sectContPara.MyTab;
|
||||
@ -2082,7 +2082,7 @@ namespace Volian.Print.Library
|
||||
if (sectContPara.SectionContinuePrinted)
|
||||
yPageStart -= sectContPara.Height + SixLinesPerInch;
|
||||
else
|
||||
Console.WriteLine("'No Header 1','{0}',{1},{2}",MyItemInfo.ShortPath,MyItemInfo.MyDocStyle.CancelSectTitle,MyItemInfo.MyDocStyle.SpecialStepsFoldout);
|
||||
Console.WriteLine("'No Header 1','{0}',{1},{2}", MyItemInfo.ShortPath, MyItemInfo.MyDocStyle.CancelSectTitle, MyItemInfo.MyDocStyle.SpecialStepsFoldout);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -2115,10 +2115,10 @@ namespace Volian.Print.Library
|
||||
// 'this' below is a highlevel step, and the only time that ParaBreaks[0] will == 'this' is
|
||||
// when the PageBreakOnStep flag is true.
|
||||
if (MyPageHelper.ParaBreaks != null && MyPageHelper.ParaBreaks.Count > 0 &&
|
||||
MyPageHelper.ParaBreaks[0] == this)
|
||||
MyPageHelper.ParaBreaks[0] == this && this.MyItemInfo.FormatStepData.PageBreakOnStep)// B2017-224 Top Continue Messages Add check for PageBreakOnStep 9/26/2017 Ginna SAMGs SAG-8 Step 4
|
||||
{
|
||||
ShowPageBreak(1, CheckForCompression("PageBreakOnStep/Caution/Note HLS"), "Yes", YTop - YBottomMost, yTopMargin - yBottomMargin, yTopMargin - yBottomMargin, false);
|
||||
YTopMost=OutputOtherPageSteps(cb, YTopMost, yPageStart, yTopMargin, yBottomMargin);
|
||||
YTopMost = OutputOtherPageSteps(cb, YTopMost, yPageStart, yTopMargin, yBottomMargin);
|
||||
MyPageHelper.BottomMessage.Clear();
|
||||
MyPageHelper.TopMessage = null;
|
||||
MyPromsPrinter.NewPage();
|
||||
@ -2209,7 +2209,7 @@ namespace Volian.Print.Library
|
||||
if (myMsg.Contains("%-12s"))
|
||||
myMsg = myMsg.Replace("%-12s", MyItemInfo.MyProcedure.DisplayNumber.PadRight(12));
|
||||
float xpos = 0;
|
||||
if (yTopMargin-docstyle.Layout.PageLength>=msg_yLocation && docstyle.End.Message != null && docstyle.End.Message != "" && docstyle.End.Flag<=2) _MyLog.WarnFormat("End Message LOW on page: {0}, {1}, {2}, Page {3}",msg_yLocation, MyItemInfo.ItemID, MyItemInfo.ShortPath, MyPageHelper.CurrentPageNumber+1);
|
||||
if (yTopMargin - docstyle.Layout.PageLength >= msg_yLocation && docstyle.End.Message != null && docstyle.End.Message != "" && docstyle.End.Flag <= 2) _MyLog.WarnFormat("End Message LOW on page: {0}, {1}, {2}, Page {3}", msg_yLocation, MyItemInfo.ItemID, MyItemInfo.ShortPath, MyPageHelper.CurrentPageNumber + 1);
|
||||
if ((docstyle.End.Margin ?? 0) != 0)
|
||||
{
|
||||
xpos = (float)docstyle.Layout.LeftMargin + (float)docstyle.End.Margin;
|
||||
@ -2397,12 +2397,12 @@ namespace Volian.Print.Library
|
||||
if (MyItemInfo.MyDocStyle.SectTop != null && MyItemInfo.MyDocStyle.SectTop.Message != null)
|
||||
{
|
||||
float sectMsgY = 0;
|
||||
if (PartsContainer == null || PartsContainer.Count==0)
|
||||
if (PartsContainer == null || PartsContainer.Count == 0)
|
||||
sectMsgY = CalculateYLocation(YTop, yTopMargin);
|
||||
else
|
||||
{
|
||||
// B2016-134: Account for section top continue if item has container, i.e. move section top continue message above the container
|
||||
sectMsgY = CalculateYLocation(YTopMost-(SixLinesPerInch*3), yTopMargin); // 3 is # of lines: header, box, blank line moving up page
|
||||
sectMsgY = CalculateYLocation(YTopMost - (SixLinesPerInch * 3), yTopMargin); // 3 is # of lines: header, box, blank line moving up page
|
||||
addextra = true;
|
||||
}
|
||||
VE_Font sctMsgFont = MyItemInfo.MyDocStyle.SectTop.Font;
|
||||
@ -2510,17 +2510,17 @@ namespace Volian.Print.Library
|
||||
// we therefore need to adjust the y location of multiple step designors attached tothe top continue message
|
||||
if (MyPageHelper.TopMessageRs.Count > 3)
|
||||
{
|
||||
Rsidx = MyPageHelper.TopMessageRs.Count - 1;
|
||||
rtxt = MyPageHelper.TopMessageRs[Rsidx].Text;
|
||||
Rsidx = MyPageHelper.TopMessageRs.Count - 1;
|
||||
rtxt = MyPageHelper.TopMessageRs[Rsidx].Text;
|
||||
// find the number of lines to shift existing TopMessageRs step designators down
|
||||
istr = rtxt.IndexOf("\\line", 0);
|
||||
while (istr != -1)
|
||||
{
|
||||
nlcnt++;
|
||||
istr = rtxt.IndexOf("\\line", istr + 1);
|
||||
}
|
||||
istr = rtxt.IndexOf("\\line", 0);
|
||||
while (istr != -1)
|
||||
{
|
||||
nlcnt++;
|
||||
istr = rtxt.IndexOf("\\line", istr + 1);
|
||||
}
|
||||
// move the previous TopMessageRs step designators down
|
||||
Rsidx -= 2; // index to the previous step desginator
|
||||
Rsidx -= 2; // index to the previous step desginator
|
||||
while (Rsidx > 0)
|
||||
{
|
||||
MyPageHelper.TopMessageRs[Rsidx].YOffset -= (nlcnt * SixLinesPerInch);
|
||||
@ -2677,7 +2677,7 @@ namespace Volian.Print.Library
|
||||
useAerParaForTab = MyParent;
|
||||
concataerTab = MyParent.MyTab != null ? MyParent.MyTab.Text.TrimEnd() : "";
|
||||
xoffTab = 0; // no rno tab
|
||||
xoffMsg = ToInt(MyItemInfo.ActiveFormat.MyStepSectionLayoutData.ColRTable, 1) + (float)MyItemInfo.MyDocStyle.Layout.LeftMargin + ((useAerParaForTab != null && useAerParaForTab.MyTab!=null) ? useAerParaForTab.MyTab.Width : 7.2f);
|
||||
xoffMsg = ToInt(MyItemInfo.ActiveFormat.MyStepSectionLayoutData.ColRTable, 1) + (float)MyItemInfo.MyDocStyle.Layout.LeftMargin + ((useAerParaForTab != null && useAerParaForTab.MyTab != null) ? useAerParaForTab.MyTab.Width : 7.2f);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -2779,7 +2779,7 @@ namespace Volian.Print.Library
|
||||
{ // Adjusted Continue Message Y Offset
|
||||
//DebugPagination.WriteLine("====>> {0},'{1}'", msg_yLocation, MyItemInfo.ShortPath);
|
||||
//msg_yLocation = (float) MyPageHelper.BottomContent - SixLinesPerInch; // Account for how low the lowest Item is on the page
|
||||
float msg_yLocationOld =msg_yLocation= yBottomMargin + (docstyle.Layout.FooterLength ?? 0);
|
||||
float msg_yLocationOld = msg_yLocation = yBottomMargin + (docstyle.Layout.FooterLength ?? 0);
|
||||
if (MyPageHelper.BottomContent != null)
|
||||
msg_yLocation = Math.Min(yBottomMargin + (docstyle.Layout.FooterLength ?? 0), (float)MyPageHelper.BottomContent - SixLinesPerInch);// RHM20150525 - Table Scrunch
|
||||
if (msg_yLocationOld != msg_yLocation)
|
||||
@ -2788,7 +2788,7 @@ namespace Volian.Print.Library
|
||||
break;
|
||||
case E_ContBottomLoc.BtwnTextAndBottom: // place continue string between end of text & bottom of page
|
||||
msg_yLocation = msg_yLocation + yLocation - ((yLocation - yBottomMargin) / 2); // +SixLinesPerInch; // (need this for IP3)
|
||||
msg_yLocation = Math.Max(msg_yLocation, yBottomMargin+SixLinesPerInch);
|
||||
msg_yLocation = Math.Max(msg_yLocation, yBottomMargin + SixLinesPerInch);
|
||||
break;
|
||||
case E_ContBottomLoc.BottomOfPage: // place continue message at bottom of page
|
||||
//msg_yLocation = yBottomMargin + 2 * SixLinesPerInch + (float)docstyle.Layout.FooterLength; // 2 lines above bottom margin
|
||||
@ -3043,7 +3043,7 @@ namespace Volian.Print.Library
|
||||
// MNS Pagination - Mike Weiner Case 1a to keep step together with any non-sequential substeps (ANDs, EQ List)
|
||||
bool keepEqListTogether = ChildrenBelow[0].MyItemInfo.ActiveFormat.MyStepSectionLayoutData.PutOnPageByItself;
|
||||
if (keepEqListTogether && !ChildrenBelow[0].MyItemInfo.IsSequential && !this.MyItemInfo.IsHigh) // Extend to the last Item.
|
||||
para = ChildrenBelow[ChildrenBelow.Count - 1].GetFirstPieceLastPart();
|
||||
para = ChildrenBelow[ChildrenBelow.Count - 1].GetFirstPieceLastPart();
|
||||
else
|
||||
para = ChildrenBelow[0].GetFirstPieceLastPart();
|
||||
}
|
||||
@ -3093,8 +3093,8 @@ namespace Volian.Print.Library
|
||||
// from the beginning of the step.
|
||||
// Note that yLocation is negative to have items in descending
|
||||
// order so that adding yTop decrements their values.
|
||||
if(!myList[stepLevel].ContainsKey(yTop - yLocation))
|
||||
myList[stepLevel].Add(yTop - yLocation, para);
|
||||
if (!myList[stepLevel].ContainsKey(yTop - yLocation))
|
||||
myList[stepLevel].Add(yTop - yLocation, para);
|
||||
}
|
||||
if (myList[stepLevel].Count == 0)
|
||||
CleanupListStepLevel.Add(stepLevel);
|
||||
@ -3131,7 +3131,7 @@ namespace Volian.Print.Library
|
||||
private static VlnFlexGrid _MyFlexGrid = new VlnFlexGrid(1, 1);
|
||||
public static VlnFlexGrid MyFlexGrid
|
||||
{
|
||||
get { return _MyFlexGrid; }
|
||||
get { return _MyFlexGrid; }
|
||||
}
|
||||
private pkParagraph _MyPlaceKeeper = null;
|
||||
public pkParagraph MyPlaceKeeper
|
||||
@ -3276,12 +3276,12 @@ namespace Volian.Print.Library
|
||||
// if this is a Note or Caution off of a Note or Caution (Catawba EG/1A/CSAM/SACGR1 step 1)
|
||||
// then indent it the length of its tab
|
||||
if (itemInfo.IsCaution || itemInfo.IsNote)
|
||||
XOffset += (itemInfo.FormatStepData.TabData.IdentPrint.Length -1) * 6;
|
||||
XOffset += (itemInfo.FormatStepData.TabData.IdentPrint.Length - 1) * 6;
|
||||
else
|
||||
if (itemInfo.ActiveFormat.MyStepSectionLayoutData.DevNoteOrCautionTabOffset != null)
|
||||
XOffset = float.Parse(itemInfo.ActiveFormat.MyStepSectionLayoutData.DevNoteOrCautionTabOffset);
|
||||
else
|
||||
XOffset += 72 * (itemInfo.FormatStepData.CautionOrNoteSubstepIndent == null ? 0 : (float)itemInfo.FormatStepData.CautionOrNoteSubstepIndent / (float)itemInfo.FormatStepData.Font.CPI);
|
||||
XOffset += 72 * (itemInfo.FormatStepData.CautionOrNoteSubstepIndent == null ? 0 : (float)itemInfo.FormatStepData.CautionOrNoteSubstepIndent / (float)itemInfo.FormatStepData.Font.CPI);
|
||||
}
|
||||
|
||||
if (itemInfo.IsStep && itemInfo.MyHLS != null && itemInfo.MyHLS.FormatStepData.UseSmartTemplate &&
|
||||
@ -3455,7 +3455,7 @@ namespace Volian.Print.Library
|
||||
XOffset += diff;
|
||||
adjustAgain = false;
|
||||
}
|
||||
else if(mytab != null)
|
||||
else if (mytab != null)
|
||||
{
|
||||
float adjusttab = (itemInfo.MyParent.IsHigh) ? itemInfo.FormatStepData.AdjHighLevelTab ?? 0 : 0;
|
||||
mytab.XOffset += (mytab.Width + adjusttab);
|
||||
@ -3471,11 +3471,11 @@ namespace Volian.Print.Library
|
||||
if (itemInfo.IsCautionOrNotePart && maxRNO == 0 && itemInfo.MyActiveSection.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.LimitCautionNoteWidthToHLS)
|
||||
{
|
||||
float wMax = MyHighLevelParagraph.Width + MyHighLevelParagraph.XOffset - XOffset;
|
||||
if (wMax < Width && (Width + XOffset > MyItemInfo.MyDocStyle.Layout.PageWidth) ) Width = wMax;
|
||||
if (wMax < Width && (Width + XOffset > MyItemInfo.MyDocStyle.Layout.PageWidth)) Width = wMax;
|
||||
}
|
||||
}
|
||||
|
||||
if (itemInfo.IsSection && MyParent == null && itemInfo.MyDocStyle.SupplementalInformation && MyPromsPrinter.SupInfoPrintType==E_SupInfoPrintType.Merge)
|
||||
if (itemInfo.IsSection && MyParent == null && itemInfo.MyDocStyle.SupplementalInformation && MyPromsPrinter.SupInfoPrintType == E_SupInfoPrintType.Merge)
|
||||
{
|
||||
_SupInfoSection = new vlnParagraph(this, cb, itemInfo, xoff, yoff, rnoLevel, maxRNO, formatInfo, null, null, yoffRightParent, false, pp);
|
||||
MyPromsPrinter.SupInfoPdfPageCount = -1;
|
||||
@ -3509,7 +3509,7 @@ namespace Volian.Print.Library
|
||||
}
|
||||
if (itemInfo.MyHeader != null && itemInfo.MyHeader.Text != null && !doSectTab)
|
||||
yoff += SetHeader(this, cb, itemInfo, formatInfo);
|
||||
else if(itemInfo.FormatStepData != null && itemInfo.FormatStepData.SeparateBox && itemInfo.FirstSibling.MyHeader != null && itemInfo.FirstSibling.MyHeader.Text != null)
|
||||
else if (itemInfo.FormatStepData != null && itemInfo.FormatStepData.SeparateBox && itemInfo.FirstSibling.MyHeader != null && itemInfo.FirstSibling.MyHeader.Text != null)
|
||||
yoff += SetHeader(this, cb, itemInfo.FirstSibling, formatInfo);
|
||||
float yoffLeft = yoff;
|
||||
if (ChildrenAbove != null)
|
||||
@ -3521,7 +3521,7 @@ namespace Volian.Print.Library
|
||||
// For deviations, the Cautions are always in the same place.
|
||||
// Fix for Catawba E-1 deviation for step 10. Has note/caution off of a paragraph instead of HLS
|
||||
float xoffDev = (float)itemInfo.MyDocStyle.Layout.LeftMargin;
|
||||
if(loadChildren) yoffLeft = ChildrenLeft.Add(cb, itemInfo.Cautions, xoff, yoff, yoff, rnoLevel, maxRNO, formatInfo);
|
||||
if (loadChildren) yoffLeft = ChildrenLeft.Add(cb, itemInfo.Cautions, xoff, yoff, yoff, rnoLevel, maxRNO, formatInfo);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -3652,11 +3652,11 @@ namespace Volian.Print.Library
|
||||
{
|
||||
// We need to strip out the underline style from the font before putting out
|
||||
// the extra line.
|
||||
VE_Font vf=MyItemInfo.FormatStepData.Font;
|
||||
VE_Font vf = MyItemInfo.FormatStepData.Font;
|
||||
E_Style sty = (E_Style)vf.Style;
|
||||
if ((sty & E_Style.Underline) != 0)
|
||||
sty ^= E_Style.Underline;
|
||||
vf = new VE_Font(vf.Family, (int) vf.Size, sty,(float) vf.CPI);
|
||||
vf = new VE_Font(vf.Family, (int)vf.Size, sty, (float)vf.CPI);
|
||||
this.PartsAbove.Add(new vlnText(cb, this, " ", " ", 72, yoff, vf));
|
||||
}
|
||||
|
||||
@ -4138,7 +4138,7 @@ namespace Volian.Print.Library
|
||||
else // AER or RNO Table
|
||||
if (loadChildren)
|
||||
yoff = ChildrenBelow.Add(cb, itemInfo.Tables, XOffset, yoff + yoffadj, yOffRight + yoffadj, rnoLevel, maxRNO, formatInfo);
|
||||
}
|
||||
}
|
||||
yOffRight = Math.Max(yOffRight, yoffLeft);
|
||||
// Look for the meta section case where the 'Editable' flag is set to 'N', which means that
|
||||
// these steps should not be printed:
|
||||
@ -4227,7 +4227,7 @@ namespace Volian.Print.Library
|
||||
// how 16bit proms did this). The following use of yadjSep and YBottomForBox handle that
|
||||
float yadjSep = (MyItemInfo.MyHLS.FormatStepData.StepLayoutData.STBoxindex != null && MyItemInfo.MyHLS.FormatStepData.StepLayoutData.STBoxindex >= 0 &&
|
||||
MyItemInfo.MyHLS.RNOs != null && MyItemInfo.MyHLS.RNOs.Count > 0) ? 2 * SixLinesPerInch : 0;
|
||||
vlnRNOSeparator myRnoSep = new vlnRNOSeparator(this, cb, tmpRnoSepStr, xsep, yoff+yadjSep, formatInfo, bottomChild == null ? true : bottomChild.MyItemInfo.HasChangeBar);
|
||||
vlnRNOSeparator myRnoSep = new vlnRNOSeparator(this, cb, tmpRnoSepStr, xsep, yoff + yadjSep, formatInfo, bottomChild == null ? true : bottomChild.MyItemInfo.HasChangeBar);
|
||||
// TODO: May need to handle more than one RNO column for RNO Separator
|
||||
if ((rno.LastRNO.MyItemInfo.HasChangeBar == false && bottomChild != null && bottomChild.MyItemInfo.HasChangeBar)
|
||||
|| (bottomChild != null && bottomChild.YBottom > rno.LastRNO.YBottomMost))
|
||||
@ -4258,7 +4258,7 @@ namespace Volian.Print.Library
|
||||
if ((MyItemInfo.IsHigh || MyItemInfo.IsCaution1) && MyItemInfo.MyDocStyle.LandscapePageList && MyItemInfo.MyDocStyle.ComponentList)
|
||||
{
|
||||
// put out line after step (for BGEVLV format)
|
||||
float macroY = YBottomMost-(0.25f * SixLinesPerInch);
|
||||
float macroY = YBottomMost - (0.25f * SixLinesPerInch);
|
||||
PartsLeft.Add(new vlnMacro((float)MyItemInfo.MyDocStyle.Layout.LeftMargin, macroY, "B9"));
|
||||
}
|
||||
|
||||
@ -4308,12 +4308,12 @@ namespace Volian.Print.Library
|
||||
int end = ai.SearchText.IndexOf("]");
|
||||
if (st != -1 && end != -1 && end > st)
|
||||
{
|
||||
string pref = ai.SearchText.Substring(st+1, end - st - 1); // annotation - parse out [xx]
|
||||
pref = Regex.Replace(pref,"{Up}",@"\u8593?", RegexOptions.IgnoreCase);
|
||||
pref = Regex.Replace(pref,"{Down}",@"\u8595?", RegexOptions.IgnoreCase);
|
||||
string pref = ai.SearchText.Substring(st + 1, end - st - 1); // annotation - parse out [xx]
|
||||
pref = Regex.Replace(pref, "{Up}", @"\u8593?", RegexOptions.IgnoreCase);
|
||||
pref = Regex.Replace(pref, "{Down}", @"\u8595?", RegexOptions.IgnoreCase);
|
||||
float xPref = atc.PrintableText_XLocation;
|
||||
if(AnnotationFont==null)
|
||||
AnnotationFont = new VE_Font(_MyItemInfo.FormatStepData.Font.Family,6,(E_Style)_MyItemInfo.FormatStepData.Font.Style,20F);
|
||||
if (AnnotationFont == null)
|
||||
AnnotationFont = new VE_Font(_MyItemInfo.FormatStepData.Font.Family, 6, (E_Style)_MyItemInfo.FormatStepData.Font.Style, 20F);
|
||||
PartsLeft.Add(new vlnText(cb, this, pref, pref, xPref, yoff, AnnotationFont));
|
||||
break;
|
||||
}
|
||||
@ -4431,7 +4431,7 @@ namespace Volian.Print.Library
|
||||
spFound = false;
|
||||
}
|
||||
results.Add(responsStr.Substring(start, lastspace - start).Trim(" ".ToCharArray()) + "\r\n");
|
||||
start = lastspace + (spFound?1:0); // increment start based on whether a space is found, i.e. if no space keep at 'indx'
|
||||
start = lastspace + (spFound ? 1 : 0); // increment start based on whether a space is found, i.e. if no space keep at 'indx'
|
||||
// width either is equal to width of text after the last space, or is zero if at the maxlen of width:
|
||||
width = (indx - lastspace - 1) > 0 ? indx - lastspace - 1 : 0;
|
||||
lastspace = 0;
|
||||
@ -4447,7 +4447,7 @@ namespace Volian.Print.Library
|
||||
{
|
||||
get
|
||||
{
|
||||
if(_Rtf == null)BuildRtf();
|
||||
if (_Rtf == null) BuildRtf();
|
||||
return _Rtf;
|
||||
}
|
||||
set { _Rtf = value; }
|
||||
@ -4903,7 +4903,7 @@ namespace Volian.Print.Library
|
||||
// In lines below, the 12 was used for Wolf Creek 2 column format, the pagewidth goes beyond the right border line so that
|
||||
// the tables, figures & equations were beyond the border. -12 takes it enough so that if boxed, it won't print out of border
|
||||
// We know this is not ideal.
|
||||
if (MyItemInfo.IsRtfRaw && (XOffset + (scale * Width) > xUpperLimit-12))
|
||||
if (MyItemInfo.IsRtfRaw && (XOffset + (scale * Width) > xUpperLimit - 12))
|
||||
XOffset = xUpperLimit - (scale * Width) - 12;
|
||||
if (!MyItemInfo.IsRtfRaw && XOffset + Width > xUpperLimit)
|
||||
XOffset = xUpperLimit - Width;
|
||||
@ -4940,7 +4940,7 @@ namespace Volian.Print.Library
|
||||
}
|
||||
if (MyItemInfo.Ordinal % everyNLines == 0 || MyItemInfo.NextItem == null) return SixLinesPerInch;
|
||||
// If the next table child is a figure, equation or a visio drawing add a blank line
|
||||
if (MyItemInfo.Tables != null && MyItemInfo.Tables.Count > 0 && MyItemInfo.Tables[0].MyContent.MyGrid == null) return SixLinesPerInch;
|
||||
if (MyItemInfo.Tables != null && MyItemInfo.Tables.Count > 0 && MyItemInfo.Tables[0].MyContent.MyGrid == null) return SixLinesPerInch;
|
||||
// Pagination issue to be used with yEndsWithBlankLine in Pagination code, but not checked in yet.
|
||||
//if (MyItemInfo.Ordinal % everyNLines == 0 || MyItemInfo.NextItem == null) return SixLinesPerInch;
|
||||
return 0;
|
||||
@ -4964,7 +4964,7 @@ namespace Volian.Print.Library
|
||||
{
|
||||
float macroXOffset = myMacro.MacroXOffSet ?? 0;
|
||||
float widthAdj = myMacro.SingleColWidthAdjust ?? 0; // set as negative number in format
|
||||
float rightTextEdge = (itemInfo.IsHigh)? XOffset + Width + mytab.XOffset:this.MyHighLevelParagraph.XOffset + this.MyHighLevelParagraph.Width;
|
||||
float rightTextEdge = (itemInfo.IsHigh) ? XOffset + Width + mytab.XOffset : this.MyHighLevelParagraph.XOffset + this.MyHighLevelParagraph.Width;
|
||||
x = (macroXOffset > 0) ? macroXOffset : rightTextEdge;
|
||||
if (rightTextEdge > x)
|
||||
Width += widthAdj;
|
||||
@ -5014,7 +5014,7 @@ namespace Volian.Print.Library
|
||||
chgIdTxt = sc == null ? null : sc.Step_ChangeID;
|
||||
}
|
||||
if (myPageHelper.ChangeBarDefinition.MyChangeBarText == PrintChangeBarText.ChgID)
|
||||
cbMess = chgIdTxt!=null?chgIdTxt:itemInfo.MyContent.UserID;
|
||||
cbMess = chgIdTxt != null ? chgIdTxt : itemInfo.MyContent.UserID;
|
||||
else if (myPageHelper.ChangeBarDefinition.MyChangeBarText == PrintChangeBarText.DateChgID)
|
||||
{
|
||||
string fmtDate = itemInfo.MyContent.DTS.ToShortDateString();
|
||||
@ -5025,7 +5025,7 @@ namespace Volian.Print.Library
|
||||
if (fmtDate.IndexOf("/", 3) == 1)
|
||||
fmtDate = fmtDate.Substring(0, 3) + "0" + fmtDate.Substring(3, fmtDate.Length - 3);
|
||||
}
|
||||
cbMess = (chgIdTxt!=null?chgIdTxt:itemInfo.MyContent.UserID) + @"\n" + fmtDate;
|
||||
cbMess = (chgIdTxt != null ? chgIdTxt : itemInfo.MyContent.UserID) + @"\n" + fmtDate;
|
||||
}
|
||||
else if (myPageHelper.ChangeBarDefinition.MyChangeBarText == PrintChangeBarText.RevNum)
|
||||
{
|
||||
@ -5088,7 +5088,7 @@ namespace Volian.Print.Library
|
||||
if (bxCautNote != null)
|
||||
rightEdge = (float)bxCautNote.End + 10; // used for notes and cautions in the Prairie Island Alarms format
|
||||
rightEdge = rightEdge / paragraph.MyItemInfo.FormatStepData.Font.CharsToTwips;
|
||||
return MyItemInfo.IsFigure?rightEdge+1:rightEdge; // B2017-111: Add a little more space between figure & change bar
|
||||
return MyItemInfo.IsFigure ? rightEdge + 1 : rightEdge; // B2017-111: Add a little more space between figure & change bar
|
||||
}
|
||||
if (fixedChgCol < -10 || fixedChgCol >= 0)
|
||||
return ((fixedChgCol > 0) ? fixedChgCol :
|
||||
@ -5134,7 +5134,7 @@ namespace Volian.Print.Library
|
||||
{
|
||||
int profileDepth = ProfileTimer.Push(">>>> GetRtf");
|
||||
_RtfSB = new StringBuilder();
|
||||
DisplayText vlntxt = new DisplayText(itemInfo, E_EditPrintMode.Print, E_ViewMode.View, true, E_FieldToEdit.StepText, false, prefix, suffix,MyPageHelper.MyPromsPrinter.RemoveTrailingHardReturnsAndManualPageBreaks);
|
||||
DisplayText vlntxt = new DisplayText(itemInfo, E_EditPrintMode.Print, E_ViewMode.View, true, E_FieldToEdit.StepText, false, prefix, suffix, MyPageHelper.MyPromsPrinter.RemoveTrailingHardReturnsAndManualPageBreaks);
|
||||
System.Drawing.Font myFont = vlntxt.TextFont.WindowsFont;
|
||||
if (!itemInfo.IsTable && StepRTB.MyFontFamily != null)
|
||||
// follow through in fixing an Out of Window Handles bug, use new function to see if
|
||||
@ -5328,12 +5328,12 @@ namespace Volian.Print.Library
|
||||
public float YSize // How big this paragraph is with all of its children
|
||||
{
|
||||
get
|
||||
{
|
||||
float ysize = SmartTemplateAdjust + _YBottomMost - _YTopMost;
|
||||
if (MyItemInfo.IsHigh && ((MyItemInfo.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DoubleBoxHLS) == E_DocStructStyle.DoubleBoxHLS))
|
||||
ysize += SixLinesPerInch;
|
||||
return ysize;
|
||||
}
|
||||
{
|
||||
float ysize = SmartTemplateAdjust + _YBottomMost - _YTopMost;
|
||||
if (MyItemInfo.IsHigh && ((MyItemInfo.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DoubleBoxHLS) == E_DocStructStyle.DoubleBoxHLS))
|
||||
ysize += SixLinesPerInch;
|
||||
return ysize;
|
||||
}
|
||||
}
|
||||
private ItemInfo _MyItemInfo;
|
||||
public ItemInfo MyItemInfo
|
||||
@ -5603,7 +5603,7 @@ namespace Volian.Print.Library
|
||||
{
|
||||
//Adjust Indent for Wolf Creek Background format flag
|
||||
float indentBG2 = itemInfo.IsPartOfBackgroundStep() ? itemInfo.FormatStepData.Font.CharsToTwips * 2 : 0;
|
||||
XOffset = childindent + MyParent.XOffset+ indentBG2;//(itemInfo.FormatStepData.Font.CharsToTwips * 2);
|
||||
XOffset = childindent + MyParent.XOffset + indentBG2;//(itemInfo.FormatStepData.Font.CharsToTwips * 2);
|
||||
// B2016-164: Added the following 'if' so that the width is not recalculated if in the alarm format & the parent has a template
|
||||
// B2016-168: The fix for 164 broke deviation document printing. The if statement was fixed for both:
|
||||
if (!itemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm || !UseTemplateWidthOrXOff(itemInfo.MyParent))
|
||||
@ -5735,7 +5735,7 @@ namespace Volian.Print.Library
|
||||
if (myTab != null) myTab.XOffset = (float)colOvrd; // set the note/caution tab offset to the colOverride
|
||||
return;
|
||||
}
|
||||
// put in for Point Beach (wep2) we don't want to do this if we are processing a boxed substep (cont. action substep)
|
||||
// put in for Point Beach (wep2) we don't want to do this if we are processing a boxed substep (cont. action substep)
|
||||
else if (bxIndx != null && (itemInfo.IsCaution || itemInfo.IsNote ||
|
||||
!itemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionPrintData.ContActBoxOnSubSteps))
|
||||
{
|
||||
@ -5865,7 +5865,7 @@ namespace Volian.Print.Library
|
||||
//}
|
||||
else // if no left justify, right align the tab
|
||||
{
|
||||
// The following fixes F2016-033: Print the Verification Point at left margin.
|
||||
// The following fixes F2016-033: Print the Verification Point at left margin.
|
||||
if (itemInfo.ActiveFormat.Name.ToUpper().StartsWith("VCB") && (itemInfo.FormatStepData.ColOverride ?? 0) > 0)
|
||||
{
|
||||
XOffset = (float)itemInfo.FormatStepData.ColOverride;
|
||||
@ -5896,10 +5896,10 @@ namespace Volian.Print.Library
|
||||
}
|
||||
private bool PreviousIsTitleWithTextBelow(ItemInfo itemInfo)
|
||||
{
|
||||
while(itemInfo.MyPrevious != null)
|
||||
while (itemInfo.MyPrevious != null)
|
||||
{
|
||||
if (itemInfo.MyPrevious.FormatStepData.Type == "TitleWithTextBelow") return true;
|
||||
itemInfo=itemInfo.MyPrevious;
|
||||
itemInfo = itemInfo.MyPrevious;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -6094,11 +6094,11 @@ namespace Volian.Print.Library
|
||||
XOffset += mycolT; // adjust caution/note text position
|
||||
if (PartsLeft != null && PartsLeft.Count > 0)// adjust tab position
|
||||
{
|
||||
if(myTab!=null && (itemInfo.IsNote || itemInfo.IsCaution))
|
||||
if (myTab != null && (itemInfo.IsNote || itemInfo.IsCaution))
|
||||
Width -= myTab.Width;
|
||||
foreach (vlnPrintObject vpo in PartsLeft)
|
||||
vpo.XOffset += mycolT;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (itemInfo.IsSection)
|
||||
{
|
||||
@ -6142,10 +6142,10 @@ namespace Volian.Print.Library
|
||||
}
|
||||
else if (itemInfo.MyParent.IsCaution || itemInfo.MyParent.IsNote)
|
||||
{
|
||||
if(itemInfo.ActiveFormat.MyStepSectionLayoutData.DevNoteOrCautionTabOffset != null)
|
||||
if (itemInfo.ActiveFormat.MyStepSectionLayoutData.DevNoteOrCautionTabOffset != null)
|
||||
Width = MyParent.MyParent.Width - tabWidth + (myTab == null ? 0 : myTab.TabAlign);
|
||||
else
|
||||
Width = MyParent.Width - tabWidth + (myTab == null ? 0 : myTab.TabAlign);
|
||||
Width = MyParent.Width - tabWidth + (myTab == null ? 0 : myTab.TabAlign);
|
||||
Width -= 72 * (itemInfo.FormatStepData.CautionOrNoteSubstepIndent == null ? 0 : (float)itemInfo.FormatStepData.CautionOrNoteSubstepIndent / (float)itemInfo.FormatStepData.Font.CPI);
|
||||
}
|
||||
else
|
||||
@ -6172,7 +6172,7 @@ namespace Volian.Print.Library
|
||||
if (((itemInfo.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_SameXOffSubsections) == E_DocStructStyle.DSS_SameXOffSubsections))
|
||||
{
|
||||
// don't adjust the width if there already was an adjustment for checkoffs - for VCB only (F2016-039)
|
||||
if (!(itemInfo.ActiveFormat.Name.ToUpper().StartsWith("VCB")&&coadj))
|
||||
if (!(itemInfo.ActiveFormat.Name.ToUpper().StartsWith("VCB") && coadj))
|
||||
adjwidth = MyTab != null ? -MyTab.Width : 0;
|
||||
}
|
||||
else if (sd.UseMetaSections)
|
||||
|
Loading…
x
Reference in New Issue
Block a user