handle NSP Alarms RNOWidthAlt format setting and their RNO tabs (NumberSubs)

This commit is contained in:
John Jenko 2012-10-22 18:37:52 +00:00
parent f03ad38655
commit 6234a36232

View File

@ -1889,9 +1889,21 @@ namespace Volian.Print.Library
} }
} }
} }
else if (itemInfo.IsRNOPart && !((ItemInfo)itemInfo.ActiveParent).IsHigh) //else if (itemInfo.IsRNOPart && !((ItemInfo)itemInfo.ActiveParent).IsHigh)
//{
// // don't adjust for rno
//}
else if (itemInfo.IsRNOPart && (colOvrd > 0 || !((ItemInfo)itemInfo.ActiveParent).IsHigh))
{ {
// don't adjust for rno if (colOvrd > 0)
{
XOffset = (int)colOvrd;
if (!((ItemInfo)itemInfo.MyParent).IsHigh)
{
ItemInfo hls = itemInfo.MyHLS;
XOffset -= (itemInfo.MyTab.Offset - hls.MyTab.Offset);
}
}
} }
else if (MyParent != null) else if (MyParent != null)
{ {
@ -1903,7 +1915,7 @@ namespace Volian.Print.Library
// the tab. The offset of text needs to be adjusted by the 'leftjustify' format variable // the tab. The offset of text needs to be adjusted by the 'leftjustify' format variable
// if it existed for this level. // if it existed for this level.
myTab.XOffset += tabWidth; myTab.XOffset += tabWidth;
if (tableftadj != 0 && myTab.Width<tableftadj) if (tableftadj != 0 && myTab.Width < tableftadj)
tabWidth = myTab.Width = tableftadj; tabWidth = myTab.Width = tableftadj;
XOffset += tabWidth; XOffset += tabWidth;
myTab.Rtf = myTab.Rtf.Replace(myTab.Text, myTab.Text.TrimStart(" ".ToCharArray())); myTab.Rtf = myTab.Rtf.Replace(myTab.Text, myTab.Text.TrimStart(" ".ToCharArray()));
@ -1941,6 +1953,13 @@ namespace Volian.Print.Library
widOvrd = xwid; widOvrd = xwid;
else else
widOvrd = itemInfo.FormatStepData == null ? null : itemInfo.FormatStepData.WidthOverride; widOvrd = itemInfo.FormatStepData == null ? null : itemInfo.FormatStepData.WidthOverride;
if (itemInfo.IsRNOPart && itemInfo.ActiveFormat.MyStepSectionLayoutData.RNOWidthAlt != null)
{
string[] splitRNOWidthAlt = itemInfo.ActiveFormat.MyStepSectionLayoutData.RNOWidthAlt.Split(',');
float ovrd = (itemInfo.RNOLevel < splitRNOWidthAlt.Length) ? float.Parse(splitRNOWidthAlt[itemInfo.RNOLevel]) : 0;
if (ovrd > 0)
widOvrd = ovrd + 6; // Change bars on RNO column (signoff line) would not line up with 16-bit without this - NSP Alarms
}
if ((widOvrd??0) != 0) if ((widOvrd??0) != 0)
{ {
Width = (float)widOvrd; Width = (float)widOvrd;