Fixed background document pagination

adjusted sub-step text width when they have a tab (background documents)
This commit is contained in:
John Jenko 2014-11-04 21:14:16 +00:00
parent c46b4de7ab
commit 3daa13f4b6
2 changed files with 8 additions and 7 deletions

View File

@ -469,8 +469,6 @@ namespace Volian.Print.Library
// if this paragraph is flagged to pagebreakonstep (i.e. these are used by background documents
// to get each hls/caution/note to be on its own page), then any of the children above should
// also have the flag set and be added to the pagebreakonsteplist so that a break occurs.
if (MyItemInfo.InList(391))
Console.WriteLine("here");
List<vlnParagraph> PageBreakOnStepList = new List<vlnParagraph>();
if (PageBreakOnStep)
{
@ -567,9 +565,12 @@ namespace Volian.Print.Library
ySpaceOnCurPage -= yEndMsg;
ySpaceOnCurPage -= myBottomMsgSpace;
vlnParagraph lastBreak = paraBreak;
paraBreak = FindPageBreak(yStart, ySpaceOnCurPage-accountForCalvertAlarmConditionResponseFooter, yLowerLimit,
myList, lastBreak, yPageSize - (myTopMsgSpace + SixLinesPerInch) - myBottomMsgSpace,
myBottomMsgSpace,MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList[40].ContinueOnly);
if (PageBreakOnStepList.Count > 0 && (PageBreakOnStepList[0].YTop - (lastBreak == null?0:lastBreak.YTop) <= ySpaceOnCurPage))
paraBreak = PageBreakOnStepList[0];
else
paraBreak = FindPageBreak(yStart, ySpaceOnCurPage-accountForCalvertAlarmConditionResponseFooter, yLowerLimit,
myList, lastBreak, yPageSize - (myTopMsgSpace + SixLinesPerInch) - myBottomMsgSpace,
myBottomMsgSpace,MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList[40].ContinueOnly);
//Console.WriteLine("Break at {0}", paraBreak.MyItemInfo.ShortPath);//Comment Out before release
//if (lastBreak != null && lastBreak.MyItemInfo.InList(80091, 1985))
// Console.WriteLine("After 80091 {0}",paraBreak.ToString());
@ -582,7 +583,7 @@ namespace Volian.Print.Library
break;
}
if (paraBreak.MyItemInfo.IsStep && ((paraBreak.MyItemInfo.MyActiveSection.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_PageListSpBckgrnd) == E_DocStructStyle.DSS_PageListSpBckgrnd) &&
paraBreak.MyItemInfo.FormatStepData != null && paraBreak.MyItemInfo.MyParent.MyPrevious != null && paraBreak.MyItemInfo.MyParent.MyPrevious.FormatStepData.Type == "TitleWithTextBelow")
paraBreak.MyItemInfo.FormatStepData != null && paraBreak.MyItemInfo.MyParent.MyPrevious != null && paraBreak.MyItemInfo.MyParent.IsStep && paraBreak.MyItemInfo.MyParent.MyPrevious.FormatStepData.Type == "TitleWithTextBelow")
{
if (lastBreak != null && lastBreak != paraBreak.MyParent) paraBreak = paraBreak.MyParent;
}

View File

@ -4371,7 +4371,7 @@ namespace Volian.Print.Library
else if (MyParent.WidthNoLimit != 0)
Width = adjwidth + MyParent.WidthNoLimit - tabWidth + (myTab == null ? 0 : myTab.TabAlign);
else if ((itemInfo.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_PageListSpBckgrnd) == E_DocStructStyle.DSS_PageListSpBckgrnd)
Width = adjwidth + MyParent.Width;
Width = adjwidth + MyParent.Width - (MyTab!=null?MyTab.Width:0);
else
Width = adjwidth + MyParent.Width - tabWidth + (myTab == null ? 0 : myTab.TabAlign);
}