diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs index ebbff576..7e63e134 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs @@ -3819,6 +3819,22 @@ namespace VEPROMS.CSLA.Library } return false; } + // Function to find if in part of a Background Step + public bool IsPartOfBackgroundStep() + { + if (ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.WolfCreekBackgroundFormat) + { + ItemInfo itm = this; + while (itm.MyPrevious != null) + { + if (itm.MyPrevious.IsBackgroundStep()) return true; + if (itm.MyPrevious != null && itm.MyPrevious.IsStep && itm.MyPrevious.FormatStepData.Type.ToUpper() == "TITLEWITHTEXTBELOW" && FormatStepData.Type.ToUpper() != "IMPLICITOR") return true; + itm = itm.MyPrevious; + } + return false; + } + return false; + } private bool InNote() { // walk up until procedure level and if finding a note type, return true, otherwise false. diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index 0ca458ed..bc49b591 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -4854,6 +4854,7 @@ namespace Volian.Print.Library { if (myTab != null) myTab.XOffset = XOffset; XOffset += (itemInfo.FormatStepData.Font.CharsToTwips * 2); // indent 2 characters for background steps + Width -= (itemInfo.FormatStepData.Font.CharsToTwips * 2); // Adjust width by 2 characters return; } else if (itemInfo.FormatStepData.UseOldTemplate && itemInfo.IsInTemplate() && @@ -4885,8 +4886,10 @@ namespace Volian.Print.Library XOffset = (float)colOvrd; else { - XOffset = (float)itemInfo.MyDocStyle.Layout.LeftMargin; - Width = (float)itemInfo.MyDocStyle.Layout.PageWidth - (float)itemInfo.MyDocStyle.Layout.LeftMargin; + //Adjuust Indent for Wolf Creek Background format flag + float indentBG1 = itemInfo.IsPartOfBackgroundStep() ? itemInfo.FormatStepData.Font.CharsToTwips * 2 : 0; + XOffset = (float)itemInfo.MyDocStyle.Layout.LeftMargin + indentBG1; + Width = (float)itemInfo.MyDocStyle.Layout.PageWidth - (float)itemInfo.MyDocStyle.Layout.LeftMargin - indentBG1; } return; } @@ -4901,8 +4904,10 @@ namespace Volian.Print.Library } else { - XOffset = childindent + MyParent.XOffset;//(itemInfo.FormatStepData.Font.CharsToTwips * 2); - Width = (float)itemInfo.MyDocStyle.Layout.PageWidth - (float)itemInfo.MyDocStyle.Layout.LeftMargin; + //Adjuust Indent for Wolf Creek Background format flag + float indentBG2 = itemInfo.IsPartOfBackgroundStep() ? itemInfo.FormatStepData.Font.CharsToTwips * 2 : 0; + XOffset = childindent + MyParent.XOffset+ indentBG2;//(itemInfo.FormatStepData.Font.CharsToTwips * 2); + Width = (float)itemInfo.MyDocStyle.Layout.PageWidth - (float)itemInfo.MyDocStyle.Layout.LeftMargin - indentBG2; } return; } @@ -5180,7 +5185,6 @@ namespace Volian.Print.Library Width -= xIncrement; } } - private bool PreviousIsTitleWithTextBelow(ItemInfo itemInfo) { while(itemInfo.MyPrevious != null)