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 // 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 // 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. // 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>(); List<vlnParagraph> PageBreakOnStepList = new List<vlnParagraph>();
if (PageBreakOnStep) if (PageBreakOnStep)
{ {
@ -567,6 +565,9 @@ namespace Volian.Print.Library
ySpaceOnCurPage -= yEndMsg; ySpaceOnCurPage -= yEndMsg;
ySpaceOnCurPage -= myBottomMsgSpace; ySpaceOnCurPage -= myBottomMsgSpace;
vlnParagraph lastBreak = paraBreak; vlnParagraph lastBreak = paraBreak;
if (PageBreakOnStepList.Count > 0 && (PageBreakOnStepList[0].YTop - (lastBreak == null?0:lastBreak.YTop) <= ySpaceOnCurPage))
paraBreak = PageBreakOnStepList[0];
else
paraBreak = FindPageBreak(yStart, ySpaceOnCurPage-accountForCalvertAlarmConditionResponseFooter, yLowerLimit, paraBreak = FindPageBreak(yStart, ySpaceOnCurPage-accountForCalvertAlarmConditionResponseFooter, yLowerLimit,
myList, lastBreak, yPageSize - (myTopMsgSpace + SixLinesPerInch) - myBottomMsgSpace, myList, lastBreak, yPageSize - (myTopMsgSpace + SixLinesPerInch) - myBottomMsgSpace,
myBottomMsgSpace,MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList[40].ContinueOnly); myBottomMsgSpace,MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList[40].ContinueOnly);
@ -582,7 +583,7 @@ namespace Volian.Print.Library
break; break;
} }
if (paraBreak.MyItemInfo.IsStep && ((paraBreak.MyItemInfo.MyActiveSection.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_PageListSpBckgrnd) == E_DocStructStyle.DSS_PageListSpBckgrnd) && 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; if (lastBreak != null && lastBreak != paraBreak.MyParent) paraBreak = paraBreak.MyParent;
} }

View File

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