From 7e67e619e820804ef2cce6b327bafbbaa97c0b83 Mon Sep 17 00:00:00 2001 From: Rich Date: Thu, 6 Feb 2014 18:38:26 +0000 Subject: [PATCH] Changed pagination logic for Cautions and Notes on substeps Removed code to remove last character when printing in compare mode. This was originally done because of differences with the way 16 Bit VE-PROMS did word wrapping to aid in comparision printing. --- PROMS/Volian.Print.Library/Pagination.cs | 6 ++++-- PROMS/Volian.Print.Library/vlnPrintObject.cs | 18 +++++++++--------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/PROMS/Volian.Print.Library/Pagination.cs b/PROMS/Volian.Print.Library/Pagination.cs index fa83d2f3..f9c777f3 100644 --- a/PROMS/Volian.Print.Library/Pagination.cs +++ b/PROMS/Volian.Print.Library/Pagination.cs @@ -388,7 +388,7 @@ namespace Volian.Print.Library ySpaceOnCurPage -= myBottomMsgSpace; vlnParagraph lastBreak = paraBreak; paraBreak = FindPageBreak(yStart, ySpaceOnCurPage, yLowerLimit, myList, paraBreak, yPageSize - (myTopMsgSpace + SixLinesPerInch) - myBottomMsgSpace); - Console.WriteLine("Break at {0}", paraBreak.MyItemInfo.ShortPath); + //Console.WriteLine("Break at {0}", paraBreak.MyItemInfo.ShortPath);//Comment Out before release if (paraBreak == null) { _MyLog.ErrorFormat("<<< ERROR >>> Cannot find a place to break\r\n==>'Cannot Find Place to Break',{0},'{1}','{2}'" @@ -497,7 +497,9 @@ namespace Volian.Print.Library !myPara.MyParent.MyItemInfo.IsHigh && myPara.MyParent.YSize > (yUpperLimit + yLocation)) { - return myList[stepLevel][yLocation]; + //McGuire Unit 1 AOPs - AP/1/A/5500/07.SEnclosure 7.S31..S1..C1 + if ((-yLocation + yStart) >= yLowerLimit ) // Only if it is more than the lower limit + return myPara; } } } diff --git a/PROMS/Volian.Print.Library/vlnPrintObject.cs b/PROMS/Volian.Print.Library/vlnPrintObject.cs index be36532e..b2ba1a3e 100644 --- a/PROMS/Volian.Print.Library/vlnPrintObject.cs +++ b/PROMS/Volian.Print.Library/vlnPrintObject.cs @@ -122,15 +122,15 @@ namespace Volian.Print.Library if (myParagraph != null) { //if (myParagraph.MyItemInfo.FormatStepData != null && myParagraph.MyItemInfo.FormatStepData.Font.Family == "Prestige Elite Tall") - if (!myParagraph.MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.WrapSameAsEdit) - { - Chunk chk = RemoveLastCharacter(iParagraph); - float heightAllButOne = GetHeight(cb, iParagraph, width, throwException); - if (heightAll != heightAllButOne) - return heightAllButOne; - if (chk != null) - RestoreLastCharacter(iParagraph, chk); - } + //if (!myParagraph.MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.WrapSameAsEdit) + //{ + // Chunk chk = RemoveLastCharacter(iParagraph); + // float heightAllButOne = GetHeight(cb, iParagraph, width, throwException); + // if (heightAll != heightAllButOne) + // return heightAllButOne; + // if (chk != null) + // RestoreLastCharacter(iParagraph, chk); + //} } } return heightAll;