Added logic to not extend the change bar on different types of Notes and Cautions if using the LimitCautionNoteWidthToHLS
Logic to adjust the Note/Caution width when off of a substep and when using the LimitCautionNoteWidthToHLS format flag. Logic to adjust the Yoffset of a note when off of a borderless table.
This commit is contained in:
parent
7cb179f085
commit
ae47368d34
@ -121,22 +121,29 @@ namespace Volian.Print.Library
|
||||
{
|
||||
string sep = parent.MyItemInfo.MyHeader == null ? "" : parent.MyItemInfo.MyHeader.CleanText;
|
||||
vlnHeader tmp = vph as vlnHeader;
|
||||
// the separator must exist and the previous must have a change bar.
|
||||
|
||||
if ((sep != "") && (tmp.Text == sep) && parent.MyItemInfo.MyPrevious != null && parent.MyItemInfo.MyPrevious.HasChangeBar)
|
||||
// if the part above is not the same type and it's a Note or Caution and the OnlyBulletSameCautionNoteType is true
|
||||
// don't extend the change bar to the item above
|
||||
if (!parent.MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.OnlyBulletSameCautionNoteType ||
|
||||
((parent.MyItemInfo.IsCaution || parent.MyItemInfo.IsNote) &&
|
||||
(parent.MyItemInfo.MyContent.Type != vph.MyParent.MyItemInfo.MyContent.Type)))
|
||||
{
|
||||
if (MyPageHelper.MyParagraphs.ContainsKey(parent.MyItemInfo.MyPrevious.ItemID))
|
||||
// the separator must exist and the previous must have a change bar.
|
||||
|
||||
if ((sep != "") && (tmp.Text == sep) && parent.MyItemInfo.MyPrevious != null && parent.MyItemInfo.MyPrevious.HasChangeBar)
|
||||
{
|
||||
vlnParagraph prev = MyPageHelper.MyParagraphs[parent.MyItemInfo.MyPrevious.ItemID];
|
||||
float delta = parent.YOffset - prev.YOffset;
|
||||
_YOffset += delta;
|
||||
_Height += delta;
|
||||
}
|
||||
else if (parent.PartsAbove.Count > 0)
|
||||
{
|
||||
float delta = parent.YOffset - parent.PartsAbove[0].YOffset;
|
||||
_YOffset += delta;
|
||||
_Height += delta;
|
||||
if (MyPageHelper.MyParagraphs.ContainsKey(parent.MyItemInfo.MyPrevious.ItemID))
|
||||
{
|
||||
vlnParagraph prev = MyPageHelper.MyParagraphs[parent.MyItemInfo.MyPrevious.ItemID];
|
||||
float delta = parent.YOffset - prev.YOffset;
|
||||
_YOffset += delta;
|
||||
_Height += delta;
|
||||
}
|
||||
else if (parent.PartsAbove.Count > 0)
|
||||
{
|
||||
float delta = parent.YOffset - parent.PartsAbove[0].YOffset;
|
||||
_YOffset += delta;
|
||||
_Height += delta;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2719,7 +2719,16 @@ namespace Volian.Print.Library
|
||||
}
|
||||
}
|
||||
if (adjustAgain)
|
||||
{
|
||||
AdjustXOffsetForTab(itemInfo, maxRNO, formatInfo, mytab, xMetaAdj);
|
||||
// Used in Ginna's Attachment format.
|
||||
// if the Note/Caution is off of a sub-step, then adjust the width so that the Caution/Note text box does not extend past the HLS text box
|
||||
if (itemInfo.IsCautionOrNotePart && maxRNO == 0 && itemInfo.MyActiveSection.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.LimitCautionNoteWidthToHLS)
|
||||
{
|
||||
float wMax = MyHighLevelParagraph.Width + MyHighLevelParagraph.XOffset - XOffset;
|
||||
if (wMax < Width && (Width + XOffset > MyItemInfo.MyDocStyle.Layout.PageWidth) ) Width = wMax;
|
||||
}
|
||||
}
|
||||
|
||||
// For Calvert Alarms: if within the CONDITION/RESPONSE table, indent by 1 character.
|
||||
// Sequential substeps are ok because of the tab string, but items without a tab & other step
|
||||
@ -2785,7 +2794,13 @@ namespace Volian.Print.Library
|
||||
// yoff from this. Without this, an overlap of text between the note and the bottom of the
|
||||
// RNO was occurring for FNP - Unit 2/AOP, AOP-4.0.
|
||||
if (yoffRightParent > yoff && ((itemInfo.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DoubleBoxHLS) != E_DocStructStyle.DoubleBoxHLS)) yoff = yoffRightParent;
|
||||
if (loadChildren) yoff = ChildrenAbove.Add(cb, itemInfo.Notes, xoff, yoff, yoff, rnoLevel, maxRNO, formatInfo);
|
||||
if (loadChildren)
|
||||
{
|
||||
float yoffadj = 0;
|
||||
if (itemInfo.IsTable && MyFlexGrid.BorderStyle == C1.Win.C1FlexGrid.Util.BaseControls.BorderStyleEnum.None && !MyFlexGrid.TopRowHasBorder())
|
||||
yoffadj = SixLinesPerInch; // adjust the yoffset if the note is off of a borderless table
|
||||
yoff = ChildrenAbove.Add(cb, itemInfo.Notes, xoff, yoff + yoffadj, yoff + yoffadj, rnoLevel, maxRNO, formatInfo) - yoffadj;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -3771,14 +3786,14 @@ namespace Volian.Print.Library
|
||||
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm ||
|
||||
(MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvert && MyItemInfo.IsStep && MyItemInfo.FormatStepData.StepLayoutData.STBoxindex != null))
|
||||
{
|
||||
if ((MyItemInfo.IsCaution || MyItemInfo.IsNote || MyItemInfo.MyParent.IsCaution || MyItemInfo.MyParent.IsNote) && !MyItemInfo.FormatStepData.SpaceIn
|
||||
&& (MyItemInfo.Steps == null || MyItemInfo.Steps.Count == 0)
|
||||
&& (MyItemInfo.NextItem == null || MyItemInfo.MyContent.Type != MyItemInfo.NextItem.MyContent.Type)) return 0;
|
||||
if ((MyItemInfo.IsCaution || MyItemInfo.IsNote || MyItemInfo.MyParent.IsCaution || MyItemInfo.MyParent.IsNote) && !MyItemInfo.FormatStepData.SpaceIn
|
||||
&& (MyItemInfo.Steps == null || MyItemInfo.Steps.Count == 0)
|
||||
&& (MyItemInfo.NextItem == null || MyItemInfo.MyContent.Type != MyItemInfo.NextItem.MyContent.Type)) return 0;
|
||||
if (everyNLines == 99 && MyItemInfo.NextItem == null)
|
||||
{
|
||||
if (MyItemInfo.Steps != null && MyItemInfo.Steps.Count > 0 && MyItemInfo.Steps[0].MyContent.Type == MyItemInfo.MyContent.Type) return 0;
|
||||
if (MyItemInfo.MyParent.NextItem != null && MyItemInfo.MyParent.NextItem.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.NextItem != null && MyItemInfo.MyParent.NextItem.MyContent.Type == MyItemInfo.MyContent.Type) return 0;
|
||||
}
|
||||
}
|
||||
if (MyItemInfo.Ordinal % everyNLines == 0 || MyItemInfo.NextItem == null) return SixLinesPerInch;
|
||||
// Pagination issue to be used with yEndsWithBlankLine in Pagination code, but not checked in yet.
|
||||
@ -4827,11 +4842,11 @@ namespace Volian.Print.Library
|
||||
XOffset += mycolT; // adjust caution/note text position
|
||||
if (PartsLeft != null && PartsLeft.Count > 0)// adjust tab position
|
||||
{
|
||||
if(myTab!=null && (itemInfo.IsNote || itemInfo.IsCaution))
|
||||
if (myTab != null && (itemInfo.IsNote || itemInfo.IsCaution))
|
||||
Width -= myTab.Width;
|
||||
foreach (vlnPrintObject vpo in PartsLeft)
|
||||
vpo.XOffset += mycolT;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (itemInfo.IsSection)
|
||||
{
|
||||
@ -4868,10 +4883,10 @@ namespace Volian.Print.Library
|
||||
}
|
||||
else if (itemInfo.MyParent.IsCaution || itemInfo.MyParent.IsNote)
|
||||
{
|
||||
if(itemInfo.ActiveFormat.MyStepSectionLayoutData.DevNoteOrCautionTabOffset != null)
|
||||
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 = 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
|
||||
@ -4884,7 +4899,7 @@ namespace Volian.Print.Library
|
||||
else if (MyParent.WidthNoLimit != 0)
|
||||
Width = adjwidth + MyParent.WidthNoLimit - tabWidth + (myTab == null ? 0 : myTab.TabAlign);
|
||||
else if ((itemInfo.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_PageListSpBckgrnd) == E_DocStructStyle.DSS_PageListSpBckgrnd)
|
||||
Width = adjwidth + MyParent.Width - (MyTab!=null?MyTab.Width:0);
|
||||
Width = adjwidth + MyParent.Width - (MyTab != null ? MyTab.Width : 0);
|
||||
else
|
||||
Width = adjwidth + MyParent.Width - tabWidth + (myTab == null ? 0 : myTab.TabAlign);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user