Compare commits

...

5 Commits

2 changed files with 11 additions and 12 deletions

View File

@@ -1363,9 +1363,14 @@ namespace VEPROMS.CSLA.Library
// An X/Y Plot RO type might have text preceding the Plot Commands
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
// 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
pngFile = VlnSettings.TemporaryFolder + @"\XYPlot1.png"; //@"C:\Temp\XYPlot1.png";
@@ -1386,6 +1391,10 @@ namespace VEPROMS.CSLA.Library
float yAdjust = sel.Font.Size;
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);
try

View File

@@ -1668,18 +1668,8 @@ namespace Volian.Controls.Library
}
Clipboard.Clear();
//Try to update the data object to persist beyond PROMS life
//if can't, log it and use old method of scoping clipboard to PROMS life
try
{
Clipboard.SetDataObject(myDO, true); // this saves the cleaned up information to the Windows clipboard
}
catch (Exception ex)
{
_MyLog.Warn($"Error Setting Clipboard Object to Persist beyond PROMS. Clipboard will be scoped to PROMS. Error:{ex.Message}");
Clipboard.SetDataObject(myDO); // this saves the cleaned up information to the Windows clipboard
}
}
iData = Clipboard.GetDataObject();
bool noEquationData = true;
// part of bug B2017-117 we were running out of window handles when printing, found this similar use of