B2024-025 Older Parent/Child procedure sets use applicability tokens that do not include the “U-“ prefix.

This commit is contained in:
2024-05-06 13:49:03 -04:00
parent 89814777b4
commit c865b67398
5 changed files with 79 additions and 40 deletions

View File

@@ -1834,7 +1834,8 @@ i = 0;
{
if (section.ActiveFormat.PlantFormat.FormatData.ProcData.CapitalizeTitle) title = title.ToUpper();
// B2022-035: resolve unit specific designators
if (title.ToUpper().Contains(@"<U")) title = VEPROMS.CSLA.Library.DisplayText.ResolveUnitSpecific(section.MyDocVersion, title);
// B2024-025 - process all of the applicability token (<U-xxx>, <U>, <ID>)
title = VEPROMS.CSLA.Library.DisplayText.ResolveUnitSpecific(section.MyDocVersion, title);
plstr = SplitTitle(svgGroup, pageItem, title, (int)linelen, token, plstr, null); //,rowAdj);
}
break;
@@ -1847,7 +1848,8 @@ i = 0;
string title1 = section.MyProcedure.MyContent.Text;
if (section.ActiveFormat.PlantFormat.FormatData.ProcData.CapitalizeTitle) title1 = title1.ToUpper();
// F2024-012 copied this line from above (processing COVERPROCTITLE) to resolve unit designators in the procedure title
if (title1.ToUpper().Contains(@"<U")) title1 = VEPROMS.CSLA.Library.DisplayText.ResolveUnitSpecific(section.MyDocVersion, title1);
// B2024-025 - process all of the applicability token (<U-xxx>, <U>, <ID>)
title1 = VEPROMS.CSLA.Library.DisplayText.ResolveUnitSpecific(section.MyDocVersion, title1);
plstr = SplitCoverTitle(svgGroup, pageItem, title1, (int)coverlinelen, token, plstr);//, rowAdj);
break;
case "{TITLE&UNIT}":
@@ -2471,6 +2473,9 @@ i = 0;
private string ResolveUnitApp(DocVersionInfo dvi, string str)
{
if (dvi == null) return str;
// B2024-025 - process all of the applicability token (<U-xxx>, <U>, <ID>)
str = VEPROMS.CSLA.Library.DisplayText.ResolveUnitSpecific(dvi, str);
// look for un-resolved tokens and replace less/greater than chars with "*?" and "?*" respectively
string tmp = str.ToUpper();
int sindx = tmp.IndexOf("<U");
int eindx = tmp.IndexOf(">", sindx + 1);
@@ -2479,21 +2484,34 @@ i = 0;
{
reptmp = str.Substring(sindx, eindx - sindx + 1);
tmp = reptmp.ToUpper();
if (tmp == "<U>") str = str.Replace(reptmp, dvi.DocVersionConfig.Unit_Number);
else if (tmp == "<U-TEXT>") str = str.Replace(reptmp, dvi.DocVersionConfig.Unit_Text);
else if (tmp == "<U-NUMBER>") str = str.Replace(reptmp, dvi.DocVersionConfig.Unit_Number);
else if (tmp == "<U-NAME>") str = str.Replace(reptmp, dvi.DocVersionConfig.Unit_Name);
else if (tmp == "<U-ID>") str = str.Replace(reptmp, dvi.DocVersionConfig.Unit_ID);
// B2021-145: For applicability, the tree view & pdf file name are not getting resolved when using any of the <20>OTHER<45> tokens
else if (tmp == "<U-OTHERTEXT>") str = str.Replace(reptmp, dvi.DocVersionConfig.Other_Unit_Text);
else if (tmp == "<U-OTHERNUMBER>") str = str.Replace(reptmp, dvi.DocVersionConfig.Other_Unit_Number);
else if (tmp == "<U-OTHERNAME>") str = str.Replace(reptmp, dvi.DocVersionConfig.Other_Unit_Name);
else if (tmp == "<U-OTHERID>") str = str.Replace(reptmp, dvi.DocVersionConfig.Other_Unit_ID);
else str = str.Replace(reptmp, tmp.Replace("<", "*?").Replace(">", "?*"));
str = str.Replace(reptmp, tmp.Replace("<", "*?").Replace(">", "?*"));
tmp = str.ToUpper();
sindx = tmp.IndexOf("<U");
eindx = tmp.IndexOf(">", sindx + 1);
}
//string tmp = str.ToUpper();
//int sindx = tmp.IndexOf("<U");
//int eindx = tmp.IndexOf(">", sindx + 1);
//string reptmp;
//while (sindx > -1 && eindx > -1) // B2022-007 added while loop to process more than one <U- RO value
//{
// reptmp = str.Substring(sindx, eindx - sindx + 1);
// tmp = reptmp.ToUpper();
// if (tmp == "<U>") str = str.Replace(reptmp, dvi.DocVersionConfig.Unit_Number);
// else if (tmp == "<U-TEXT>") str = str.Replace(reptmp, dvi.DocVersionConfig.Unit_Text);
// else if (tmp == "<U-NUMBER>") str = str.Replace(reptmp, dvi.DocVersionConfig.Unit_Number);
// else if (tmp == "<U-NAME>") str = str.Replace(reptmp, dvi.DocVersionConfig.Unit_Name);
// else if (tmp == "<U-ID>") str = str.Replace(reptmp, dvi.DocVersionConfig.Unit_ID);
// // B2021-145: For applicability, the tree view & pdf file name are not getting resolved when using any of the <20>OTHER<45> tokens
// else if (tmp == "<U-OTHERTEXT>") str = str.Replace(reptmp, dvi.DocVersionConfig.Other_Unit_Text);
// else if (tmp == "<U-OTHERNUMBER>") str = str.Replace(reptmp, dvi.DocVersionConfig.Other_Unit_Number);
// else if (tmp == "<U-OTHERNAME>") str = str.Replace(reptmp, dvi.DocVersionConfig.Other_Unit_Name);
// else if (tmp == "<U-OTHERID>") str = str.Replace(reptmp, dvi.DocVersionConfig.Other_Unit_ID);
// else str = str.Replace(reptmp, tmp.Replace("<", "*?").Replace(">", "?*"));
// tmp = str.ToUpper();
// sindx = tmp.IndexOf("<U");
// eindx = tmp.IndexOf(">", sindx + 1);
//}
return str;
}
// B2019-076: moved the following to DocVersionExt.cs to make it available to transitionext.cs code.