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:
parent
270d5e37d8
commit
f9d0c363f7
@ -219,7 +219,7 @@ namespace Volian.Print.Library
|
|||||||
if (mySize < Height) mySize = Height * MyPageHelper.YMultiplier;
|
if (mySize < Height) mySize = Height * MyPageHelper.YMultiplier;
|
||||||
}
|
}
|
||||||
float yExtra2 = (SixLinesPerInch - MyItemInfo.MyDocStyle.Layout.FooterLength) ?? 0;
|
float yExtra2 = (SixLinesPerInch - MyItemInfo.MyDocStyle.Layout.FooterLength) ?? 0;
|
||||||
if (KeepStepsOnPage && ySizeIncludingFirst > yWithinMargins)
|
if (KeepStepsOnPage && !MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.PaginateOnLowerStepLevel && ySizeIncludingFirst > yWithinMargins)
|
||||||
KeepStepsOnPage = false;
|
KeepStepsOnPage = false;
|
||||||
bool KeepWithHeader = isFirstChild && nearTheTop;
|
bool KeepWithHeader = isFirstChild && nearTheTop;
|
||||||
if (!ManualPageBreak && mySize + yEndMsg <= yWithinMargins + yExtra) // Don't Paginate if there is enough room, will fit on page
|
if (!ManualPageBreak && mySize + yEndMsg <= yWithinMargins + yExtra) // Don't Paginate if there is enough room, will fit on page
|
||||||
|
@ -1222,6 +1222,12 @@ namespace Volian.Print.Library
|
|||||||
get { return _HLRNO; }
|
get { return _HLRNO; }
|
||||||
set { _HLRNO = value; }
|
set { _HLRNO = value; }
|
||||||
}
|
}
|
||||||
|
private bool _OldTemplateContMsg = false;
|
||||||
|
public bool OldTemplateContMsg
|
||||||
|
{
|
||||||
|
get { return _OldTemplateContMsg; }
|
||||||
|
set { _OldTemplateContMsg = value; }
|
||||||
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="section"></param>
|
/// <param name="section"></param>
|
||||||
@ -1373,6 +1379,12 @@ namespace Volian.Print.Library
|
|||||||
}
|
}
|
||||||
plstr = SplitEOPNumber(svgGroup, pageItem, eopnum1, token, plstr);
|
plstr = SplitEOPNumber(svgGroup, pageItem, eopnum1, token, plstr);
|
||||||
break;
|
break;
|
||||||
|
case "{CM:(Cont)}":
|
||||||
|
if (OldTemplateContMsg)
|
||||||
|
plstr = plstr.Replace("{CM:(Cont)}", "(Cont)");
|
||||||
|
else
|
||||||
|
plstr = plstr.Replace("{CM:(Cont)}", "");
|
||||||
|
break;
|
||||||
case "{EOPNUM}":
|
case "{EOPNUM}":
|
||||||
case "[EOPNUM]":
|
case "[EOPNUM]":
|
||||||
case "{PREDELIMEOPNUM}":
|
case "{PREDELIMEOPNUM}":
|
||||||
|
@ -965,6 +965,11 @@ namespace Volian.Print.Library
|
|||||||
float yLocalypagestart = yPageStart;
|
float yLocalypagestart = yPageStart;
|
||||||
// yPageStart is offset into roll; YTopMost is offset of topmost of this paragraph.
|
// yPageStart is offset into roll; YTopMost is offset of topmost of this paragraph.
|
||||||
float yLocation = yPageStart - YTopMost;
|
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);
|
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);
|
int paginate = Paginate(yLocation, yTopMargin, yBottomMargin);
|
||||||
bool firstHighLevelStep = MyItemInfo.IsHigh && (MyItemInfo.MyPrevious == null);
|
bool firstHighLevelStep = MyItemInfo.IsHigh && (MyItemInfo.MyPrevious == null);
|
||||||
@ -1061,9 +1066,23 @@ namespace Volian.Print.Library
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DoBottomContinueMsg(cb, yBottomMargin, yLocation, docstyle, doThreeContinues);
|
DoBottomContinueMsg(cb, yBottomMargin, yLocation, docstyle, doThreeContinues);
|
||||||
cb.PdfDocument.NewPage();
|
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);
|
//_MyLog.InfoFormat("NewPage 11 {0}", cb.PdfWriter.CurrentPageNumber);
|
||||||
ResetDocStyleAndValues(ref yTopMargin, ref yBottomMargin);
|
ResetDocStyleAndValues(ref yTopMargin, ref yBottomMargin);
|
||||||
DebugText.WriteLine("Paginate2");
|
DebugText.WriteLine("Paginate2");
|
||||||
@ -3548,6 +3567,13 @@ namespace Volian.Print.Library
|
|||||||
XOffset += (itemInfo.FormatStepData.Font.CharsToTwips * 2); // indent 2 characters for background steps
|
XOffset += (itemInfo.FormatStepData.Font.CharsToTwips * 2); // indent 2 characters for background steps
|
||||||
return;
|
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")
|
else if (itemInfo.FormatStepData != null && itemInfo.FormatStepData.Type == "TitleWithTextBelow")
|
||||||
{
|
{
|
||||||
if ((colOvrd ?? 0) != 0)
|
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);
|
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;
|
//widOvrd = itemInfo.FormatStepData == null ? null : itemInfo.FormatStepData.WidthOverride;
|
||||||
// Don't adjust the RNO width if in single column mode:
|
// 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)
|
if (itemInfo.IsRNOPart && itemInfo.MyParent.IsHigh && itemInfo.MyActiveSection.ColumnMode != 0 && itemInfo.ActiveFormat.MyStepSectionLayoutData.RNOWidthAlt != null)
|
||||||
@ -3941,7 +3984,7 @@ namespace Volian.Print.Library
|
|||||||
else
|
else
|
||||||
Width = _WidthAdjustBox + (float)bx.TxtWidth - tabWidth; // add 1 to get it to wrap like 16Bit
|
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;
|
float mycolT = (float)formatInfo.MyStepSectionLayoutData.ColT;
|
||||||
if (formatInfo.MyStepSectionLayoutData.Dev_Format)
|
if (formatInfo.MyStepSectionLayoutData.Dev_Format)
|
||||||
|
@ -21,7 +21,7 @@ namespace Volian.Print.Library
|
|||||||
if (_TabAlign == null)
|
if (_TabAlign == null)
|
||||||
{
|
{
|
||||||
_TabAlign = 0;
|
_TabAlign = 0;
|
||||||
if (Text != null)
|
if (Text != null && (!MyParent.MyItemInfo.IsStep || !MyParent.MyItemInfo.FormatStepData.TabData.NoTabAlign))
|
||||||
{
|
{
|
||||||
while (_TabAlign < Text.Length && Text[(int)_TabAlign] == ' ')
|
while (_TabAlign < Text.Length && Text[(int)_TabAlign] == ' ')
|
||||||
_TabAlign++;
|
_TabAlign++;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user