This commit is contained in:
Kathy Ruffing 2011-08-24 11:46:39 +00:00
parent afebd40e72
commit 969485ed40

View File

@ -37,7 +37,7 @@ namespace VEPROMS.CSLA.Library
if (roids.Contains(roidkey)) if (roids.Contains(roidkey))
roids.Remove(roidkey);// If in both, nothing to do roids.Remove(roidkey);// If in both, nothing to do
else else
myUsage.Delete(); // If only in old, remove it myUsage.MyDROUsage.Delete(); // If only in old, remove it
} }
} }
foreach (string roidkey in roids) foreach (string roidkey in roids)
@ -584,6 +584,7 @@ namespace VEPROMS.CSLA.Library
RectangleF plotRect = CreatePlot(pngFile, val, 600F, FormForPlotGraphics); RectangleF plotRect = CreatePlot(pngFile, val, 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);
float x = (float)sel.get_Information(LBWdInformation.wdHorizontalPositionRelativeToPage); float x = (float)sel.get_Information(LBWdInformation.wdHorizontalPositionRelativeToPage);
float y = (float)sel.get_Information(LBWdInformation.wdVerticalPositionRelativeToPage); float y = (float)sel.get_Information(LBWdInformation.wdVerticalPositionRelativeToPage);
//LBInlineShape shape = sel.InlineShapes.AddPicture(pngFile); //LBInlineShape shape = sel.InlineShapes.AddPicture(pngFile);
LBRange myRange = sel.Paragraphs.First.Range; LBRange myRange = sel.Paragraphs.First.Range;
@ -591,6 +592,11 @@ namespace VEPROMS.CSLA.Library
float yTop1 = (float)myRange.get_Information(LBWdInformation.wdVerticalPositionRelativeToTextBoundary); float yTop1 = (float)myRange.get_Information(LBWdInformation.wdVerticalPositionRelativeToTextBoundary);
float xAdjust = (float)-sect.MyDocStyle.Layout.LeftMargin; float xAdjust = (float)-sect.MyDocStyle.Layout.LeftMargin;
float yAdjust = sel.Font.Size; float yAdjust = sel.Font.Size;
// The following two lines made the xyplot location for WCN2 match the 16bit output. However, how the
// xTweak value is determined is phantom of Rich's mind. Word document location of the RO token
// will be modified in data before delivery so that this xTweak is not needed.
//float xTweak = -(30 + xAdjust) / 3; // Used to align plots for WCN2.
//LBShape shape = myDoc.Shapes.AddPicture(pngFile, x + xAdjust + plotRect.X + xTweak, yAdjust + y - yTop + plotRect.Y, sel.Range);
LBShape shape = myDoc.Shapes.AddPicture(pngFile, x + xAdjust + plotRect.X, yAdjust + y - yTop + plotRect.Y, sel.Range); LBShape shape = myDoc.Shapes.AddPicture(pngFile, x + xAdjust + plotRect.X, yAdjust + y - yTop + plotRect.Y, sel.Range);
File.Delete(pngFile); File.Delete(pngFile);
shape.LockAspectRatio = LBMsoTriState.msoTrue; shape.LockAspectRatio = LBMsoTriState.msoTrue;