Various FNP tabbing & template fixes

Get text for template steps
Template improvements & added AlignHLSTabWithSectOvride for FNP
Support for TitleWithTextRight step types
Support PSOnlyFirst docstyle flag for FNP
Printing of FNP’s component lists (templates), PSOnlyFirst docstyle, PrintNoTitle, subsection has own docstyle, and FNP tab locations
Support PSOnlyFirst docstyle, Like6_ButDoesntNeedSubsection numberingsequence & PrintNoTitle, for FNP
This commit is contained in:
2013-10-28 13:58:40 +00:00
parent c59264b027
commit fadac13f82
7 changed files with 243 additions and 46 deletions

View File

@@ -106,7 +106,22 @@ namespace Volian.Print.Library
get { return _PrintedAPage; }
set { _PrintedAPage = value; }
}
// the following two variables are used to handle the 'PSOnlyFirst' page list Justify flag.
// PSOnlyFirst signals that the pagelist token should only be processed for the first page of
// the section. It gets set when this token is processed, so that any remaining pages will
// not get the token. It's value is derived by taking the different the location of this token
// & the location of the previous token, so that this amount can be used to move the text up
// on the 'not first' pages of the section. It's used as an adjustment on the topmargin.
// This is used in FNP formats.
private int _sectLevelNumTtlDiff = 0;
private int _PrintedSectionPage = 0;
public int PrintedSectionPage
{
get { return _PrintedSectionPage; }
set { _PrintedSectionPage = value; }
}
private bool _AddBlankPagesForDuplexPrinting = false;
public bool AddBlankPagesForDuplexPrinting // Tells us if a the option to add a blank page is turn on (for procedures with duplex foldouts)
{
@@ -673,6 +688,12 @@ namespace Volian.Print.Library
case E_NumberingSequence.WithinEachSection:
key = key + "." + MySection.ItemID;
break;
case E_NumberingSequence.Like6_ButDoesntNeedSubsection:
if (MySection.MyParent.IsSection)
key = key + "." + MySection.MyParent.ItemID;
else
key = key + "." + MySection.ItemID;
break;
case E_NumberingSequence.WithStepsAndSecondaryPageNumber:
// For this one, we'll do two keys and templates. One will go with the main steps
// section and one will be for this secondary section.
@@ -1093,12 +1114,26 @@ namespace Volian.Print.Library
break;
case "{SECTIONLEVELTITLE}":
case "[SECTIONLEVELTITLE]":
plstr = SplitTitle(svgGroup, pageItem, section.DisplayText, section.ActiveFormat.PlantFormat.FormatData.SectData.SectionTitleLength, token, plstr);
bool printsectlevel = ((pageItem.Justify & VEPROMS.CSLA.Library.E_Justify.PSOnlyFirst) != VEPROMS.CSLA.Library.E_Justify.PSOnlyFirst) ||
(((pageItem.Justify & VEPROMS.CSLA.Library.E_Justify.PSOnlyFirst) == VEPROMS.CSLA.Library.E_Justify.PSOnlyFirst) && PrintedSectionPage==0);
// if there is 'no title' for the section, only print it if a format flag says to print it.
if (printsectlevel)
{
if (section.DisplayText.ToUpper().Contains("<NO TITLE>") && !section.ActiveFormat.PlantFormat.FormatData.ProcData.PrintNoTitle) printsectlevel = false;
}
if (printsectlevel)
{
plstr = SplitTitle(svgGroup, pageItem, section.DisplayText, section.ActiveFormat.PlantFormat.FormatData.SectData.SectionTitleLength, token, plstr);
PrintedSectionPage = (int)pageItem.Row - _sectLevelNumTtlDiff;
}
else
plstr = plstr.Replace(token, "");
//svgGroup.Add(PageItemToSvgText(pageItem, section.DisplayText));
break;
case "{SECTIONLEVELNUMBER}":
case "[SECTIONLEVELNUMBER]":
plstr = plstr.Replace(token, section.DisplayNumber);
_sectLevelNumTtlDiff = (int)pageItem.Row;
//svgGroup.Add(PageItemToSvgText(pageItem, pageItem.Token.Replace(token, section.DisplayNumber)));
break;
case "{UNITTEXT}":