B2022-035: <U-ID> not getting resolved in Auto Table of Contents and procedure titles
This commit is contained in:
parent
05610f12e7
commit
d053ee5092
@ -364,24 +364,9 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
if (_MyItemInfo != null && ROsShouldBeAdjusted) // B2017-019 - added check for ROsShouldBeAdjusted so that these token are not "cooked" on property pages
|
||||
{
|
||||
text = Regex.Replace(text, @"\<U\>", _MyItemInfo.MyDocVersion.DocVersionConfig.Unit_Number, RegexOptions.IgnoreCase);
|
||||
text = Regex.Replace(text, @"\<(U(-|\\u8209\?)ID)\>", _MyItemInfo.MyDocVersion.DocVersionConfig.Unit_ID, RegexOptions.IgnoreCase);
|
||||
text = Regex.Replace(text, @"\<(U(-|\\u8209\?)NAME)\>", _MyItemInfo.MyDocVersion.DocVersionConfig.Unit_Name, RegexOptions.IgnoreCase);
|
||||
text = Regex.Replace(text, @"\<(U(-|\\u8209\?)TEXT)\>", _MyItemInfo.MyDocVersion.DocVersionConfig.Unit_Text, RegexOptions.IgnoreCase);
|
||||
text = Regex.Replace(text, @"\<(U(-|\\u8209\?)NUMBER)\>", _MyItemInfo.MyDocVersion.DocVersionConfig.Unit_Number, RegexOptions.IgnoreCase);
|
||||
//B2021-148 removed space character after OTHER
|
||||
text = Regex.Replace(text, @"\<(U(-|\\u8209\?)OTHERID)\>", _MyItemInfo.MyDocVersion.DocVersionConfig.Other_Unit_ID, RegexOptions.IgnoreCase);
|
||||
text = Regex.Replace(text, @"\<(U(-|\\u8209\?)OTHERNAME)\>", _MyItemInfo.MyDocVersion.DocVersionConfig.Other_Unit_Name, RegexOptions.IgnoreCase);
|
||||
text = Regex.Replace(text, @"\<(U(-|\\u8209\?)OTHERTEXT)\>", _MyItemInfo.MyDocVersion.DocVersionConfig.Other_Unit_Text, RegexOptions.IgnoreCase);
|
||||
text = Regex.Replace(text, @"\<(U(-|\\u8209\?)OTHERNUMBER)\>", _MyItemInfo.MyDocVersion.DocVersionConfig.Other_Unit_Number, RegexOptions.IgnoreCase);
|
||||
//B2022-023 also check for other followed by a space
|
||||
text = Regex.Replace(text, @"\<(U(-|\\u8209\?)OTHER ID)\>", _MyItemInfo.MyDocVersion.DocVersionConfig.Other_Unit_ID, RegexOptions.IgnoreCase);
|
||||
text = Regex.Replace(text, @"\<(U(-|\\u8209\?)OTHER NAME)\>", _MyItemInfo.MyDocVersion.DocVersionConfig.Other_Unit_Name, RegexOptions.IgnoreCase);
|
||||
text = Regex.Replace(text, @"\<(U(-|\\u8209\?)OTHER TEXT)\>", _MyItemInfo.MyDocVersion.DocVersionConfig.Other_Unit_Text, RegexOptions.IgnoreCase);
|
||||
text = Regex.Replace(text, @"\<(U(-|\\u8209\?)OTHER NUMBER)\>", _MyItemInfo.MyDocVersion.DocVersionConfig.Other_Unit_Number, RegexOptions.IgnoreCase);
|
||||
//text = DoSearchAndReplace(text, "<U-ID>", _MyItemInfo.MyDocVersion.DocVersionConfig.Unit_ID);
|
||||
// B2022-035: resolve unit specific designators - moved code to ResolveUnitSpecific so other objects can use it.
|
||||
text = ResolveUnitSpecific(_MyItemInfo.MyDocVersion, text);
|
||||
text = text.Replace(@"<S\u8209?ID>", _MyItemInfo.MyDocVersion.DocVersionConfig.Unit_ProcedureSetID);
|
||||
//text = text.Replace("<U>", _MyItemInfo.MyDocVersion.DocVersionConfig.Unit_Number);
|
||||
}
|
||||
// Adjust RO display
|
||||
if (ROsShouldBeAdjusted)
|
||||
@ -482,6 +467,29 @@ namespace VEPROMS.CSLA.Library
|
||||
ProfileTimer.Pop(profileDepth);
|
||||
return text;
|
||||
}
|
||||
// B2022-035: resolve unit specific designators - moved code to here so that other objects can use it
|
||||
public static string ResolveUnitSpecific(DocVersionInfo mydocversion, string text)
|
||||
{
|
||||
if (mydocversion == null) return text;
|
||||
text = Regex.Replace(text, @"\<U\>", mydocversion.DocVersionConfig.Unit_Number, RegexOptions.IgnoreCase);
|
||||
text = Regex.Replace(text, @"\<(U(-|\\u8209\?)ID)\>", mydocversion.DocVersionConfig.Unit_ID, RegexOptions.IgnoreCase);
|
||||
text = Regex.Replace(text, @"\<(U(-|\\u8209\?)NAME)\>", mydocversion.DocVersionConfig.Unit_Name, RegexOptions.IgnoreCase);
|
||||
text = Regex.Replace(text, @"\<(U(-|\\u8209\?)TEXT)\>", mydocversion.DocVersionConfig.Unit_Text, RegexOptions.IgnoreCase);
|
||||
text = Regex.Replace(text, @"\<(U(-|\\u8209\?)NUMBER)\>", mydocversion.DocVersionConfig.Unit_Number, RegexOptions.IgnoreCase);
|
||||
//B2021-148 removed space character after OTHER
|
||||
text = Regex.Replace(text, @"\<(U(-|\\u8209\?)OTHERID)\>", mydocversion.DocVersionConfig.Other_Unit_ID, RegexOptions.IgnoreCase);
|
||||
text = Regex.Replace(text, @"\<(U(-|\\u8209\?)OTHERNAME)\>", mydocversion.DocVersionConfig.Other_Unit_Name, RegexOptions.IgnoreCase);
|
||||
text = Regex.Replace(text, @"\<(U(-|\\u8209\?)OTHERTEXT)\>", mydocversion.DocVersionConfig.Other_Unit_Text, RegexOptions.IgnoreCase);
|
||||
text = Regex.Replace(text, @"\<(U(-|\\u8209\?)OTHERNUMBER)\>", mydocversion.DocVersionConfig.Other_Unit_Number, RegexOptions.IgnoreCase);
|
||||
//B2022-023 also check for other followed by a space
|
||||
text = Regex.Replace(text, @"\<(U(-|\\u8209\?)OTHER ID)\>", mydocversion.DocVersionConfig.Other_Unit_ID, RegexOptions.IgnoreCase);
|
||||
text = Regex.Replace(text, @"\<(U(-|\\u8209\?)OTHER NAME)\>", mydocversion.DocVersionConfig.Other_Unit_Name, RegexOptions.IgnoreCase);
|
||||
text = Regex.Replace(text, @"\<(U(-|\\u8209\?)OTHER TEXT)\>", mydocversion.DocVersionConfig.Other_Unit_Text, RegexOptions.IgnoreCase);
|
||||
text = Regex.Replace(text, @"\<(U(-|\\u8209\?)OTHER NUMBER)\>", mydocversion.DocVersionConfig.Other_Unit_Number, RegexOptions.IgnoreCase);
|
||||
|
||||
return text;
|
||||
}
|
||||
|
||||
// F2019-065: Upper case if step format has flag
|
||||
private string UpCaseStep(string text)
|
||||
{
|
||||
|
@ -2765,11 +2765,8 @@ namespace VEPROMS.CSLA.Library
|
||||
get
|
||||
{
|
||||
string str = MyContent.Text;
|
||||
str = Regex.Replace(str, @"\<[uU]\>", MyDocVersion.DocVersionConfig.Unit_Number);
|
||||
//if (str.Contains("<u>"))
|
||||
// str = str.Replace("<u>", MyDocVersion.DocVersionConfig.Unit_Number);
|
||||
//if (str.Contains("<U>"))
|
||||
// str = str.Replace("<U>", MyDocVersion.DocVersionConfig.Unit_Number);
|
||||
// B2022-035: resolve unit specific designators
|
||||
if (str.ToUpper().Contains(@"<U")) str = VEPROMS.CSLA.Library.DisplayText.ResolveUnitSpecific(this.MyDocVersion, str);
|
||||
return ConvertToDisplayText(str, false);
|
||||
}
|
||||
}
|
||||
@ -2801,7 +2798,8 @@ namespace VEPROMS.CSLA.Library
|
||||
string str = MyContent.Text;
|
||||
if (MyDocVersion != null)
|
||||
{
|
||||
str = Regex.Replace(str, @"\<[uU]\>", MyDocVersion.DocVersionConfig.Unit_Number);
|
||||
// B2022-035: resolve unit specific designators
|
||||
if (str.ToUpper().Contains("<U")) str = VEPROMS.CSLA.Library.DisplayText.ResolveUnitSpecific(MyDocVersion, str);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1789,6 +1789,8 @@ i = 0;
|
||||
else
|
||||
{
|
||||
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);
|
||||
plstr = SplitTitle(svgGroup, pageItem, title, (int)linelen, token, plstr, null); //,rowAdj);
|
||||
}
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user