Calvert: CheckOffXtraLines’ support for new check off [6]; fix blank line adjustment for caution 6 in EOP/AOPs

This commit is contained in:
Kathy Ruffing 2014-10-23 12:58:13 +00:00
parent 4505955230
commit 9d2e558451

View File

@ -2685,10 +2685,28 @@ namespace Volian.Print.Library
xloc_co = XOffset + (relX > 0 ? Width : 0) + relX; xloc_co = XOffset + (relX > 0 ? Width : 0) + relX;
} }
} }
float xtraCheckOffLines = (co.CheckOffXtraLines ?? 0) * SixLinesPerInch;
xtraCheckOffLines -= ((xtraCheckOffLines>0)? SixLinesPerInch:0); // if xtraCheckOffLines is a negative number, start the checkoff on the same line
PartsRight.Add(new vlnMacro(xloc_co, yForCheckoff + xtraCheckOffLines, co.Macro)); // as text and adjust the y-offset after the checkoff by the amount of the absolute
yoff += (xtraCheckOffLines > 0) ? xtraCheckOffLines + SixLinesPerInch : 0; // value of xtraCheckOffLines.
// if xtraCheckOffLines is a positive number, start the checkoff xtraCheckOffLines - 1
// down from the text and adjust the y-offset after the checkoff by the amount
// of xtraCheckOffLines.
float xtraCheckOffLines = (co.CheckOffXtraLines ?? 0);
if (xtraCheckOffLines < 0)
{
xtraCheckOffLines = -xtraCheckOffLines;
xtraCheckOffLines *= SixLinesPerInch;
PartsRight.Add(new vlnMacro(xloc_co, yForCheckoff/* + xtraCheckOffLines */, co.Macro));
yoff += xtraCheckOffLines;
}
else
{
xtraCheckOffLines *= SixLinesPerInch;
xtraCheckOffLines -= ((xtraCheckOffLines > 0) ? SixLinesPerInch : 0);
PartsRight.Add(new vlnMacro(xloc_co, yForCheckoff + xtraCheckOffLines, co.Macro));
yoff += (xtraCheckOffLines != 0) ? xtraCheckOffLines + SixLinesPerInch : 0;
}
} }
} }
float yOffRight = yoff; float yOffRight = yoff;
@ -3186,16 +3204,16 @@ namespace Volian.Print.Library
int everyNLines = MyItemInfo.FormatStepData == null ? 1 : MyItemInfo.FormatStepData.StepLayoutData.EveryNLines ?? 1; int everyNLines = MyItemInfo.FormatStepData == null ? 1 : MyItemInfo.FormatStepData.StepLayoutData.EveryNLines ?? 1;
if (everyNLines == -99) return 0; if (everyNLines == -99) return 0;
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm || if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm ||
MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvert) (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvert && (MyItemInfo.MyTab!= null && MyItemInfo.MyTab.CleanText != string.Empty)))
{ {
if ((MyItemInfo.IsCaution || MyItemInfo.IsNote || MyItemInfo.MyParent.IsCaution || MyItemInfo.MyParent.IsNote) && !MyItemInfo.FormatStepData.SpaceIn if ((MyItemInfo.IsCaution || MyItemInfo.IsNote || MyItemInfo.MyParent.IsCaution || MyItemInfo.MyParent.IsNote) && !MyItemInfo.FormatStepData.SpaceIn
&& (MyItemInfo.Steps == null || MyItemInfo.Steps.Count == 0) && (MyItemInfo.Steps == null || MyItemInfo.Steps.Count == 0)
&& (MyItemInfo.GetNextItem() == null || MyItemInfo.MyContent.Type != MyItemInfo.GetNextItem().MyContent.Type)) return 0; && (MyItemInfo.GetNextItem() == null || MyItemInfo.MyContent.Type != MyItemInfo.GetNextItem().MyContent.Type)) return 0;
if (everyNLines == 99 && MyItemInfo.GetNextItem() == null) if (everyNLines == 99 && MyItemInfo.GetNextItem() == null)
{ {
if (MyItemInfo.Steps != null && MyItemInfo.Steps.Count > 0 && MyItemInfo.Steps[0].MyContent.Type == MyItemInfo.MyContent.Type) return 0; if (MyItemInfo.Steps != null && MyItemInfo.Steps.Count > 0 && MyItemInfo.Steps[0].MyContent.Type == MyItemInfo.MyContent.Type) return 0;
if (MyItemInfo.MyParent.GetNextItem() != null && MyItemInfo.MyParent.GetNextItem().MyContent.Type == MyItemInfo.MyContent.Type) return 0; if (MyItemInfo.MyParent.GetNextItem() != null && MyItemInfo.MyParent.GetNextItem().MyContent.Type == MyItemInfo.MyContent.Type) return 0;
} }
} }
if (MyItemInfo.Ordinal % everyNLines == 0 || MyItemInfo.GetNextItem() == null) return SixLinesPerInch; if (MyItemInfo.Ordinal % everyNLines == 0 || MyItemInfo.GetNextItem() == null) return SixLinesPerInch;
// Pagination issue to be used with yEndsWithBlankLine in Pagination code, but not checked in yet. // Pagination issue to be used with yEndsWithBlankLine in Pagination code, but not checked in yet.