Compare commits

..

2 Commits

View File

@@ -1363,9 +1363,14 @@ namespace VEPROMS.CSLA.Library
// 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 = roValue.IndexOf("<<G"); // find the starting Plot Command int pstart = roValue.IndexOf("<<G"); // find the starting Plot Command
//B2025-065 When Printing a Word Section containing XY Plot ROs - when there is a title on the XY Plot, only the first line is indented.
//get x-offset
float fx1 = (float)MyApp.ActiveDocument.Range(sel.Start, sel.Start).get_Information(LBWdInformation.wdHorizontalPositionRelativeToPage);
fx1 -= (float)MyApp.ActiveDocument.Range(0, 0).get_Information(LBWdInformation.wdHorizontalPositionRelativeToPage);
// B2017-217 Added logic so that underscores are not converted to underline // B2017-217 Added logic so that underscores are not converted to underline
// C2018-003 fixed use of getting the active section // C2018-003 fixed use of getting the active section
AddPrecedingText(sel, roValue.Substring(0, pstart), 0.0F, (sect.ActiveSection != null) ? sect.ActiveSection.ActiveFormat.PlantFormat.FormatData.SectData.ConvertUnderscoreToUnderline : false);// replace the RO token with what's in front of the X/Y Plot AddPrecedingText(sel, roValue.Substring(0, pstart), fx1, (sect.ActiveSection != null) ? sect.ActiveSection.ActiveFormat.PlantFormat.FormatData.SectData.ConvertUnderscoreToUnderline : false);// replace the RO token with what's in front of the X/Y Plot
roValue = roValue.Substring(pstart); // set rovalue to the start of the plot commands roValue = roValue.Substring(pstart); // set rovalue to the start of the plot commands
pngFile = VlnSettings.TemporaryFolder + @"\XYPlot1.png"; //@"C:\Temp\XYPlot1.png"; pngFile = VlnSettings.TemporaryFolder + @"\XYPlot1.png"; //@"C:\Temp\XYPlot1.png";
@@ -1386,6 +1391,10 @@ namespace VEPROMS.CSLA.Library
float yAdjust = sel.Font.Size; float yAdjust = sel.Font.Size;
float yyy = yAdjust + y + plotRect.Y; float yyy = yAdjust + y + plotRect.Y;
//B2025-065 When Printing a Word Section containing XY Plot ROs - when there is a title on the XY Plot, only the first line is indented.
xxx += fx1; //shift by x-offset
LBShape shape = myDoc.Shapes.AddPicture(pngFile, xxx, yyy, sel.Range); LBShape shape = myDoc.Shapes.AddPicture(pngFile, xxx, yyy, sel.Range);
try try