C2019-042 Added a check box to identify a section as being a foldout – used in with printing in duplex

C2019-042 use new format config setting to check if sections are foldouts
C2019-042 use new format config setting to check if sections are foldout
B2019-134 code cleanup, discovered we were missing a “break;” statement in processing folder specific information
This commit is contained in:
2019-11-06 20:50:29 +00:00
parent e8cac09909
commit cfb847de9c
10 changed files with 294 additions and 198 deletions

View File

@@ -347,7 +347,8 @@ namespace Volian.Print.Library
// The format supports compression
// The contents exceeds the length of the page
// The Contents fit at seven lines per inch
if (MyItemInfo.DisplayText.ToUpper().StartsWith("FOLDOUT")
//C2019-042 Section_IsFoldout checks Section Number, Section Title, and use of check box
if ((MyItemInfo.MyActiveSection.MyConfig as SectionConfig).Section_IsFoldout == "Y"
&& MyItemInfo.ActiveFormat.MyStepSectionLayoutData.CompressSteps
&& mySize > yPageSize
&& mySize <= yPageSize * SixLinesPerInch / _SevenLinesPerInch)

View File

@@ -686,8 +686,9 @@ namespace Volian.Print.Library
int cnt = 0;
foreach (SectionInfo mySection in myProcedure.Sections)
{
if ((myProcedure.ActiveFormat.PlantFormat.FormatData.PrintData.SectionLevelFoldouts && mySection.MyContent.Number.ToUpper() == "FOLDOUT")
|| (myProcedure.ActiveFormat.PlantFormat.FormatData.PrintData.AlternateFloatingFoldout && mySection.MyContent.Text.ToUpper().Contains("FOLDOUT")))
//C2019-042 Section_IsFoldout checks Section Number, Section Title, and use of check box
if ((myProcedure.ActiveFormat.PlantFormat.FormatData.PrintData.SectionLevelFoldouts && (mySection.MyConfig as SectionConfig).Section_IsFoldout == "Y")
|| (myProcedure.ActiveFormat.PlantFormat.FormatData.PrintData.AlternateFloatingFoldout && (mySection.MyConfig as SectionConfig).Section_IsFoldout == "Y"))
{
// if floating foldouts, need a list of sections & foldoutreaders. Just do first for now.
@@ -726,7 +727,7 @@ namespace Volian.Print.Library
for (int i = cntSect - 1; i >= 0; i--)
{
SectionInfo mySection = myProcedure.Sections[i] as SectionInfo;
if (!mySection.DisplayText.ToUpper().Contains("FOLDOUT"))
if (!((mySection.MyConfig as SectionConfig).Section_IsFoldout == "Y")) //C2019-042 Section_IsFoldout checks Section Number, Section Title, and use of check box
{
if (mySection.MyDocStyle.Final != null && mySection.MyDocStyle.Final.Message != null && mySection.MyDocStyle.Final.Message.Length > 0)
return mySection.ItemID;
@@ -804,8 +805,9 @@ namespace Volian.Print.Library
foreach (SectionInfo mySection in myProcedure.Sections)
{
NeedSupInfoBreak = true;
if (((mySection.MyContent.Number.ToUpper() == "FOLDOUT" && myProcedure.ActiveFormat.PlantFormat.FormatData.PrintData.SectionLevelFoldouts)
|| (myProcedure.ActiveFormat.PlantFormat.FormatData.PrintData.AlternateFloatingFoldout && mySection.MyContent.Text.ToUpper().Contains("FOLDOUT")))
bool isFoldoutSection = (mySection.MyConfig as SectionConfig).Section_IsFoldout == "Y"; //C2019-042 Section_IsFoldout checks Section Number, Section Title, and use of check box
if (((isFoldoutSection && myProcedure.ActiveFormat.PlantFormat.FormatData.PrintData.SectionLevelFoldouts)
|| (myProcedure.ActiveFormat.PlantFormat.FormatData.PrintData.AlternateFloatingFoldout && isFoldoutSection))
!= doingFoldout) continue;
if (myFoldoutSection != null && myFoldoutSection.ItemID != mySection.ItemID) continue;
PrintOverride.CompressSuper = mySection.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.CompressHPSuper;

View File

@@ -383,7 +383,7 @@ namespace Volian.Print.Library
ItemInfo tiDefault = GetDefaultItemInfo(_Ti.MyItemToID);
ItemInfo from = _Ti.MyContent.ContentItems[0];
if (_Ti.MyItemToID.MyProcedure.ItemID == from.MyProcedure.ItemID &&
!from.ActiveSection.DisplayNumber.ToUpper().StartsWith("FOLDOUT"))
!((from.ActiveSection.MyConfig as SectionConfig).Section_IsFoldout == "Y")) //C2019-042 Section_IsFoldout checks Section Number, Section Title, and use of check box
{ // Local Go To
if (_Ti.MyItemToID.MyContent.Type > 9999) // internal to this file
{

View File

@@ -272,8 +272,9 @@ namespace Volian.Print.Library
DrawRuler(writer.DirectContent);
}
// added the check for onBlankPage and Foldouts to fix bug found in V.C. Summer auto table of contents - 03/08/2016
//C2019-042 Section_IsFoldout checks Section Number, Section Title, and use of check box
if (!onBlankPage && (MySection.MyDocStyle.StructureStyle.Style==null || (MySection.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DontCountInTabOfCont) == 0) &&
!(MySection.ActiveFormat.PlantFormat.FormatData.PrintData.SectionLevelFoldouts && MySection.DisplayNumber.ToUpper() == "FOLDOUT"))
!(MySection.ActiveFormat.PlantFormat.FormatData.PrintData.SectionLevelFoldouts && (MySection.MyConfig as SectionConfig).Section_IsFoldout == "Y"))
CurrentTOCPageNumber++;
if (MySection.ActiveFormat.PlantFormat.FormatData.SectData.PrintPhoneList)
{
@@ -1046,7 +1047,8 @@ i = 0;
// pagelist items in case there are some section items, for example the checkoff header needs
// to be processed for each section whether or not it is continuous.
SectionConfig.SectionPagination sPag = SectionConfig.SectionPagination.Separate;
if (mySection.MyContent.Number.ToUpper() != "FOLDOUT" && mySection.IsStepSection && mySection.MyPrevious != null && mySection.MyPrevious.IsStepSection)
//C2019-042 Section_IsFoldout checks Section Number, Section Title, and use of check box
if ((mySection.MyConfig as SectionConfig).Section_IsFoldout != "Y" && mySection.IsStepSection && mySection.MyPrevious != null && mySection.MyPrevious.IsStepSection)
{
SectionConfig sc = mySection.MyConfig as SectionConfig;
sPag = sc.Section_Pagination;
@@ -1298,7 +1300,8 @@ i = 0;
// If this is a continuous section, then the only pagelist items we want are section type since
// we are still on the same page. - CHECK IF ON SAME PAGE!!!!
SectionConfig.SectionPagination sPag = SectionConfig.SectionPagination.Separate;
if (section.IsStepSection && section.MyPrevious != null && section.MyPrevious.IsStepSection && section.MyContent.Number.ToUpper() != "FOLDOUT")
//C2019-042 Section_IsFoldout checks Section Number, Section Title, and use of check box
if (section.IsStepSection && section.MyPrevious != null && section.MyPrevious.IsStepSection && (section.MyConfig as SectionConfig).Section_IsFoldout != "Y")
{
SectionConfig sc1 = section.MyConfig as SectionConfig;
sPag = sc1.Section_Pagination;
@@ -2083,6 +2086,7 @@ i = 0;
{
val = DocVersionInfo.GetInheritedSIValue(section.MyProcedure, token.Substring(4, token.Length - 5));
plstr = plstr.Replace(token, val);
break; // B2019-134 break out of switch statement after processing the <SI- token so that it can loop and handle any other tokens on the same line
}
else
{

View File

@@ -3422,8 +3422,8 @@ namespace Volian.Print.Library
}
// if printing the supplemental info facing page, don't put out the section title. ToPdf will put out 'Supplemental Information' title.
if (MyPromsPrinter.SupInfoPrintType == E_SupInfoPrintType.Merge && MyPageHelper.CreatingSupInfoPage && itemInfo.IsSection) doprint = false;
if (doprint && itemInfo.IsSection && !itemInfo.MyDocStyle.CancelSectTitle && itemInfo.MyTab.Text.ToUpper() != "FOLDOUT")
{
if (doprint && itemInfo.IsSection && !itemInfo.MyDocStyle.CancelSectTitle && (itemInfo.MyConfig as SectionConfig).Section_IsFoldout != "Y") //C2019-042 Section_IsFoldout checks Section Number, Section Title, and use of check box
{
doSectTab = true;
if (itemInfo.IsStepSection && formatInfo.PlantFormat.FormatData.SectData.SectionNumber.Just.Contains("PSLeft"))
{