From 2f3b770fec9743d0146f9013ea7875791d95a56e Mon Sep 17 00:00:00 2001 From: Rich Date: Fri, 24 Jan 2014 17:53:25 +0000 Subject: [PATCH] Revert to previous version --- .../VEPROMS.CSLA.Library/Extension/DocumentExt.cs | 14 +------------- PROMS/VEPROMS.CSLA.Library/Extension/ROImageExt.cs | 8 -------- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs index e4f3bbc1..71676dbc 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs @@ -845,19 +845,7 @@ namespace VEPROMS.CSLA.Library // 9.25 is the approximate offset of the base line of the font, i.e. doesn't include descender. float y = (float)sel.get_Information(LBWdInformation.wdVerticalPositionRelativeToTextBoundary) + ((sel.Font.Size * 9.25F) / 12); sel.Text = ""; - LBShape shape = null; - if (MSWordToPDF.DebugStatus==0 && !roImageFile.MyFile.FullName.ToUpper().EndsWith("GIF")) - { - System.Drawing.Image img = System.Drawing.Image.FromFile(roImageFile.MyFile.FullName); - string newname = Regex.Replace(roImageFile.MyFile.FullName,@"\.[A-Z]+$",".GIF"); - roImageFile.MyGifFile = new FileInfo(newname); - img.Save(newname, ImageFormat.Gif); - shape = myDoc.Shapes.AddPicture(newname, x, y, sel.Range); - } - else - { - shape = myDoc.Shapes.AddPicture(roImageFile.MyFile.FullName, x, y, sel.Range); - } + LBShape shape = myDoc.Shapes.AddPicture(roImageFile.MyFile.FullName, x, y, sel.Range); shape.RelativeVerticalPosition = LBWdRelativeVerticalPosition.wdRelativeVerticalPositionMargin; shape.Top = y; // Reset value after setting flag RelativeVerticalPosition shape.RelativeHorizontalPosition = LBWdRelativeHorizontalPosition.wdRelativeHorizontalPositionMargin; diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ROImageExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ROImageExt.cs index a6733e82..0f0455c0 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ROImageExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ROImageExt.cs @@ -264,12 +264,6 @@ namespace VEPROMS.CSLA.Library { get { return _MyFile; } } - private FileInfo _MyGifFile = null; - public FileInfo MyGifFile - { - get { return _MyGifFile; } - set { _MyGifFile = value; } - } private string _Extension = "TIF"; public string Extension { @@ -287,8 +281,6 @@ namespace VEPROMS.CSLA.Library try { _MyFile.Delete(); - if (_MyGifFile != null) - _MyGifFile.Delete(); } catch (IOException ex) {