Added code to use ShowSectionTitles property
This commit is contained in:
parent
54bae90bfb
commit
5d7d23f292
@ -170,6 +170,13 @@ namespace Volian.Print.Library
|
|||||||
get { return _IsWordDocPara; }
|
get { return _IsWordDocPara; }
|
||||||
set { _IsWordDocPara = value; }
|
set { _IsWordDocPara = value; }
|
||||||
}
|
}
|
||||||
|
private bool _ShowSectionTitles;
|
||||||
|
public bool ShowSectionTitles
|
||||||
|
{
|
||||||
|
get { return _ShowSectionTitles; }
|
||||||
|
set { _ShowSectionTitles = value; }
|
||||||
|
}
|
||||||
|
|
||||||
public float ParagraphToPdf(PdfContentByte cb, float yPageStart, float yTopMargin, float yBottomMargin)
|
public float ParagraphToPdf(PdfContentByte cb, float yPageStart, float yTopMargin, float yBottomMargin)
|
||||||
{
|
{
|
||||||
if (Processed) return yPageStart;
|
if (Processed) return yPageStart;
|
||||||
@ -187,6 +194,8 @@ namespace Volian.Print.Library
|
|||||||
if (MyItemInfo.HasChangeBar && MyPageHelper.ChangeBarDefinition.MyChangeBarType != PrintChangeBar.Without) MyPageHelper.AddChangeBar(DoChangeBar(cb, MyItemInfo, MyPageHelper, XOffset, yLocation, MyPageHelper.MaxRNO, MyItemInfo.ActiveFormat), cbMess);
|
if (MyItemInfo.HasChangeBar && MyPageHelper.ChangeBarDefinition.MyChangeBarType != PrintChangeBar.Without) MyPageHelper.AddChangeBar(DoChangeBar(cb, MyItemInfo, MyPageHelper, XOffset, yLocation, MyPageHelper.MaxRNO, MyItemInfo.ActiveFormat), cbMess);
|
||||||
float retval = yLocation;
|
float retval = yLocation;
|
||||||
bool doprint = true;
|
bool doprint = true;
|
||||||
|
if (MyItemInfo.ItemID == 25045)
|
||||||
|
Console.WriteLine("jcb");
|
||||||
if (MyItemInfo.IsFigure)
|
if (MyItemInfo.IsFigure)
|
||||||
{
|
{
|
||||||
yLocation -= (SixLinesPerInch * MyPageHelper.YMultiplier);
|
yLocation -= (SixLinesPerInch * MyPageHelper.YMultiplier);
|
||||||
@ -197,7 +206,7 @@ namespace Volian.Print.Library
|
|||||||
|
|
||||||
}
|
}
|
||||||
else if (!MyItemInfo.IsStepSection
|
else if (!MyItemInfo.IsStepSection
|
||||||
|| (MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.ShowSectionTitles
|
|| (ShowSectionTitles
|
||||||
&& !MyItemInfo.MyDocStyle.CancelSectTitle
|
&& !MyItemInfo.MyDocStyle.CancelSectTitle
|
||||||
&& !MyItemInfo.MyDocStyle.SpecialStepsFoldout)) // Don't ouput the Step Section title
|
&& !MyItemInfo.MyDocStyle.SpecialStepsFoldout)) // Don't ouput the Step Section title
|
||||||
{
|
{
|
||||||
@ -205,7 +214,7 @@ namespace Volian.Print.Library
|
|||||||
if (MyItemInfo.IsSection)
|
if (MyItemInfo.IsSection)
|
||||||
{
|
{
|
||||||
SectionConfig sch = MyItemInfo.MyConfig as SectionConfig;
|
SectionConfig sch = MyItemInfo.MyConfig as SectionConfig;
|
||||||
if (!(MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.ShowSectionTitles
|
if (!(ShowSectionTitles
|
||||||
&& !MyItemInfo.MyDocStyle.CancelSectTitle
|
&& !MyItemInfo.MyDocStyle.CancelSectTitle
|
||||||
&& !MyItemInfo.MyDocStyle.SpecialStepsFoldout
|
&& !MyItemInfo.MyDocStyle.SpecialStepsFoldout
|
||||||
&& !MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.UseMetaSections)
|
&& !MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.UseMetaSections)
|
||||||
@ -758,7 +767,7 @@ namespace Volian.Print.Library
|
|||||||
PromsPrinter.DoFoldoutPage(cb, "HLS (7 lpi) break", MyPageHelper.TextLayer, MyPageHelper, MyItemInfo.FoldoutIndex());
|
PromsPrinter.DoFoldoutPage(cb, "HLS (7 lpi) break", MyPageHelper.TextLayer, MyPageHelper, MyItemInfo.FoldoutIndex());
|
||||||
}
|
}
|
||||||
if (MyItemInfo.MyParent != null && MyItemInfo.MyParent.IsStepSection &&
|
if (MyItemInfo.MyParent != null && MyItemInfo.MyParent.IsStepSection &&
|
||||||
MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.ShowSectionTitles
|
ShowSectionTitles
|
||||||
&& !MyItemInfo.MyDocStyle.CancelSectTitle
|
&& !MyItemInfo.MyDocStyle.CancelSectTitle
|
||||||
&& !MyItemInfo.MyDocStyle.SpecialStepsFoldout)
|
&& !MyItemInfo.MyDocStyle.SpecialStepsFoldout)
|
||||||
yPageStart = yPageStart; // if printing the section title, we already have the y location
|
yPageStart = yPageStart; // if printing the section title, we already have the y location
|
||||||
@ -1015,6 +1024,7 @@ namespace Volian.Print.Library
|
|||||||
private int COL_WID_ADJ = 6; // adjusts for incorrect use of WidSTable when breaking a line (it breaks 6 chars too short)
|
private int COL_WID_ADJ = 6; // adjusts for incorrect use of WidSTable when breaking a line (it breaks 6 chars too short)
|
||||||
public vlnParagraph(vlnParagraph parent, PdfContentByte cb, ItemInfo itemInfo, float xoff, float yoff, int rnoLevel, int maxRNO, FormatInfo formatInfo, string prefix, string suffix)
|
public vlnParagraph(vlnParagraph parent, PdfContentByte cb, ItemInfo itemInfo, float xoff, float yoff, int rnoLevel, int maxRNO, FormatInfo formatInfo, string prefix, string suffix)
|
||||||
{
|
{
|
||||||
|
ShowSectionTitles = formatInfo.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.ShowSectionTitles || itemInfo.MyDocStyle.ShowSectionTitles;
|
||||||
int MetaLevel = 0; // if meta section, stores what level this section is.
|
int MetaLevel = 0; // if meta section, stores what level this section is.
|
||||||
float savCheckListBottomMost = 0;
|
float savCheckListBottomMost = 0;
|
||||||
//int[] problemIDs = { 889 };
|
//int[] problemIDs = { 889 };
|
||||||
@ -1068,7 +1078,7 @@ namespace Volian.Print.Library
|
|||||||
if (itemInfo.IsSection)
|
if (itemInfo.IsSection)
|
||||||
{
|
{
|
||||||
SectionConfig sch = MyItemInfo.MyConfig as SectionConfig;
|
SectionConfig sch = MyItemInfo.MyConfig as SectionConfig;
|
||||||
if (!(MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.ShowSectionTitles
|
if (!(ShowSectionTitles
|
||||||
&& !MyItemInfo.MyDocStyle.CancelSectTitle
|
&& !MyItemInfo.MyDocStyle.CancelSectTitle
|
||||||
&& !MyItemInfo.MyDocStyle.SpecialStepsFoldout)
|
&& !MyItemInfo.MyDocStyle.SpecialStepsFoldout)
|
||||||
&&
|
&&
|
||||||
@ -1336,7 +1346,7 @@ namespace Volian.Print.Library
|
|||||||
else
|
else
|
||||||
if (itemInfo.FormatStepData != null && itemInfo.FormatStepData.StepPrintData != null) XOffset += (float)(itemInfo.FormatStepData.StepPrintData.PosAdjust ?? 0);
|
if (itemInfo.FormatStepData != null && itemInfo.FormatStepData.StepPrintData != null) XOffset += (float)(itemInfo.FormatStepData.StepPrintData.PosAdjust ?? 0);
|
||||||
|
|
||||||
if (itemInfo.IsSection && formatInfo.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.ShowSectionTitles
|
if (itemInfo.IsSection && ShowSectionTitles
|
||||||
&& !MyItemInfo.MyDocStyle.CancelSectTitle)
|
&& !MyItemInfo.MyDocStyle.CancelSectTitle)
|
||||||
{
|
{
|
||||||
if (MyItemInfo.MyDocStyle.Layout.SectionMacro != null)
|
if (MyItemInfo.MyDocStyle.Layout.SectionMacro != null)
|
||||||
@ -1366,7 +1376,7 @@ namespace Volian.Print.Library
|
|||||||
// Get Y offset for regular steps, or if section title is output or if not within row (not last column of
|
// Get Y offset for regular steps, or if section title is output or if not within row (not last column of
|
||||||
// text) for wcn checklist, i.e.
|
// text) for wcn checklist, i.e.
|
||||||
if ((!itemInfo.IsStepSection && !itemInfo.MyHLS.FormatStepData.UseSmartTemplate) // regular step
|
if ((!itemInfo.IsStepSection && !itemInfo.MyHLS.FormatStepData.UseSmartTemplate) // regular step
|
||||||
|| (formatInfo.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.ShowSectionTitles
|
|| (ShowSectionTitles
|
||||||
&& !MyItemInfo.MyDocStyle.CancelSectTitle
|
&& !MyItemInfo.MyDocStyle.CancelSectTitle
|
||||||
&& !MyItemInfo.MyDocStyle.SpecialStepsFoldout)
|
&& !MyItemInfo.MyDocStyle.SpecialStepsFoldout)
|
||||||
// In Checklist: I don't have children or if I have children the first child doesn't alignwithparent.
|
// In Checklist: I don't have children or if I have children the first child doesn't alignwithparent.
|
||||||
@ -2325,7 +2335,7 @@ namespace Volian.Print.Library
|
|||||||
{
|
{
|
||||||
if (sd.StepSectionData.StepSectionLayoutData.TieTabToLevel)
|
if (sd.StepSectionData.StepSectionLayoutData.TieTabToLevel)
|
||||||
{
|
{
|
||||||
if (itemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.ShowSectionTitles
|
if (ShowSectionTitles
|
||||||
&& !itemInfo.MyDocStyle.CancelSectTitle
|
&& !itemInfo.MyDocStyle.CancelSectTitle
|
||||||
&& !(itemInfo.MyDocStyle.SpecialStepsFoldout && itemInfo.MyDocStyle.UseColSByLevel))
|
&& !(itemInfo.MyDocStyle.SpecialStepsFoldout && itemInfo.MyDocStyle.UseColSByLevel))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user