B2020-127 – Check for a “?” when trying to parse out a RO Image file name.

This commit is contained in:
John Jenko 2020-10-08 19:39:07 +00:00
parent d7832cfa57
commit 33a3ec3940

View File

@ -582,7 +582,9 @@ namespace VEPROMS.CSLA.Library
public string FixContentText(RoUsageInfo rousg, string value, int rotype, ROFstInfo origROFstInfo) public string FixContentText(RoUsageInfo rousg, string value, int rotype, ROFstInfo origROFstInfo)
{ {
string filenameonly = null; string filenameonly = null;
if (Text != null && Text.Length > 0) //B2020-127 don't try to parse out a file name from "?" (happens with the RO figure no longer exists)
// - this allows it to drop through and put an annotation on the step
if (Text != null && Text.Length > 0 && value != "?")
{ {
if (ContentItems[0].MyItem.MyItemInfo.IsFigure) if (ContentItems[0].MyItem.MyItemInfo.IsFigure)
filenameonly = value.Substring(0, value.IndexOf("\n")); filenameonly = value.Substring(0, value.IndexOf("\n"));
@ -964,7 +966,9 @@ namespace VEPROMS.CSLA.Library
public void FixContentText(RoUsageInfo rousg, string value, int rotype, ROFstInfo origROFstInfo, ItemInfo ii) // string newvalue) public void FixContentText(RoUsageInfo rousg, string value, int rotype, ROFstInfo origROFstInfo, ItemInfo ii) // string newvalue)
{ {
string fileNameOnly = null; string fileNameOnly = null;
if (ii.IsFigure && Text != null && Text.Length > 0) //B2020-127 don't try to parse out a file name from "?" (happens with the RO figure no longer exists)
// - this allows it to drop through and put an annotation on the step
if (ii.IsFigure && Text != null && Text.Length > 0 && value != "?")
fileNameOnly = value.Substring(0,value.IndexOf("\n")).Replace(@"\u8209?","-"); // check only the file name of the RO figure fileNameOnly = value.Substring(0,value.IndexOf("\n")).Replace(@"\u8209?","-"); // check only the file name of the RO figure
string newvalue = value; string newvalue = value;
newvalue = newvalue.Replace("{", @"\{").Replace("}", @"\}"); newvalue = newvalue.Replace("{", @"\{").Replace("}", @"\}");