remove VCB1 tabbing code because of change of tabs; step tab on Example should skip paragraph level if off paragraph
This commit is contained in:
parent
df2240ad94
commit
ef338c9e74
@ -3628,15 +3628,11 @@ namespace VEPROMS.CSLA.Library
|
||||
bool doMeta = false;
|
||||
if (sd.StepSectionLayoutData.TieTabToLevel && ActiveFormat.PlantFormat.FormatData.SectData.UseMetaSections)
|
||||
{
|
||||
// the DSS_SameXOFfSubsections was added for VC Summer Unit 2 & 3 (vcb format) so that all subsections are indented
|
||||
// the same amount and this is also used for determining level for sequential tabbing, i.e. what seqfmt item to use for
|
||||
// sequential level.
|
||||
bool scttablev = ((MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_SameXOffSubsections) == E_DocStructStyle.DSS_SameXOffSubsections);
|
||||
if (sd.StepSectionLayoutData.ShowSectionTitles
|
||||
&& !MyDocStyle.CancelSectTitle
|
||||
&& !(MyDocStyle.SpecialStepsFoldout && MyDocStyle.UseColSByLevel))
|
||||
localPrintLevel = PrintLevel + (((ActiveFormat.PlantFormat.FormatData.Express && IsSequential) || scttablev) ? 0 : CurrentSectionLevel());
|
||||
if (!ActiveFormat.PlantFormat.FormatData.Express && !scttablev) doMeta = true;
|
||||
localPrintLevel = PrintLevel + (((ActiveFormat.PlantFormat.FormatData.Express && IsSequential)) ? 0 : CurrentSectionLevel());
|
||||
if (!ActiveFormat.PlantFormat.FormatData.Express) doMeta = true;
|
||||
}
|
||||
if (sd.StepSectionLayoutData.TieTabToLevel && ActiveFormat.PlantFormat.FormatData.SectData.CountSubSectionsForLevel)
|
||||
if (SectionLevel() > 1)
|
||||
@ -3968,7 +3964,9 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
// fix for Westinghouse single column
|
||||
// - increament the level on a section only if the first character is a number B2016-075 03-09-2016
|
||||
if (ii.IsSection && (ii.MyTab.Text != null && ii.MyTab.Text.Length > 0 && char.IsNumber(ii.MyTab.Text.Trim()[0]))) level++;
|
||||
// Note that 'DisplayNumber' is used rather than MyTab. MyTab was not always set.
|
||||
//if (ii.IsSection && (ii.MyTab.Text != null && ii.MyTab.Text.Length > 0 && char.IsNumber(ii.MyTab.Text.Trim()[0]))) level++;
|
||||
if (ii.IsSection && (ii.DisplayNumber != null && ii.DisplayNumber.Length > 0 && char.IsNumber(ii.DisplayNumber.Trim()[0]))) level++;
|
||||
ii = ii.ActiveParent as ItemInfo;
|
||||
}
|
||||
return level;
|
||||
@ -4169,7 +4167,7 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
}
|
||||
|
||||
// If we're in a subsection, be sure there is a '.' at the end.
|
||||
// If we're in a subsection, be sure there is a '.' at the end. The following uses config flags for indenting to determine CurrentSectionLevel:
|
||||
int subsection = CurrentSectionLevel();
|
||||
if (subsection >= 1)
|
||||
{
|
||||
@ -4177,6 +4175,20 @@ namespace VEPROMS.CSLA.Library
|
||||
if (tmptab.LastIndexOf(".") != tmptab.Length - 1) tmptab = tmptab + ".";
|
||||
return tmptab;
|
||||
}
|
||||
// If the tbformat is "{Section Prefix}{numeric}" and section prefix ends in an integer, add a '.'
|
||||
if (tbformat.Contains("{Section Prefix}{numeric}") && MyParent.IsSection)
|
||||
{
|
||||
string tmptab = ActiveSection.MyTab.CleanText.TrimEnd();
|
||||
if (tmptab.Length > 0)
|
||||
{
|
||||
string l = tmptab.Substring(tmptab.Length - 1);
|
||||
if (char.IsLetterOrDigit(l[0]))
|
||||
{
|
||||
if (tmptab.LastIndexOf(".") != tmptab.Length - 1) tmptab = tmptab + ".";
|
||||
return tmptab;
|
||||
}
|
||||
}
|
||||
}
|
||||
return ActiveSection.MyTab.CleanText.TrimEnd();
|
||||
}
|
||||
|
||||
@ -4267,11 +4279,20 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
|
||||
}
|
||||
// For VS Summer Unit 2 & 3 (vcb formats) include step number in Note & Caution header
|
||||
// For VC Summer Unit 2 & 3 (vcb formats) include step number in Note & Caution header
|
||||
if (FormatStepData.TabData.IncludeStepNum && MyHeader != null && MyParent != null && MyParent.CombinedTab != null)
|
||||
{
|
||||
MyHeader.Text = MyHeader.Text + ((MyParent == null) ? "" : " Step " + MyParent.CombinedTab.TrimEnd(".".ToCharArray()));
|
||||
MyHeader.CleanText = MyHeader.CleanText + ((MyParent == null) ? "" : " Step " + MyParent.CombinedTab.TrimEnd(".".ToCharArray()));
|
||||
// if my parent is a paragraph, then don't use the paragraph tab in the header, use the parent of the paragraph:
|
||||
if (MyParent.IsParagraph)
|
||||
{
|
||||
MyHeader.Text = MyHeader.Text + ((MyParent == null) ? "" : " Step " + MyParent.MyParent.MyTab.CleanText.TrimEnd(".".ToCharArray()));
|
||||
MyHeader.CleanText = MyHeader.CleanText + ((MyParent == null) ? "" : " Step " + MyParent.MyParent.MyTab.CleanText.TrimEnd(".".ToCharArray()));
|
||||
}
|
||||
else
|
||||
{
|
||||
MyHeader.Text = MyHeader.Text + ((MyParent == null) ? "" : " Step " + MyParent.MyTab.CleanText.TrimEnd(".".ToCharArray()));
|
||||
MyHeader.CleanText = MyHeader.CleanText + ((MyParent == null) ? "" : " Step " + MyParent.MyTab.CleanText.TrimEnd(".".ToCharArray()));
|
||||
}
|
||||
}
|
||||
return tbformat;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user