Fixed a NULL reference issue
This commit is contained in:
parent
f332618227
commit
637df99460
@ -77,6 +77,10 @@ namespace Volian.Print.Library
|
||||
if (iChildItemInfo.IsSection && (iChildItemInfo as SectionInfo).ColumnMode != maxRNO)
|
||||
maxRNO = (iChildItemInfo as SectionInfo).ColumnMode;
|
||||
ItemInfo childItemInfo = iChildItemInfo;
|
||||
//if (childItemInfo.ItemID == 167601)
|
||||
// Console.WriteLine("AER RNO Step");
|
||||
//if (childItemInfo.ItemID == 167603)
|
||||
// Console.WriteLine("stop");
|
||||
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
|
||||
@ -264,6 +268,14 @@ namespace Volian.Print.Library
|
||||
box.Height = para.YBottomMost - box.YOffset - (boxLnAdjust * vlnPrintObject.SixLinesPerInch); // para.YTop - (1.1F * vlnPrintObject.SixLinesPerInch);
|
||||
box = null;
|
||||
}
|
||||
//else if (childItemInfo.ItemID == 167601)
|
||||
//{
|
||||
// boxHLS = true;
|
||||
// int boxLnAdjust = iChildItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionPrintData.DiffContActBox ? 1 : 2;
|
||||
// box.Height = yoff - box.YOffset - (boxLnAdjust * vlnPrintObject.SixLinesPerInch); // new height, with children
|
||||
// yoff += 1 * vlnPrintObject.SixLinesPerInch;
|
||||
// box = null;
|
||||
//}
|
||||
}
|
||||
if (childItemInfo.IsSequential && childItemInfo.NextItemCount > 0 && childItemInfo.MyParent.IsHigh && ((childItemInfo.MyDocStyle.StructureStyle.Style & E_DocStructStyle.XBlankW1stLevSub) == E_DocStructStyle.XBlankW1stLevSub))
|
||||
yoff += vlnPrintObject.SixLinesPerInch;
|
||||
@ -1219,15 +1231,18 @@ namespace Volian.Print.Library
|
||||
myMsg = myMsg.Replace("%-12s", MyItemInfo.MyProcedure.DisplayNumber.PadRight(12));
|
||||
float xpos = 0;
|
||||
if ((docstyle.End.Margin ?? 0) != 0)
|
||||
xpos = (float)docstyle.Layout.LeftMargin + (float)docstyle.End.Margin;
|
||||
else
|
||||
{
|
||||
xpos = (float)docstyle.Layout.LeftMargin + (float)docstyle.End.Margin;
|
||||
MyPageHelper.BottomMessage = new vlnText(cb, this, myMsg, myMsg, xpos, msg_yLocation, docstyle.End.Font);
|
||||
}
|
||||
else
|
||||
{ // Center the bottom message
|
||||
float wtpm = (float)docstyle.Layout.PageWidth - (float)docstyle.Layout.LeftMargin;
|
||||
xpos = XOffsetBox + (float)docstyle.Layout.LeftMargin + (wtpm - (myMsg.Length * MyItemInfo.FormatStepData.Font.CharsToTwips)) / 2;
|
||||
xpos = Math.Max(xpos, XOffsetBox + (float)docstyle.Layout.LeftMargin);
|
||||
MyPageHelper.BottomMessage = new vlnText(cb, this, myMsg, myMsg, xpos, msg_yLocation, docstyle.End.Font);
|
||||
MyPageHelper.MyGaps.Add(new Gap(msg_yLocation, msg_yLocation - MyPageHelper.BottomMessage.Height));
|
||||
}
|
||||
MyPageHelper.BottomMessage = new vlnText(cb, this, myMsg, myMsg, xpos, msg_yLocation, docstyle.End.Font);
|
||||
}
|
||||
}
|
||||
if (yLocalypagestart != yPageStart) DebugText.WriteLine("ToPdf-yPagestartDiff:{0},{1},{2},{3}", MyPageHelper.MyPdfContentByte.PdfWriter.CurrentPageNumber, MyItemInfo.ItemID, yLocalypagestart, yPageStart);
|
||||
@ -3068,7 +3083,11 @@ namespace Volian.Print.Library
|
||||
XOffset = (float)itemInfo.MyDocStyle.Layout.LeftMargin + tabWidth + XOffsetBox;
|
||||
}
|
||||
else
|
||||
{
|
||||
//if (itemInfo.ItemID == 167601)
|
||||
// Console.WriteLine("AER RNO Step");
|
||||
XOffset = (float)itemInfo.MyDocStyle.Layout.LeftMargin + (float)bx.TxtStart + _MyBoxLeftAdj + tabWidth + XOffsetBox;
|
||||
}
|
||||
if (myTab != null) myTab.XOffset = XOffset - tabWidth;
|
||||
}
|
||||
else if (itemInfo.IsRNOPart && itemInfo.MyParent != null && itemInfo.MyParent.IsRNOPart && itemInfo.FormatStepData.NumberWithLevel)
|
||||
|
Loading…
x
Reference in New Issue
Block a user