This commit is contained in:
Kathy Ruffing 2012-05-24 14:57:04 +00:00
parent 483a41aa32
commit 12873d9187

View File

@ -609,7 +609,22 @@ namespace VEPROMS.CSLA.Library
{ {
string xyplot = selxy.Text; string xyplot = selxy.Text;
xyplot = xyplot.Replace("`", "\xB0"); xyplot = xyplot.Replace("`", "\xB0");
// 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.
int cnt = 0;
int indxCr = xyplot.IndexOf("\r");
while (indxCr > 0)
{
cnt++;
indxCr = xyplot.IndexOf("\r", indxCr + 1);
}
// Setting the selected text to "" actually sets it to "\r", thus cnt-- (subtract one
// from cnt since there's already a return in the string.
cnt--;
selxy.Text = ""; selxy.Text = "";
if (cnt>0)for (int icnt = 0; icnt < cnt; icnt++) selxy.Text = selxy.Text + "\r";
string pngFile = VlnSettings.TemporaryFolder + @"\XYPlot1.png"; //@"C:\Temp\XYPlot1.png"; string pngFile = VlnSettings.TemporaryFolder + @"\XYPlot1.png"; //@"C:\Temp\XYPlot1.png";
RectangleF plotRect = CreatePlot(pngFile, xyplot, 600F, FormForPlotGraphics); RectangleF plotRect = CreatePlot(pngFile, xyplot, 600F, FormForPlotGraphics);
//LBShape shape = myDoc.Shapes.AddPicture(@"C:\Temp\XYPlot.png", 0, 0, sel.Range); //LBShape shape = myDoc.Shapes.AddPicture(@"C:\Temp\XYPlot.png", 0, 0, sel.Range);