Support for ‘PaginateOnLowerStepLevel’ pagination flag (for IP2BCK)

IP2BCK: Step Description table’s title (Cont) support and various xoffset & margin fixes
IP2BCK: Support Step Descriptions table’s title (Cont) message
IP2BCK: Implement ‘NoTabAlign’ flag so that tab aligning won’t occur for EquipmentOpt step types
This commit is contained in:
2014-10-03 13:44:46 +00:00
parent 270d5e37d8
commit f9d0c363f7
4 changed files with 59 additions and 4 deletions

View File

@@ -965,6 +965,11 @@ namespace Volian.Print.Library
float yLocalypagestart = yPageStart;
// yPageStart is offset into roll; YTopMost is offset of topmost of this paragraph.
float yLocation = yPageStart - YTopMost;
// If this document style has a pagelist item with a continue (some IP2BCK docstyles), clear
// out the variable that flags a continue message
MyPageHelper.OldTemplateContMsg = false;
if(DebugText.IsOpen) DebugText.WriteLine("ToPdf1:{0},'{1}',{2},{3},{4},{5}", MyItemInfo.ItemID, MyItemInfo.ShortPath, XOffset, yLocation, yPageStart, YTopMost);
int paginate = Paginate(yLocation, yTopMargin, yBottomMargin);
bool firstHighLevelStep = MyItemInfo.IsHigh && (MyItemInfo.MyPrevious == null);
@@ -1061,9 +1066,23 @@ namespace Volian.Print.Library
}
}
}
DoBottomContinueMsg(cb, yBottomMargin, yLocation, docstyle, doThreeContinues);
cb.PdfDocument.NewPage();
if (MyItemInfo.IsStep && ((MyItemInfo.MyActiveSection.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_PageListSpBckgrnd) == E_DocStructStyle.DSS_PageListSpBckgrnd))
{
// check if parent (can be HLS, Caution or Note) has the UseOldTemplate. If so,
// flag that a continue message should be printed as part of a pagelist header (if pagelist
// has CM: page list item)
ItemInfo itm = MyItemInfo;
while (itm.IsStep && !itm.FormatStepData.UseOldTemplate) itm = itm.MyParent;
// don't put out continue if the page break item is the same as background step item (caution/note or hls)
if (itm.IsStep && itm.ItemID != MyItemInfo.ItemID)
{
MyPageHelper.OldTemplateContMsg = true;
MyPageHelper.ResetSvg();
}
}
//_MyLog.InfoFormat("NewPage 11 {0}", cb.PdfWriter.CurrentPageNumber);
ResetDocStyleAndValues(ref yTopMargin, ref yBottomMargin);
DebugText.WriteLine("Paginate2");
@@ -3548,6 +3567,13 @@ namespace Volian.Print.Library
XOffset += (itemInfo.FormatStepData.Font.CharsToTwips * 2); // indent 2 characters for background steps
return;
}
else if (itemInfo.FormatStepData.UseOldTemplate && itemInfo.IsInTemplate() &&
((MyItemInfo.MyActiveSection.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_PageListSpBckgrnd) == E_DocStructStyle.DSS_PageListSpBckgrnd))
{
if (myTab != null) myTab.XOffset = XOffset;
XOffset += myTab.Width;
return;
}
else if (itemInfo.FormatStepData != null && itemInfo.FormatStepData.Type == "TitleWithTextBelow")
{
if ((colOvrd ?? 0) != 0)
@@ -3853,6 +3879,23 @@ namespace Volian.Print.Library
{
if (itemInfo.MyPrevious != null && itemInfo.MyPrevious.TemplateIndex > 1) widOvrd = GetWidthOrStartFromTemplate(itemInfo.MyPrevious, itemInfo.MyPrevious.ActiveFormat, true);
}
// for IP2 backgrounds, set widths appropriately for template items:
if (itemInfo.IsStep && ((itemInfo.MyActiveSection.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_PageListSpBckgrnd) == E_DocStructStyle.DSS_PageListSpBckgrnd))
{
if (itemInfo.IsStep && itemInfo.FormatStepData.Type.ToUpper() == "TITLEWITHTEXTBELOW")
{
Width = MyParent.Width;
return;
}
if (widOvrd == 0 && itemInfo.MyParent.IsStep && itemInfo.MyParent.FormatStepData.Type.ToUpper() == "TITLEWITHTEXTBELOW")
{
Width = MyParent.MyParent.Width + (MyParent.MyParent.MyTab != null ? MyParent.MyParent.MyTab.Width : 0);
Width -= (MyTab != null ? MyTab.Width : 0);
return;
}
}
//widOvrd = itemInfo.FormatStepData == null ? null : itemInfo.FormatStepData.WidthOverride;
// Don't adjust the RNO width if in single column mode:
if (itemInfo.IsRNOPart && itemInfo.MyParent.IsHigh && itemInfo.MyActiveSection.ColumnMode != 0 && itemInfo.ActiveFormat.MyStepSectionLayoutData.RNOWidthAlt != null)
@@ -3941,7 +3984,7 @@ namespace Volian.Print.Library
else
Width = _WidthAdjustBox + (float)bx.TxtWidth - tabWidth; // add 1 to get it to wrap like 16Bit
}
else if (itemInfo.IsCaution || itemInfo.IsNote)
else if ((itemInfo.IsCaution || itemInfo.IsNote) && !itemInfo.FormatStepData.UseOldTemplate)
{
float mycolT = (float)formatInfo.MyStepSectionLayoutData.ColT;
if (formatInfo.MyStepSectionLayoutData.Dev_Format)