From d9a10aca59cd15b368f7672bb22ee23d6e945981 Mon Sep 17 00:00:00 2001 From: Rich Date: Tue, 12 Nov 2013 19:53:15 +0000 Subject: [PATCH] Handle Unit RO in MS Word Documents Comment-out a change that was made to raise the location of the "END" message. Fixed logic to account for borders on figures. --- PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs | 3 ++- PROMS/Volian.Print.Library/vlnParagraph.cs | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs index e147e938..a4747e4a 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs @@ -808,7 +808,8 @@ namespace VEPROMS.CSLA.Library // If multiple return values includes X-Y Plot, check to see if it is an X-Y Plot if (val == null) { - if(sel.Text == "") val =lookup.DocVersionInfo.DocVersionConfig.Unit_Text; + if(sel.Text.ToUpper() == "") val =lookup.DocVersionInfo.DocVersionConfig.Unit_Text; + else if (sel.Text.ToUpper() == "") val = lookup.DocVersionInfo.DocVersionConfig.Unit_Number; //val = "",MyDocVersion.DocVersionConfig.Unit_ID); //text = text.Replace(@"", _MyItemInfo.MyDocVersion.DocVersionConfig.Unit_ProcedureSetID); //text = text.Replace("", _MyItemInfo.MyDocVersion.DocVersionConfig.Unit_Number); diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index 727e6ab9..505ad2e3 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -990,8 +990,8 @@ namespace Volian.Print.Library { // If the flag is 0 or 1, just put the end message out right below this vlnParagraph: float msg_yLocation = CalculateYLocation(yPageStart - YBottomMost, yTopMargin); - if (MyPageHelper.YMultiplier < 1) - msg_yLocation += 4;// Robinson - if the page is compressed, we need this adjustment. + //if (MyPageHelper.YMultiplier < 1) + // msg_yLocation += 4;// Robinson - if the page is compressed, we need this adjustment. // the following is for IP3 - it was commented out so that an update could be put on // before this was tested. @@ -1506,8 +1506,8 @@ namespace Volian.Print.Library yForCheckoff += Height - SixLinesPerInch; // place checkoff on last row of text yoff += (Height + yoffForBorder); //(2 * SixLinesPerInch)); CalculateXOffsetGridOrFigure(itemInfo, maxRNO, formatInfo); - yoff = (float)Math.Ceiling(yoff); // RHM 20120925 - Make sure that yOff is an integer value after a grid - } + bool noborder = MyItemInfo.FormatStepData.Type.ToUpper().Contains("BORDERLESS"); + yoff += (Height + ((noborder?1:2)*SixLinesPerInch)); // RHM 20120925 - Eliminate extra space after Figure } else if (itemInfo.IsFigure) // if a figure we've got to determine the size: { string erMsg = null;