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
|
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);
|
// B2022-035: resolve unit specific designators - moved code to ResolveUnitSpecific so other objects can use it.
|
||||||
text = Regex.Replace(text, @"\<(U(-|\\u8209\?)ID)\>", _MyItemInfo.MyDocVersion.DocVersionConfig.Unit_ID, RegexOptions.IgnoreCase);
|
text = ResolveUnitSpecific(_MyItemInfo.MyDocVersion, text);
|
||||||
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);
|
|
||||||
text = text.Replace(@"<S\u8209?ID>", _MyItemInfo.MyDocVersion.DocVersionConfig.Unit_ProcedureSetID);
|
text = text.Replace(@"<S\u8209?ID>", _MyItemInfo.MyDocVersion.DocVersionConfig.Unit_ProcedureSetID);
|
||||||
//text = text.Replace("<U>", _MyItemInfo.MyDocVersion.DocVersionConfig.Unit_Number);
|
|
||||||
}
|
}
|
||||||
// Adjust RO display
|
// Adjust RO display
|
||||||
if (ROsShouldBeAdjusted)
|
if (ROsShouldBeAdjusted)
|
||||||
@ -482,6 +467,29 @@ namespace VEPROMS.CSLA.Library
|
|||||||
ProfileTimer.Pop(profileDepth);
|
ProfileTimer.Pop(profileDepth);
|
||||||
return text;
|
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
|
// F2019-065: Upper case if step format has flag
|
||||||
private string UpCaseStep(string text)
|
private string UpCaseStep(string text)
|
||||||
{
|
{
|
||||||
|
@ -2765,11 +2765,8 @@ namespace VEPROMS.CSLA.Library
|
|||||||
get
|
get
|
||||||
{
|
{
|
||||||
string str = MyContent.Text;
|
string str = MyContent.Text;
|
||||||
str = Regex.Replace(str, @"\<[uU]\>", MyDocVersion.DocVersionConfig.Unit_Number);
|
// B2022-035: resolve unit specific designators
|
||||||
//if (str.Contains("<u>"))
|
if (str.ToUpper().Contains(@"<U")) str = VEPROMS.CSLA.Library.DisplayText.ResolveUnitSpecific(this.MyDocVersion, str);
|
||||||
// str = str.Replace("<u>", MyDocVersion.DocVersionConfig.Unit_Number);
|
|
||||||
//if (str.Contains("<U>"))
|
|
||||||
// str = str.Replace("<U>", MyDocVersion.DocVersionConfig.Unit_Number);
|
|
||||||
return ConvertToDisplayText(str, false);
|
return ConvertToDisplayText(str, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2801,7 +2798,8 @@ namespace VEPROMS.CSLA.Library
|
|||||||
string str = MyContent.Text;
|
string str = MyContent.Text;
|
||||||
if (MyDocVersion != null)
|
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
|
else
|
||||||
{
|
{
|
||||||
|
@ -1789,6 +1789,8 @@ i = 0;
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (section.ActiveFormat.PlantFormat.FormatData.ProcData.CapitalizeTitle) title = title.ToUpper();
|
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);
|
plstr = SplitTitle(svgGroup, pageItem, title, (int)linelen, token, plstr, null); //,rowAdj);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user