Various FNP tabbing & template fixes
Get text for template steps Template improvements & added AlignHLSTabWithSectOvride for FNP Support for TitleWithTextRight step types Support PSOnlyFirst docstyle flag for FNP Printing of FNP’s component lists (templates), PSOnlyFirst docstyle, PrintNoTitle, subsection has own docstyle, and FNP tab locations Support PSOnlyFirst docstyle, Like6_ButDoesntNeedSubsection numberingsequence & PrintNoTitle, for FNP
This commit is contained in:
@@ -2599,21 +2599,35 @@ namespace VEPROMS.CSLA.Library
|
||||
else if (myparent.IsSection || myparent.IsHigh || myparent.IsSequential || (myparent.IsRNOPart && myparent.FormatStepData.NumberHighLevel && tbformat.ToUpper().Contains("WPAR")))
|
||||
{
|
||||
parentTab = myparent.MyTab.CleanText.Trim();
|
||||
if (((MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_AddDotZeroStdHLS) == E_DocStructStyle.DSS_AddDotZeroStdHLS) && myparent.MyContent.Type == 20002)
|
||||
parentTab = parentTab.Replace(".0", ""); // this was added in, remove for substeps.
|
||||
tbformat = parentTab + (parentTab.EndsWith(".") ? "" : ".") + tbformat.TrimStart();
|
||||
if (myparent.MyTab.AdjustTabSpace)
|
||||
if (tbformat.EndsWith(" ")) tbformat = tbformat.Substring(0, tbformat.Length - 1);
|
||||
}
|
||||
}
|
||||
// If the document style has the flag DSS_UnNumLikeRoman, don't do the normal tab, change to alpha,
|
||||
// but only if there is a tab string for this step. (the High level step is numbered with roman numerals, so
|
||||
// don't want to continue using the roman numeral concatenated with substep tabs.
|
||||
if (!IsHigh && tbformat != null && tbformat != "" && (MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_UnNumLikeRoman) == E_DocStructStyle.DSS_UnNumLikeRoman)
|
||||
tbformat = "{alpha}. ";
|
||||
|
||||
if (tbformat.IndexOf("#2#") > -1)
|
||||
// but only if there is a tab string for this step and it includes the HLS/parent tab. The HLS is numbered
|
||||
// with roman numerals, so don't want to continue using the roman numeral concatenated with substep tabs.
|
||||
if (!IsHigh && (MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_UnNumLikeRoman) == E_DocStructStyle.DSS_UnNumLikeRoman)
|
||||
{
|
||||
int indxlb = tbformat.IndexOf("#");
|
||||
string ofst = tbformat.Substring(indxlb + 1, 3);
|
||||
_MyTab.Offset = Convert.ToInt32(ofst.Substring(0, 1)) * (int)FormatStepData.TabData.Font.CPI;
|
||||
tbformat = tbformat.Replace("#2#", "");
|
||||
// the parent has to have a roman numeral as its tab.
|
||||
if (MyParent.FormatStepData.TabData.IdentPrint.ToUpper().Contains("ROMAN") &&
|
||||
tbformat != null && tbformat != "" && tbformat.ToUpper().Contains("WPAR"))
|
||||
tbformat = "{alpha}. ";
|
||||
}
|
||||
|
||||
if (tbformat.IndexOf("#2#") > -1 || tbformat.IndexOf("#1#") > -1)
|
||||
{
|
||||
//16 bit code limits the #2# offset logic to the docstyle cannot have the DSS_ADDDOTZEROSTDHLS &
|
||||
// its HLS is type std high:
|
||||
if (!(((MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_AddDotZeroStdHLS) == E_DocStructStyle.DSS_AddDotZeroStdHLS) && this.MyHLS.MyContent.Type == 20002))
|
||||
{
|
||||
int indxlb = tbformat.IndexOf("#");
|
||||
string ofst = tbformat.Substring(indxlb + 1, 3);
|
||||
_MyTab.Offset = Convert.ToInt32(ofst.Substring(0, 1)) * (int)FormatStepData.TabData.Font.CPI;
|
||||
}
|
||||
tbformat = tbformat.Replace("#2#", "").Replace("#1#", "");
|
||||
}
|
||||
if (tbformat.IndexOf("{Pos") > -1)
|
||||
{
|
||||
@@ -2643,9 +2657,19 @@ namespace VEPROMS.CSLA.Library
|
||||
tbformat = tbformat.Replace("{alphaWpar}", alpha.ToLower());
|
||||
tbformat = tbformat.Replace("{ALPHA}", alpha);
|
||||
tbformat = tbformat.Replace("{ALPHAWpar}", alpha);
|
||||
string roman = RomanNumbering(ordinal);
|
||||
tbformat = tbformat.Replace("{roman}", roman.ToLower());
|
||||
tbformat = tbformat.Replace("{ROMAN}", roman);
|
||||
if (tbformat.ToUpper().Contains("ROMAN"))
|
||||
{
|
||||
string roman = RomanNumbering(ordinal);
|
||||
tbformat = tbformat.Replace("{roman}", roman.ToLower());
|
||||
tbformat = tbformat.Replace("{ROMAN}", roman);
|
||||
tbformat = tbformat.Substring(0, tbformat.Length - ((roman.Length - 1)>0?(roman.Length - 1):0));
|
||||
}
|
||||
if (ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.VirtualDotInHLSTab && tbformat.Contains("numeric") & ordinal > 9) MyTab.AdjustTabSpace = true;
|
||||
if (tbformat.Contains("{numeric}") && ((MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_AddDotZeroStdHLS) == E_DocStructStyle.DSS_AddDotZeroStdHLS) && MyContent.Type == 20002)
|
||||
{
|
||||
tbformat = tbformat.Replace("{numeric}", ordinal.ToString().PadLeft(2) + ".0");
|
||||
tbformat = tbformat.Substring(0, tbformat.Length - 2);
|
||||
}
|
||||
tbformat = tbformat.Replace("{numeric}", trimTabStart ? ordinal.ToString() : FormatStepData.AtLeastTwoDigits ? ordinal.ToString().PadLeft(2, '0') : ordinal.ToString().PadLeft(2));
|
||||
if (tbformate != null) tbformate = tbformate.Replace("{numeric}", trimTabStart ? ordinal.ToString() : FormatStepData.AtLeastTwoDigits ? ordinal.ToString().PadLeft(2, '0') : ordinal.ToString().PadLeft(2));
|
||||
tbformat = tbformat.Replace("{numericWpar}", ordinal.ToString());
|
||||
@@ -2771,7 +2795,7 @@ namespace VEPROMS.CSLA.Library
|
||||
OffsetTab = TopRNO.FormatStepData.NumberHighLevel?1:0;
|
||||
_PrintBias = 0;
|
||||
if (par.FormatStepData != null && par.FormatStepData.TabData.IdentPrint.Contains("{ALPHA}"))
|
||||
level--;
|
||||
level--;
|
||||
|
||||
// ImperfectStructure is used so that the sequential numbering for substeps under an RNO is not same
|
||||
// numbering (alpha vs numeric), if the HLS has substeps - WCN uses this, as well as other plants.
|
||||
@@ -3174,9 +3198,15 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
#endregion
|
||||
#region UseSmartTemplate
|
||||
public bool IsInTemplate()
|
||||
{
|
||||
if (IsStep && FormatStepData.MyFormat.PlantFormat.FormatData.TopTemplateTypes.ContainsKey((int)MyContent.Type - 20001)) return true;
|
||||
return false;
|
||||
}
|
||||
public int GetSmartTemplateTopLevelIndx()
|
||||
{
|
||||
FormatData formatData = FormatStepData.MyFormat.PlantFormat.FormatData;
|
||||
if (formatData.TopTemplateTypes == null || formatData.TopTemplateTypes.Count == 0) return -1;
|
||||
ItemInfo tmp = this;
|
||||
while (!tmp.IsSection)
|
||||
{
|
||||
@@ -3188,6 +3218,7 @@ namespace VEPROMS.CSLA.Library
|
||||
public int GetSmartTemplateIndex(int topIndx, int curStepType)
|
||||
{
|
||||
FormatData formatData = FormatStepData.MyFormat.PlantFormat.FormatData;
|
||||
if (formatData.TopTemplateTypes == null || formatData.TopTemplateTypes.Count == 0) return -1;
|
||||
int indx = topIndx;
|
||||
int curType = curStepType - 20001;
|
||||
while (indx < formatData.Templates.Count)
|
||||
@@ -3392,6 +3423,12 @@ namespace VEPROMS.CSLA.Library
|
||||
get { return _RemovedStyleUnderline; }
|
||||
set { _RemovedStyleUnderline = value; }
|
||||
}
|
||||
private bool _AdjustTabSpace = false;
|
||||
public bool AdjustTabSpace
|
||||
{
|
||||
get { return _AdjustTabSpace; }
|
||||
set { _AdjustTabSpace = value; }
|
||||
}
|
||||
public Tab(VE_Font font)
|
||||
{
|
||||
MyFont = font;
|
||||
|
@@ -339,7 +339,7 @@ namespace VEPROMS.CSLA.Library
|
||||
newItemID = siblingSmart.ItemID;
|
||||
}
|
||||
|
||||
tmptext = FormatStepData.MyFormat.PlantFormat.FormatData.NewTemplateFormat ? " ": FormatStepData.MyFormat.PlantFormat.FormatData.Templates[tpIndx].text;
|
||||
tmptext = /*FormatStepData.MyFormat.PlantFormat.FormatData.NewTemplateFormat ? " ": */FormatStepData.MyFormat.PlantFormat.FormatData.Templates[tpIndx].text;
|
||||
tmp = NewItemInfoFetch(newItemID, addPart, null, tmptext, FormatStepData.MyFormat.PlantFormat.FormatData.Templates[tpIndx].type + 20001, (int ?)fromType, null, null, DateTime.Now, Volian.Base.Library.VlnSettings.UserID);
|
||||
newItemID = tmp.ItemID;
|
||||
if (level < prevlevel) siblingSmart = tmp;
|
||||
|
Reference in New Issue
Block a user