Improved accounting for bottom continue messages for pagination
Bottom Message (below text) fix and pagination improvements Include RNO separator in ‘BottomContent’ calculation Reset ‘BottomContent’ for each page & added ruler for bottom of page
This commit is contained in:
@@ -196,7 +196,8 @@ namespace Volian.Print.Library
|
||||
else
|
||||
firstStepChild = firstStepChild.MyParent.ChildrenBelow[firstStepChild.MyParent.ChildrenBelow.Count - 1];
|
||||
float ySizeIncludingFirstStep = firstStepChild.YSize + (firstStepChild.YTopMost - YTopMost);
|
||||
bool firstSubstepExceedsSpaceAvailable = ySizeIncludingFirstStep > yWithinMargins;
|
||||
float ySizeBtmCtnMess = GetBottomContinueMessageSize(MyItemInfo.MyDocStyle);
|
||||
bool firstSubstepExceedsSpaceAvailable = ySizeIncludingFirstStep > (yWithinMargins - ySizeBtmCtnMess);
|
||||
if (KeepStepsOnPage && firstSubstepExceedsSpaceAvailable && !isFirstChild)
|
||||
KeepStepsOnPage = false;
|
||||
if (ySizeIncludingFirst == YSize) KeepStepsOnPage = false;
|
||||
@@ -404,6 +405,8 @@ namespace Volian.Print.Library
|
||||
float mySize7LPI = mySize; // +SixLinesPerInch;
|
||||
if (_Match16BitPagination) mySize7LPI += SixLinesPerInch;
|
||||
float tableSpaceAvailable = TableSpaceAvailable;// RHM20150525 - Table Scrunch
|
||||
float ySizeBtmCtnMess1 = GetBottomContinueMessageSize(MyItemInfo.MyDocStyle);
|
||||
if (KeepStepsOnPage && ySizeIncludingFirst > (yWithinMargins - ySizeBtmCtnMess1)) KeepStepsOnPage = false;
|
||||
if (!KeepWithHeader && !KeepStepsOnPage && mySize - SixLinesPerInch + yEndMsg - tableSpaceAvailable <= yPageSizeNextPage) // if the entire step can fit on one page, do a page break
|
||||
{
|
||||
// Don't want extra line before step
|
||||
@@ -720,8 +723,7 @@ namespace Volian.Print.Library
|
||||
//while ((YSize - yTop) >= ySpaceOnCurPage)
|
||||
// Pagination Fix Break1LineShort3b
|
||||
DocStyle docstyle = MyItemInfo.MyDocStyle;
|
||||
string myBottomMsg = docstyle.Continue.Bottom.Message;
|
||||
float myBottomMsgSpace = ((myBottomMsg ?? "") != "") ? 2 * SixLinesPerInch : 0;
|
||||
float myBottomMsgSpace = GetBottomContinueMessageSize(docstyle);
|
||||
switch (docstyle.Continue.Bottom.Location)
|
||||
{
|
||||
case E_ContBottomLoc.BottomOfPage: // place continue message at bottom of page
|
||||
@@ -1093,6 +1095,16 @@ namespace Volian.Print.Library
|
||||
ProfileTimer.Pop(profileDepth);
|
||||
}
|
||||
|
||||
private float GetBottomContinueMessageSize(DocStyle docstyle)
|
||||
{
|
||||
float myBottomMsgSpace = 0;
|
||||
docstyle = MyItemInfo.MyDocStyle;
|
||||
string myBottomMsg = docstyle.Continue.Bottom.Message;
|
||||
myBottomMsgSpace = ((myBottomMsg ?? "") != "") ? 2 * SixLinesPerInch : 0;
|
||||
if (myBottomMsg != null && myBottomMsg.Contains("par")) myBottomMsgSpace += SixLinesPerInch;
|
||||
return myBottomMsgSpace;
|
||||
}
|
||||
|
||||
private bool JustATableThatWillFit(vlnParagraph paraBreak, float ypagesize)
|
||||
{
|
||||
if (paraBreak.MyItemInfo.MyContent.Text.Replace(" ", "").Replace(@"\u160?", "").Replace(@"\'A0", "") != "") return false;
|
||||
|
Reference in New Issue
Block a user