B2023-037: Handle <=, >=, +-, -> and <- symbols in ROs.
This commit is contained in:
@@ -282,6 +282,22 @@ namespace VEPROMS.CSLA.Library
|
||||
|
||||
#endregion
|
||||
|
||||
#region ROTextConvertMethods
|
||||
// B2023-037: Handle <=, >=, +-, -> and <- symbols. Convert to unicode for output, i.e. print and edit/view (when editing
|
||||
// step, will show as 2 characters, not unicode, unless ro inserted when code replaced link text with unicode.
|
||||
public static string ROConvertSymbols(string retval)
|
||||
{
|
||||
retval = retval.Replace("\\u8209?>", @"\u8594?"); // Right Arrow
|
||||
retval = retval.Replace("<\\u8209?", @"\u8592?"); // Left Arrow
|
||||
retval = retval.Replace("->", @"\u8594?"); // Right Arrow
|
||||
retval = retval.Replace("<-", @"\u8592?"); // Left Arrow
|
||||
retval = retval.Replace("<=", @"\u8804?"); // Less than or Equal
|
||||
retval = retval.Replace(">=", @"\u8805?"); // Greater than or Equal
|
||||
retval = retval.Replace("+\\u8209?", @"\'b1"); // plus minus
|
||||
retval = retval.Replace("+-", @"\'b1"); // plus minus
|
||||
return retval;
|
||||
}
|
||||
#endregion
|
||||
#region Public Methods
|
||||
|
||||
#region (RO Search / Collections)
|
||||
@@ -468,7 +484,7 @@ namespace VEPROMS.CSLA.Library
|
||||
return rc;
|
||||
}
|
||||
|
||||
public string GetTranslatedRoValue(string roid, bool DoCaret, bool DoDOSSuperSubScript)
|
||||
public string GetTranslatedRoValue(string roid, bool DoCaret, bool DoDOSSuperSubScript, bool convertRoSymbols)
|
||||
{
|
||||
roid = FormatRoidKey(roid, true);
|
||||
|
||||
@@ -478,6 +494,10 @@ namespace VEPROMS.CSLA.Library
|
||||
return "?"; // Returning a "?" character indicates that the selected RO Value no longer exists or has been deleted.
|
||||
|
||||
retval = ReplaceUnicode(retval, DoCaret);
|
||||
// B2023-037: Handle <=, >=, +-, -> and <- symbols. Convert to unicode for output, i.e. print and edit/view (when editing
|
||||
// step, will show as 2 characters, not unicode, unless ro inserted when code replaced link text with unicode.
|
||||
if (convertRoSymbols) retval = ROFSTLookup.ROConvertSymbols(retval);
|
||||
|
||||
retval = ConvertFortranFormatToScienctificNotation(retval);
|
||||
|
||||
// B2019-037 handle the super an sub scripts after getting the RO value from the FST
|
||||
|
Reference in New Issue
Block a user