IP3 Continuous HLS asterisk boxes
This commit is contained in:
@@ -80,14 +80,13 @@ namespace Volian.Print.Library
|
||||
foreach (ItemInfo iChildItemInfo in itemInfoList)
|
||||
{
|
||||
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);
|
||||
continue; // don't add it, vlnParagraph adds this item to the footnote list in ToPdf.
|
||||
}
|
||||
maxRNO = maxRnoSav;
|
||||
if (iChildItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionPrintData.DiffContActBox && iChildItemInfo.IsHigh) bxIndex = null;
|
||||
if (iChildItemInfo.IsHigh) bxIndex = null;
|
||||
if (iChildItemInfo.IsSection && (iChildItemInfo as SectionInfo).ColumnMode != maxRNO)
|
||||
maxRNO = (iChildItemInfo as SectionInfo).ColumnMode;
|
||||
int maxRnoTemplate = iChildItemInfo.TemplateChildColumnMode;
|
||||
@@ -348,10 +347,26 @@ namespace Volian.Print.Library
|
||||
int boxLnAdjust = iChildItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionPrintData.DiffContActBox ? 1 : 2;
|
||||
box.YOffset = para.YTop - (boxLnAdjust * vlnPrintObject.SixLinesPerInch);
|
||||
boxLnAdjust = iChildItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionPrintData.DiffContActBox ? 1 : 0;
|
||||
box.Height = para.YBottomMost - box.YOffset - (boxLnAdjust * vlnPrintObject.SixLinesPerInch); // para.YTop - (1.1F * vlnPrintObject.SixLinesPerInch);
|
||||
|
||||
// if the YBottomForBox is set, use it to define height. Note that this property was
|
||||
// introduced for IP3 continuous hls (surrounded by the asterisk box), no other format/step type uses it.
|
||||
if (para.YBottomForBox > 0)
|
||||
box.Height = para.YBottomForBox - box.YOffset - (boxLnAdjust * vlnPrintObject.SixLinesPerInch); // para.YTop - (1.1F * vlnPrintObject.SixLinesPerInch);
|
||||
else
|
||||
box.Height = para.YBottomMost - box.YOffset - (boxLnAdjust * vlnPrintObject.SixLinesPerInch); // para.YTop - (1.1F * vlnPrintObject.SixLinesPerInch);
|
||||
box = null;
|
||||
}
|
||||
}
|
||||
if (boxHLS)
|
||||
{
|
||||
// if the next HLS is boxed also, only need 1 line separating, otherwise
|
||||
// need 2.
|
||||
ItemInfo nxt = childItemInfo.GetNextItem();
|
||||
int nxtIsBoxed = 2;
|
||||
if (nxt != null &&
|
||||
nxt.FormatStepData.StepLayoutData.STBoxindex != null && nxt.FormatStepData.StepLayoutData.STBoxindex >= 0) nxtIsBoxed--;
|
||||
yoff += (nxtIsBoxed * vlnPrintObject.SixLinesPerInch);
|
||||
}
|
||||
if (childItemInfo.IsSequential && childItemInfo.NextItemCount > 0 && childItemInfo.MyParent.IsHigh && ((childItemInfo.MyDocStyle.StructureStyle.Style & E_DocStructStyle.XBlankW1stLevSub) == E_DocStructStyle.XBlankW1stLevSub))
|
||||
yoff += vlnPrintObject.SixLinesPerInch;
|
||||
boxHLS = false;
|
||||
@@ -2198,6 +2213,12 @@ namespace Volian.Print.Library
|
||||
return YOffset + Height;
|
||||
}
|
||||
}
|
||||
private float _YBottomForBox = 0;
|
||||
public float YBottomForBox
|
||||
{
|
||||
get { return _YBottomForBox; }
|
||||
set { _YBottomForBox = value; }
|
||||
}
|
||||
private vlnParagraph GetFirstPieceLastPart()
|
||||
{
|
||||
vlnParagraph para = this;
|
||||
@@ -3247,13 +3268,22 @@ 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);
|
||||
|
||||
// ip3 has an rno separator and also has asterisk boxes around continous HLS. If
|
||||
// the hls has RNOs off of it, then the rno separator line is outside of the box. If
|
||||
// there are RNOs, but not off of HLS, then rno separator line is within the box (this is
|
||||
// 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);
|
||||
// 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);
|
||||
else
|
||||
rno.LastRNO.PartsBelow.Add(myRnoSep);
|
||||
yoff += myRnoSep.Height + SixLinesPerInch;
|
||||
MyHighLevelParagraph.YBottomForBox = 0;
|
||||
if (yadjSep>0) MyHighLevelParagraph.YBottomForBox = yoff; // if hlrno, box before sep
|
||||
yoff += (myRnoSep.Height + SixLinesPerInch);
|
||||
}
|
||||
YBottomMost = yoff;
|
||||
|
||||
|
Reference in New Issue
Block a user