Corrected 3 blank lines between Caution and Notes for same step
Utilized DevNoteOrCautionTabOffset property
This commit is contained in:
parent
d959824dd4
commit
3156c8b7b9
@ -1340,7 +1340,6 @@ namespace Volian.Print.Library
|
||||
}
|
||||
public vlnParagraph(vlnParagraph parent, PdfContentByte cb, ItemInfo itemInfo, float xoff, float yoff, int rnoLevel, int maxRNO, FormatInfo formatInfo, string prefix, string suffix, float yoffRightParent)
|
||||
{
|
||||
if (itemInfo.ItemID == 70717) Console.WriteLine("jcb");
|
||||
if (itemInfo.ActiveFormat.MyStepSectionLayoutData.BoxLeftAdj != null)
|
||||
_MyBoxLeftAdj = float.Parse(itemInfo.ActiveFormat.MyStepSectionLayoutData.BoxLeftAdj);
|
||||
ShowSectionTitles = formatInfo.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.ShowSectionTitles || itemInfo.MyDocStyle.ShowSectionTitles;
|
||||
@ -1392,9 +1391,12 @@ namespace Volian.Print.Library
|
||||
// if this is a Note or Caution off of a Note or Caution (Catawba EG/1A/CSAM/SACGR1 step 1)
|
||||
// then indent it the length of its tab
|
||||
if (itemInfo.IsCaution || itemInfo.IsNote)
|
||||
XOffset += (itemInfo.FormatStepData.TabData.IdentPrint.Length -1) * 6;
|
||||
XOffset += (itemInfo.FormatStepData.TabData.IdentPrint.Length - 1) * 6;
|
||||
else
|
||||
XOffset += 72 * (itemInfo.FormatStepData.CautionOrNoteSubstepIndent == null ? 0 : (float)itemInfo.FormatStepData.CautionOrNoteSubstepIndent / (float)itemInfo.FormatStepData.Font.CPI);
|
||||
if (itemInfo.ActiveFormat.MyStepSectionLayoutData.DevNoteOrCautionTabOffset != null)
|
||||
XOffset = float.Parse(itemInfo.ActiveFormat.MyStepSectionLayoutData.DevNoteOrCautionTabOffset);
|
||||
else
|
||||
XOffset += 72 * (itemInfo.FormatStepData.CautionOrNoteSubstepIndent == null ? 0 : (float)itemInfo.FormatStepData.CautionOrNoteSubstepIndent / (float)itemInfo.FormatStepData.Font.CPI);
|
||||
}
|
||||
|
||||
if (itemInfo.IsStep && itemInfo.MyHLS != null && itemInfo.MyHLS.FormatStepData.UseSmartTemplate &&
|
||||
@ -1593,7 +1595,7 @@ namespace Volian.Print.Library
|
||||
if (YOffset != 0 && MyItemInfo.IsSection && MyItemInfo.ActiveFormat.MyStepSectionLayoutData.CustomSpacing)
|
||||
addExtraSpace = (float)MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList[25].StepLayoutData.STExtraSpace;
|
||||
if (YOffset != 0 && MyItemInfo.FormatStepData != null &&
|
||||
MyItemInfo.MyPrevious == null && MyItemInfo.FormatStepData.ThreeBlanksAbove)
|
||||
MyItemInfo.MyPrevious == null && MyItemInfo.FormatStepData.ThreeBlanksAbove && (!MyItemInfo.IsNote || MyItemInfo.MyParent.Cautions == null))
|
||||
addExtraSpace = 24; // already has one blank line above, added two more
|
||||
//if (YOffset != 0 && MyItemInfo.FormatStepData != null && MyItemInfo.FormatStepData.StepLayoutData.STExtraSpace > 0)
|
||||
// addExtraSpace = (float)MyItemInfo.FormatStepData.StepLayoutData.STExtraSpace;
|
||||
@ -2869,8 +2871,13 @@ namespace Volian.Print.Library
|
||||
XOffset += tabWidth;
|
||||
if (myTab != null) myTab.XOffset += tabWidth;
|
||||
}
|
||||
if (itemInfo.ActiveFormat.MyStepSectionLayoutData.DevNoteOrCautionTabOffset != null)
|
||||
{
|
||||
MyTab.XOffset = float.Parse(itemInfo.ActiveFormat.MyStepSectionLayoutData.DevNoteOrCautionTabOffset);
|
||||
XOffset = MyTab.XOffset + tabWidth - MyTab.TabAlign;
|
||||
}
|
||||
}
|
||||
else if (MyParent != null)
|
||||
else if (MyParent != null && itemInfo.ActiveFormat.MyStepSectionLayoutData.DevNoteOrCautionTabOffset != null)
|
||||
{
|
||||
if (myTab != null && itemInfo.IsSequential && formatInfo.PlantFormat.FormatData.SectData.UseMetaSections && formatInfo.PlantFormat.FormatData.SectData.StepSectionData.StepSectionPrintData.LeftJustifyList.Count > 0)
|
||||
{
|
||||
@ -2894,12 +2901,19 @@ namespace Volian.Print.Library
|
||||
//}
|
||||
else // if no left justify, right align the tab
|
||||
{
|
||||
XOffset += tabWidth - (myTab == null ? 0 : myTab.TabAlign);
|
||||
if (myTab != null)
|
||||
if (MyTab != null)
|
||||
{
|
||||
myTab.XOffset += tabWidth - myTab.TabAlign;
|
||||
MyTab.XOffset = float.Parse(itemInfo.ActiveFormat.MyStepSectionLayoutData.DevNoteOrCautionTabOffset);
|
||||
XOffset = MyTab.XOffset + tabWidth - MyTab.TabAlign;
|
||||
if (myTab.MyMacro != null && myTab.MyMacro.XOffset != 0) myTab.MyMacro.XOffset += tabWidth - myTab.TabAlign;
|
||||
}
|
||||
else
|
||||
XOffset += tabWidth - (myTab == null ? 0 : myTab.TabAlign);
|
||||
//if (myTab != null)
|
||||
//{
|
||||
// myTab.XOffset += tabWidth - myTab.TabAlign;
|
||||
// if (myTab.MyMacro != null && myTab.MyMacro.XOffset != 0) myTab.MyMacro.XOffset += tabWidth - myTab.TabAlign;
|
||||
//}
|
||||
}
|
||||
}
|
||||
// if format had a tab adjustment for step type, use it. MyTab.Offset is only set for FNP formats
|
||||
@ -2932,8 +2946,7 @@ namespace Volian.Print.Library
|
||||
}
|
||||
public void AdjustWidth(ItemInfo itemInfo, int maxRNO, FormatInfo formatInfo, vlnTab myTab)
|
||||
{
|
||||
int typ = ((int)itemInfo.MyContent.Type) % 10000;
|
||||
int? bxIndx = itemInfo.IsStep ? formatInfo.PlantFormat.FormatData.StepDataList[typ].StepLayoutData.STBoxindex : null;
|
||||
int? bxIndx = itemInfo.IsStep ? itemInfo.FormatStepData.StepLayoutData.STBoxindex : null;
|
||||
float? widOvrd = 0;
|
||||
float xwid = 0;
|
||||
if (itemInfo.IsStep && itemInfo.MyHLS != null && UseTemplateWidthOrXOff(itemInfo) && (xwid = GetWidthOrStartFromTemplate(itemInfo, formatInfo, true)) > 0)
|
||||
@ -3045,8 +3058,12 @@ namespace Volian.Print.Library
|
||||
Width = (float)formatInfo.MyStepSectionLayoutData.WidT - 6 - mycolT;
|
||||
XOffset += mycolT; // adjust caution/note text position
|
||||
if (PartsLeft != null)// adjust tab position
|
||||
{
|
||||
if(itemInfo.IsNote || itemInfo.IsCaution)
|
||||
Width -= myTab.Width;
|
||||
foreach (vlnPrintObject vpo in PartsLeft)
|
||||
vpo.XOffset += mycolT;
|
||||
}
|
||||
}
|
||||
else if (itemInfo.IsSection)
|
||||
{
|
||||
@ -3070,7 +3087,10 @@ namespace Volian.Print.Library
|
||||
}
|
||||
else if (itemInfo.MyParent.IsCaution || itemInfo.MyParent.IsNote)
|
||||
{
|
||||
Width = MyParent.Width - tabWidth + (myTab == null ? 0 : myTab.TabAlign);
|
||||
if(itemInfo.ActiveFormat.MyStepSectionLayoutData.DevNoteOrCautionTabOffset != null)
|
||||
Width = MyParent.MyParent.Width - tabWidth + (myTab == null ? 0 : myTab.TabAlign);
|
||||
else
|
||||
Width = MyParent.Width - tabWidth + (myTab == null ? 0 : myTab.TabAlign);
|
||||
Width -= 72 * (itemInfo.FormatStepData.CautionOrNoteSubstepIndent == null ? 0 : (float)itemInfo.FormatStepData.CautionOrNoteSubstepIndent / (float)itemInfo.FormatStepData.Font.CPI);
|
||||
}
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user