From 6611c3d2a4e92b3c29e6e6ece692065cf51da53a Mon Sep 17 00:00:00 2001 From: Rich Date: Wed, 19 Mar 2014 15:31:27 +0000 Subject: [PATCH] Farley had a Table that was printing on the page following the tables header. Pagination was changed to keep table headers together with their tables. Added logic to skip the Tab Adjustments if the step is unnumbered. --- PROMS/Volian.Print.Library/Pagination.cs | 4 ++++ PROMS/Volian.Print.Library/vlnParagraph.cs | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/PROMS/Volian.Print.Library/Pagination.cs b/PROMS/Volian.Print.Library/Pagination.cs index 36966f81..6824a0e4 100644 --- a/PROMS/Volian.Print.Library/Pagination.cs +++ b/PROMS/Volian.Print.Library/Pagination.cs @@ -420,6 +420,10 @@ namespace Volian.Print.Library { throw (new Exception(string.Format("Pagination Infinite Loop {0}",lastBreak.MyItemInfo.ShortPath))); } + // If the break is going to happen on a table, and the tables parent would fit on a page with the table + // and the text in the parent includes the word table, then break on the parent + //if (lastBreak != paraBreak.MyParent && paraBreak.MyItemInfo.IsTable && paraBreak.YSize < ySpaceOnCurPage && paraBreak.MyParent.MyItemInfo.DisplayText.ToUpper().Contains("TABLE")) + // paraBreak = paraBreak.MyParent; //paraBreak.ShowPageBreak(999, paraBreak.MyItemInfo.ShortPath, "Yes",paraBreak.YTop, paraBreak.YSize, paraBreak.Height, false); //_MyLog.InfoFormat("Place to break\r\n==>'Place to Break',{0},'{1}','{2}'" //, paraBreak.MyItemInfo.ItemID, paraBreak.MyItemInfo.MyDocVersion.MyFolder.Name, paraBreak.MyItemInfo.ShortPath); diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index 2b5743cc..9df50404 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -1573,7 +1573,7 @@ namespace Volian.Print.Library XOffset += diff; adjustAgain = false; } - else + else if(mytab != null) { float adjusttab = (itemInfo.MyParent.IsHigh) ? itemInfo.FormatStepData.AdjHighLevelTab ?? 0 : 0; mytab.XOffset += (mytab.Width + adjusttab);