Fixes Index out of range when a Referenced Object is missing from the RO.FST. This will output an error message since it reflects an error in the plant data.
This commit is contained in:
parent
c68412fd81
commit
08bbb82714
@ -229,7 +229,7 @@ namespace Volian.Print.Library
|
|||||||
if (box != null)
|
if (box != null)
|
||||||
{
|
{
|
||||||
box.Height = yoff - box.YOffset; // new height, with children
|
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)
|
formatInfo.PlantFormat.FormatData.PrintData.SpecialCaseCalvert)
|
||||||
{
|
{
|
||||||
if (childItemInfo.MyHeader != null && childItemInfo.MyPrevious != null
|
if (childItemInfo.MyHeader != null && childItemInfo.MyPrevious != null
|
||||||
@ -2758,8 +2758,14 @@ namespace Volian.Print.Library
|
|||||||
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 == "?") val = lookup.GetRoValue(subs[1].Substring(0, 12));
|
||||||
if (val != null)
|
if (val == "?")
|
||||||
|
{
|
||||||
|
erMsg = string.Format("Referenced Object does not exist.");
|
||||||
|
_MyLog.WarnFormat("Missing Referenced Object {0} in {1}", subs[1], itemInfo.ShortPath);
|
||||||
|
yoff += 2 * SixLinesPerInch;
|
||||||
|
}
|
||||||
|
else if (val != null && val != "?")
|
||||||
{
|
{
|
||||||
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;
|
||||||
@ -4221,7 +4227,7 @@ namespace Volian.Print.Library
|
|||||||
if (myTab != null) myTab.XOffset = (float)colOvrd; // set the note/caution tab offset to the colOverride
|
if (myTab != null) myTab.XOffset = (float)colOvrd; // set the note/caution tab offset to the colOverride
|
||||||
return;
|
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 ||
|
else if (bxIndx != null && (itemInfo.IsCaution || itemInfo.IsNote ||
|
||||||
!itemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionPrintData.ContActBoxOnSubSteps))
|
!itemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionPrintData.ContActBoxOnSubSteps))
|
||||||
{
|
{
|
||||||
@ -4275,7 +4281,7 @@ namespace Volian.Print.Library
|
|||||||
{
|
{
|
||||||
// if the tab is 3 char or smaller, make the indent amount for the rno text 4 characters.
|
// if the tab is 3 char or smaller, make the indent amount for the rno text 4 characters.
|
||||||
// if bigger, make it the additional tab size.
|
// if bigger, make it the additional tab size.
|
||||||
int len = myTab.Text.Trim().Length;
|
int len = myTab.Text.Trim().Length;
|
||||||
int adj = len <= 3 ? 4 : (len - 3) + 4;
|
int adj = len <= 3 ? 4 : (len - 3) + 4;
|
||||||
float rnoOffset = (float)itemInfo.MyDocStyle.Layout.LeftMargin + (float)itemInfo.MyDocStyle.CenterLineX + 5;
|
float rnoOffset = (float)itemInfo.MyDocStyle.Layout.LeftMargin + (float)itemInfo.MyDocStyle.CenterLineX + 5;
|
||||||
float tPtPerChar = itemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.TabPtsPerChar ?? 6;
|
float tPtPerChar = itemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.TabPtsPerChar ?? 6;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user