This commit is contained in:
Kathy Ruffing 2012-12-05 16:47:26 +00:00
parent 4516759585
commit 295bcdb4e0

View File

@ -145,7 +145,7 @@ namespace Volian.Print.Library
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;
bool doprint = true;
if (MyItemInfo.IsFigure)
{
yLocation -= (SixLinesPerInch * MyPageHelper.YMultiplier);
@ -160,16 +160,16 @@ namespace Volian.Print.Library
&& !MyItemInfo.MyDocStyle.CancelSectTitle
&& !MyItemInfo.MyDocStyle.SpecialStepsFoldout)) // Don't ouput the Step Section title
{
bool doprint = true;
// if this is a section, then check the section config for printable header too.
if (MyItemInfo.IsSection)
{
SectionConfig sch = MyItemInfo.MyConfig as SectionConfig;
if (!(MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.ShowSectionTitles
&& !MyItemInfo.MyDocStyle.CancelSectTitle
&& !MyItemInfo.MyDocStyle.SpecialStepsFoldout)
&& !MyItemInfo.MyDocStyle.SpecialStepsFoldout
&& !MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.UseMetaSections)
&&
((sch != null && sch.Section_PrintHdr != "Y") || !MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.UseMetaSections)) doprint = false;
(sch != null && sch.Section_PrintHdr != "Y")) doprint = false;
}
if (MyItemInfo.MyContent.MyGrid != null)
retval = DrawGrid(cb, ref yPageStart, yTopMargin, yBottomMargin, ref yLocation);
@ -199,7 +199,7 @@ namespace Volian.Print.Library
}
}
}
//Height = yLocation - retval;
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);
if (_PartsBelow != null && _PartsBelow.Count > 0) yPageStart = PartsBelow.ToPdf(cb, yPageStart, ref yTopMargin, ref yBottomMargin);
@ -844,7 +844,7 @@ namespace Volian.Print.Library
MyTopRNO = this;
else
MyTopRNO = MyParent.MyTopRNO;
if(MyTopRNO != null) MyTopRNO.LastRNO = this;
if (MyTopRNO != null) MyTopRNO.LastRNO = this;
}
MyContentByte = cb;
if (!MyPageHelper.MyParagraphs.ContainsKey(itemInfo.ItemID)) MyPageHelper.MyParagraphs.Add(itemInfo.ItemID, this);
@ -874,6 +874,7 @@ namespace Volian.Print.Library
itemInfo.MyTab = null;
float xMetaAdj = 0;
if (itemInfo.MyTab != null && itemInfo.MyTab.Text != null && itemInfo.MyTab.Text != "")
{
float localXOffset = XOffset;
@ -885,7 +886,11 @@ namespace Volian.Print.Library
&& !MyItemInfo.MyDocStyle.CancelSectTitle
&& !MyItemInfo.MyDocStyle.SpecialStepsFoldout)
&&
((sch != null && sch.Section_PrintHdr != "Y") || !MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.UseMetaSections)) doprint = false;
((sch != null && sch.Section_PrintHdr != "Y") || !MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.UseMetaSections))
{
doprint = false;
YTopMost = 0;
}
}
if (doprint && itemInfo.IsSection && !itemInfo.MyDocStyle.CancelSectTitle && itemInfo.MyTab.Text.ToUpper() != "FOLDOUT")
{
@ -946,7 +951,7 @@ namespace Volian.Print.Library
float yoffLeft = yoff;
if (itemInfo.Cautions != null && !(itemInfo.IsCaution || itemInfo.IsNote))
{
if(itemInfo.ActiveFormat.MyStepSectionLayoutData.Dev_Format)
if (itemInfo.ActiveFormat.MyStepSectionLayoutData.Dev_Format)
yoffLeft = ChildrenLeft.Add(cb, itemInfo.Cautions, xoff, yoff, yoff, rnoLevel, maxRNO, formatInfo);
else
yoff = ChildrenAbove.Add(cb, itemInfo.Cautions, xoff, yoff, yoff, rnoLevel, maxRNO, formatInfo);
@ -993,7 +998,7 @@ namespace Volian.Print.Library
bool dropCheckoff = itemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.DropCheckOff;
if (itemInfo.MyContent.MyGrid != null)
{
VlnFlexGrid myFlexGrid = new VlnFlexGrid(1,1);
VlnFlexGrid myFlexGrid = new VlnFlexGrid(1, 1);
myFlexGrid.LoadGrid(itemInfo);
MyGrid = new vlnTable(myFlexGrid, cb);
Height = MyGrid.Height;
@ -1095,7 +1100,7 @@ namespace Volian.Print.Library
// 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))
if (itemInfo.IsStep && itemInfo.MyHLS.FormatStepData.UseSmartTemplate && (TheStepLevel(itemInfo) > 0))
{
// do I need to get max of savCheckListBottomMost & (yoff+Height+SixLinesPerInch)
savCheckListBottomMost = yoff + Height + SixLinesPerInch;
@ -1119,6 +1124,7 @@ namespace Volian.Print.Library
}
}
CheckOff co = itemInfo.GetCheckOffStep();
if (co != null)
{
@ -1161,17 +1167,16 @@ namespace Volian.Print.Library
}
bool rightLonger = yOffRight > yoff;
if(!aerTableOrFigure && itemInfo.RNOLevel == 0) // Centered Table
yoff = ChildrenBelow.Add(cb, itemInfo.Tables, XOffset, rightLonger?yOffRight:yoff + yoffadj, yOffRight + yoffadj, rnoLevel, maxRNO, formatInfo);
if (!aerTableOrFigure && itemInfo.RNOLevel == 0) // Centered Table
yoff = ChildrenBelow.Add(cb, itemInfo.Tables, XOffset, rightLonger ? yOffRight : yoff + yoffadj, yOffRight + yoffadj, rnoLevel, maxRNO, formatInfo);
else // AER or RNO Table
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:
bool printsteps = true;
if (itemInfo.Steps != null && itemInfo.IsSection && itemInfo.Sections!=null && itemInfo.Sections.Count>0)
if (itemInfo.Steps != null && itemInfo.IsSection && itemInfo.Sections != null && itemInfo.Sections.Count > 0)
{
SectionConfig sc = itemInfo.MyConfig as SectionConfig;
if (sc != null && sc.SubSection_Edit != "Y") printsteps = false;
@ -1189,7 +1194,7 @@ namespace Volian.Print.Library
vlnParagraph rno = ChildrenRight[0];
vlnParagraph bottomChild = BottomChild;
float xsep = MyHighLevelParagraph.XOffset + RnoOffset;
vlnRNOSeparator myRnoSep = new vlnRNOSeparator(this, cb, tmpRnoSepStr, xsep, yoff, formatInfo, bottomChild==null?true:bottomChild.MyItemInfo.HasChangeBar);
vlnRNOSeparator myRnoSep = new vlnRNOSeparator(this, cb, tmpRnoSepStr, xsep, yoff, 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.PartsBelow.Add(myRnoSep);
@ -1201,7 +1206,7 @@ namespace Volian.Print.Library
// For WCN 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 int TheStepLevel(ItemInfo itemInfo)