From 3cc2284e4269753d6ab6e1ed2e2c78bfb375aec2 Mon Sep 17 00:00:00 2001 From: Kathy Date: Thu, 14 Jul 2011 15:57:44 +0000 Subject: [PATCH] --- PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs index 21322f50..c5c27f0d 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs @@ -566,11 +566,11 @@ namespace VEPROMS.CSLA.Library //LBInlineShape shape = sel.InlineShapes.AddPicture(pngFile); LBRange myRange = sel.Paragraphs.First.Range; float yTop = (float)myRange.get_Information(LBWdInformation.wdVerticalPositionRelativeToPage); - float xAdjust = -29.3F; // TODO: Check this value - float yAdjust = 9.1F; // TODO: Check this value + float yTop1 = (float)myRange.get_Information(LBWdInformation.wdVerticalPositionRelativeToTextBoundary); + float xAdjust = (float)-sect.MyDocStyle.Layout.LeftMargin; + float yAdjust = sel.Font.Size; LBShape shape = myDoc.Shapes.AddPicture(pngFile, x + xAdjust + plotRect.X, yAdjust + y - yTop + plotRect.Y, sel.Range); File.Delete(pngFile); - //Console.WriteLine(",{0},{1},{2},{3}", x, y - yTop, xAdjust,yAdjust); shape.LockAspectRatio = LBMsoTriState.msoTrue; //shape.Width = .89F * shape.Width; //shape.Width = float.Parse(tbAdjust.Text) * shape.Width; @@ -579,10 +579,8 @@ namespace VEPROMS.CSLA.Library sel.WholeStory(); // TODO: Do we want to color code ROs //sel.Range.Font.Color = LBWdColor.wdColorRed; - //Console.WriteLine("{0} Shape Width {1} Height {2}", val.Replace("\n", "','"), shape.Width, shape.Height); //shape.Width = width; //shape.Height = height; - //Console.WriteLine("{0} Shape Width {1} Height {2}", val.Replace("\n", "','"), shape.Width, shape.Height); //imageROTokenReplaced = true; } catch (Exception ex)