Some ROs use special character 0xF8 rather than 0xB0 for the degree character. This change allows these ROs to print properly when used in MSWord sections.

This commit is contained in:
Rich 2014-06-18 12:41:22 +00:00
parent b6d89593b9
commit aad9f0e850

View File

@ -740,6 +740,7 @@ namespace VEPROMS.CSLA.Library
{ {
string xyplot = selxy.Text; string xyplot = selxy.Text;
xyplot = xyplot.Replace("`", "\xB0"); xyplot = xyplot.Replace("`", "\xB0");
xyplot = xyplot.Replace("\xF8", "\xB0");
// The 16bit code must have kept the carriage returns in the word doc, if there // The 16bit code must have kept the carriage returns in the word doc, if there
// are carriage returns in the plot language. Count number of carriage return/newlines // are carriage returns in the plot language. Count number of carriage return/newlines
// so that they can be added back. // so that they can be added back.
@ -863,6 +864,7 @@ namespace VEPROMS.CSLA.Library
try try
{ {
val = val.Replace("`", "\xB0"); val = val.Replace("`", "\xB0");
val = val.Replace("\xF8", "\xB0");
// An X/Y Plot RO type might have text preceding the Plot Commands // An X/Y Plot RO type might have text preceding the Plot Commands
int pstart = val.IndexOf("<<G"); // find the starting Plot Command int pstart = val.IndexOf("<<G"); // find the starting Plot Command
AddPrecedingText(sel, val.Substring(0, pstart));// replace the RO token with what's in front of the X/Y Plot AddPrecedingText(sel, val.Substring(0, pstart));// replace the RO token with what's in front of the X/Y Plot
@ -922,7 +924,10 @@ namespace VEPROMS.CSLA.Library
else else
{ {
if (val != null) if (val != null)
{
val = val.Replace("`", "\xB0"); val = val.Replace("`", "\xB0");
val = val.Replace("\xF8", "\xB0");
}
//AddInfo("\tRO Found {0} = '{1}'", sel.Text, val); //AddInfo("\tRO Found {0} = '{1}'", sel.Text, val);
// if val is null, then InsertROValue will put in "RO Not Found" for the value // if val is null, then InsertROValue will put in "RO Not Found" for the value
InsertROValue(sel, val, sect.ActiveFormat.PlantFormat.FormatData.ROData.UpRoIfPrevUpper); InsertROValue(sel, val, sect.ActiveFormat.PlantFormat.FormatData.ROData.UpRoIfPrevUpper);