BGEALN: Do not duplicate Tab/header for Notes/Cautions/Warnings. Add ‘IsCautionOrNotePart’
BGEALN: Various improvements in Calvert Alarms for blank lines within Notes/Cautions/Warnings
This commit is contained in:
@@ -196,7 +196,12 @@ namespace Volian.Print.Library
|
||||
int ln = 1; // a format flag determines whether there is a space before the note/caution.
|
||||
if (childItemInfo.FormatStepData.OneLineBeforeTab) ln++;
|
||||
if (!boxHLS || (boxHLS && !childItemInfo.HasCautionOrNote))
|
||||
yoff += ln * vlnPrintObject.SixLinesPerInch;
|
||||
{
|
||||
if (!formatInfo.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm)
|
||||
yoff += ln * vlnPrintObject.SixLinesPerInch;
|
||||
else
|
||||
yoff += vlnPrintObject.SixLinesPerInch;
|
||||
}
|
||||
}
|
||||
bxIndex = bxIndx;
|
||||
}
|
||||
@@ -211,7 +216,14 @@ namespace Volian.Print.Library
|
||||
if (box != null)
|
||||
{
|
||||
box.Height = yoff - box.YOffset; // new height, with children
|
||||
if (childItemInfo.MyHeader != null && childItemInfo.MyPrevious != null
|
||||
if (formatInfo.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm)
|
||||
{
|
||||
if (childItemInfo.MyHeader != null && childItemInfo.MyPrevious != null
|
||||
&& ((childItemInfo.MyPrevious.IsCautionOrNotePart && childItemInfo.IsCautionOrNotePart)
|
||||
|| childItemInfo.FormatStepData.SeparateBox))
|
||||
yoff += vlnPrintObject.SixLinesPerInch * 2;
|
||||
}
|
||||
else if (childItemInfo.MyHeader != null && childItemInfo.MyPrevious != null
|
||||
&& ((childItemInfo.MyPrevious.IsCaution && childItemInfo.IsCaution) ||
|
||||
(childItemInfo.MyPrevious.IsNote && childItemInfo.IsNote) || childItemInfo.FormatStepData.SeparateBox))
|
||||
yoff += vlnPrintObject.SixLinesPerInch * 2;
|
||||
@@ -735,10 +747,11 @@ namespace Volian.Print.Library
|
||||
// Calvert Alarms have a special case, center text if the next/previous is not the same type of caution or note.
|
||||
// Calvert Alarms have a note1 that is a warning. if a regular note preceeded it, this regular note was not centered.
|
||||
bool doAlign = false;
|
||||
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm)
|
||||
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm && (MyItemInfo.IsCaution || MyItemInfo.IsNote))
|
||||
{
|
||||
if ((MyItemInfo.MyPrevious != null && MyItemInfo.MyContent.Type != MyItemInfo.MyPrevious.MyContent.Type)||
|
||||
(MyItemInfo.GetNextItem() != null && MyItemInfo.MyContent.Type != MyItemInfo.GetNextItem().MyContent.Type)) doAlign = true;
|
||||
bool diffAsPrev = MyItemInfo.MyPrevious == null || (MyItemInfo.MyPrevious != null && MyItemInfo.MyContent.Type != MyItemInfo.MyPrevious.MyContent.Type);
|
||||
bool diffAsNext = MyItemInfo.GetNextItem() == null || (MyItemInfo.GetNextItem() != null && MyItemInfo.MyContent.Type != MyItemInfo.GetNextItem().MyContent.Type);
|
||||
if (diffAsPrev && diffAsNext) doAlign = true;
|
||||
}
|
||||
// Check if only one line, i.e. "Height < (1.2F * IParagraph.Leading". The Leading can be for six or seven lines per inch, so the 1.2
|
||||
// multiplier accounts for both.
|
||||
@@ -2942,7 +2955,9 @@ namespace Volian.Print.Library
|
||||
if (everyNLines == -99) return 0;
|
||||
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm)
|
||||
{
|
||||
if ((MyItemInfo.IsCaution || MyItemInfo.IsNote) && !MyItemInfo.FormatStepData.SpaceIn && MyItemInfo.GetNextItem() == null) return 0;
|
||||
if ((MyItemInfo.IsCaution || MyItemInfo.IsNote || MyItemInfo.MyParent.IsCaution || MyItemInfo.MyParent.IsNote) && !MyItemInfo.FormatStepData.SpaceIn
|
||||
&& (MyItemInfo.Steps == null || MyItemInfo.Steps.Count == 0)
|
||||
&& (MyItemInfo.GetNextItem() == null || MyItemInfo.MyContent.Type != MyItemInfo.GetNextItem().MyContent.Type)) return 0;
|
||||
if (everyNLines == 99 && MyItemInfo.GetNextItem() == null)
|
||||
{
|
||||
if (MyItemInfo.Steps != null && MyItemInfo.Steps.Count > 0 && MyItemInfo.Steps[0].MyContent.Type == MyItemInfo.MyContent.Type) return 0;
|
||||
|
Reference in New Issue
Block a user