Convert ^ to a delta when used in X/Y Plots

This commit is contained in:
John Jenko 2016-06-03 16:07:02 +00:00
parent 82824f8853
commit e7a0a96dae

View File

@ -699,7 +699,7 @@ namespace VEPROMS.CSLA.Library
ROFSTLookup lookup = null;
string igPrefix = null;
string spPrefix = null;
bool convertCaretToDeltaSymbol = sect.MyActiveSection.ActiveFormat.PlantFormat.FormatData.SectData.ConvertCaretToDelta;
if (dvi.DocVersionAssociationCount > 0)
{
hasRos = true;
@ -755,6 +755,9 @@ namespace VEPROMS.CSLA.Library
string xyplot = selxy.Text;
xyplot = xyplot.Replace("`", "\xB0");
xyplot = xyplot.Replace("\xF8", "\xB0");
if (convertCaretToDeltaSymbol)
xyplot = xyplot.Replace("^", "\x394"); // delta
xyplot = xyplot.Replace("\x7F", "\x394"); //delta
// 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
// so that they can be added back.
@ -895,6 +898,9 @@ namespace VEPROMS.CSLA.Library
{
val = val.Replace("`", "\xB0");
val = val.Replace("\xF8", "\xB0");
if (convertCaretToDeltaSymbol)
val = val.Replace("^", "\x394"); // delta
val = val.Replace("\x7F", "\x394"); //delta
// An X/Y Plot RO type might have text preceding the Plot Commands
int pstart = val.IndexOf("<<G"); // find the starting Plot Command
AddPrecedingText(sel, val.Substring(0, pstart),0.0F);// replace the RO token with what's in front of the X/Y Plot