B2017-148 Fix MSWord XY Plot commands. Replace left and right double quotes with normal double quotes

This commit is contained in:
Rich 2017-07-20 12:50:38 +00:00
parent a4a9fb1d47
commit b8224bbc08

View File

@ -426,7 +426,7 @@ namespace XYPlots
StringBuilder Lbuff = new StringBuilder();
retval = NextChar();
if (retval != '"' && retval != '\x1C') // open double quote
MessageBox.Show("Double Quote not found", "String value syntax problem");
MessageBox.Show("Double Quote not found", "Syntax problem in XY Plot");
retval = NextChar();
while (retval != 0 && retval != '\n')
{
@ -1873,7 +1873,10 @@ namespace XYPlots
/// <param name="PlotCommands">Plot Commands</param>
public XYPlot(string PlotCommands)
{
LoadBuffFromString(PlotCommands);
// MSWord enters left and right double-quotes when you press the double-quote key
//B2017 - Replace left and right double-quotes with normal double-quotes
PlotCommands = PlotCommands.Replace('\u201C', '"').Replace('\u201D', '"');
LoadBuffFromString(PlotCommands);
Setup();
//#if DEBUG
//VG.VG_Arc.iColor = 0;