B2023-037: Handle <=, >=, +-, -> and <- symbols in ROs.
This commit is contained in:
@@ -900,7 +900,7 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
string oldText = this.MyContent.Text;
|
||||
|
||||
string roval = lookup.GetTranslatedRoValue(rousage.ROID, this.ActiveSection.ActiveFormat.PlantFormat.FormatData.SectData.ConvertCaretToDelta, this.ActiveSection.ActiveFormat.PlantFormat.FormatData.SectData.UseTildaPoundCharsForSuperSubScriptInROValues);
|
||||
string roval = lookup.GetTranslatedRoValue(rousage.ROID, this.ActiveSection.ActiveFormat.PlantFormat.FormatData.SectData.ConvertCaretToDelta, this.ActiveSection.ActiveFormat.PlantFormat.FormatData.SectData.UseTildaPoundCharsForSuperSubScriptInROValues, false);
|
||||
ROFSTLookup.rochild roch = lookup.GetRoChild(rousage.ROID);
|
||||
|
||||
this.MyContent.FixContentText(rousage, roval, roch.type, rofstinfo, this);
|
||||
@@ -956,7 +956,7 @@ namespace VEPROMS.CSLA.Library
|
||||
ROCheckCount++;
|
||||
string oldText = itemInfo.MyContent.Text;
|
||||
|
||||
string roval = lookup.GetTranslatedRoValue(rousage.ROID, sectionInfo.ActiveFormat.PlantFormat.FormatData.SectData.ConvertCaretToDelta, sectionInfo.ActiveFormat.PlantFormat.FormatData.SectData.UseTildaPoundCharsForSuperSubScriptInROValues);
|
||||
string roval = lookup.GetTranslatedRoValue(rousage.ROID, sectionInfo.ActiveFormat.PlantFormat.FormatData.SectData.ConvertCaretToDelta, sectionInfo.ActiveFormat.PlantFormat.FormatData.SectData.UseTildaPoundCharsForSuperSubScriptInROValues, false);
|
||||
ROFSTLookup.rochild roch = lookup.GetRoChild(rousage.ROID);
|
||||
|
||||
itemInfo.MyContent.FixContentText(rousage, roval, roch.type, origROFst, itemInfo);
|
||||
@@ -1019,11 +1019,33 @@ namespace VEPROMS.CSLA.Library
|
||||
***/
|
||||
|
||||
}
|
||||
private static bool DifferentROtext(string newText, string oldText)
|
||||
private static bool DifferentROtext(string newText, string oldText)
|
||||
{
|
||||
string nt = newText.Replace(@"\u8209?", "-").Replace(@"\u160?", " ").Replace("\xA0", " ");
|
||||
string ot = oldText.Replace(@"\u8209?", "-").Replace(@"\u160?", " ").Replace("\xA0", " ");
|
||||
if (nt.Equals(ot))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// B2023-037: Handle <=, >=, +-, -> and <- symbols. Previous code changes replaced these symbol pairs with their
|
||||
// unicode representation, thus link text data may have the Unicode character. This code update keeps the double
|
||||
// character sequences in the link text (the RO text as is) and just converts when needing the output. When
|
||||
// updating ROs need to check for unicode characters too since some data may have that
|
||||
nt = nt.Replace(@"\u8594?", "->"); // Right Arrow
|
||||
ot = ot.Replace(@"\u8594?", "->"); // Right Arrow
|
||||
nt = nt.Replace(@"\u8592?", "<-"); // Left Arrow
|
||||
ot = ot.Replace(@"\u8592?", "<-"); // Left Arrow
|
||||
nt = nt.Replace(@"\u8804?", "<="); // Less than or Equal
|
||||
ot = ot.Replace(@"\u8804?", "<="); // Less than or Equal
|
||||
nt = nt.Replace(@"\u8805?", ">="); // Greater than or Equal
|
||||
ot = ot.Replace(@"\u8805?", ">="); // Greater than or Equal
|
||||
nt = nt.Replace(@"\u8805?", ">="); // Greater than or Equal
|
||||
ot = ot.Replace(@"\u8805?", ">="); // Greater than or Equal
|
||||
nt = nt.Replace(@"\u8594?", "+-"); // plus minus
|
||||
ot = ot.Replace(@"\u8594?", "+-"); // plus minus
|
||||
nt = nt.Replace(@"\'b1", "+-");
|
||||
ot = ot.Replace(@"\'b1", "+-");
|
||||
if (nt.Equals(ot))
|
||||
{
|
||||
return false;
|
||||
@@ -1151,7 +1173,8 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
if (sectionInfo != null)
|
||||
{
|
||||
string roval = lookup.GetTranslatedRoValue(rousage.ROID, sectionInfo.ActiveFormat.PlantFormat.FormatData.SectData.ConvertCaretToDelta, sectionInfo.ActiveFormat.PlantFormat.FormatData.SectData.UseTildaPoundCharsForSuperSubScriptInROValues);
|
||||
// B2023-037: loading print text, resolve the RO symbols
|
||||
string roval = lookup.GetTranslatedRoValue(rousage.ROID, sectionInfo.ActiveFormat.PlantFormat.FormatData.SectData.ConvertCaretToDelta, sectionInfo.ActiveFormat.PlantFormat.FormatData.SectData.UseTildaPoundCharsForSuperSubScriptInROValues,sectionInfo.ActiveFormat.PlantFormat.FormatData.SectData.ConvertGTELTEPMinROValue|| sectionInfo.ActiveFormat.PlantFormat.FormatData.SectData.UseDashGreaterLessThenForArrowsInROValue);
|
||||
ROFSTLookup.rochild roch = lookup.GetRoChild(rousage.ROID);
|
||||
itemInfo.MyContent.FixContentText(rousage, roval, roch.type, rofstinfo, itemInfo);
|
||||
}
|
||||
|
Reference in New Issue
Block a user