From b8224bbc0800a975393da68bef50c3f25f1ae6b9 Mon Sep 17 00:00:00 2001 From: Rich Date: Thu, 20 Jul 2017 12:50:38 +0000 Subject: [PATCH] B2017-148 Fix MSWord XY Plot commands. Replace left and right double quotes with normal double quotes --- PROMS/XYPlots/XYPlots.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/PROMS/XYPlots/XYPlots.cs b/PROMS/XYPlots/XYPlots.cs index aa05b592..cee1681b 100644 --- a/PROMS/XYPlots/XYPlots.cs +++ b/PROMS/XYPlots/XYPlots.cs @@ -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 /// Plot Commands 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;