B2015-043: BGE - fixed section continuation headers and x-offset for subsection titles in OI-34 Appendix sections

This commit is contained in:
Kathy Ruffing 2015-03-27 12:53:12 +00:00
parent 381376843f
commit 37d570626e

View File

@ -1140,6 +1140,19 @@ namespace Volian.Print.Library
{
ItemInfo mypar = itemInfo.MyParent;
while (mypar != null && !mypar.IsProcedure)
{
// The following check was added for BGE/OI34. Their APPENDIX sections had the subsections
// printing with incorrect tab in the SectionTitleContinued message. Before this
// fix the tabs were A.B Procedure (Continued) rather than B. Procedure (Continued).
// Unfortunately there was not enough time to make the 'if' statement based on config
// or format settings.
bool addTab = true;
if (mypar.IsSection && mypar.DisplayNumber.ToUpper().Contains("APPENDIX "))
{
SectionConfig sch = mypar.MyConfig as SectionConfig;
addTab = (sch == null || sch.Section_PrintHdr == "Y");// && !mypar.MyDocStyle.CancelSectTitle;
}
if (addTab)
{
string pTab = mypar.MyTab.CleanText.Trim();
if (pTab.Length > 0 && char.IsLetterOrDigit(pTab[0]))
@ -1155,6 +1168,7 @@ namespace Volian.Print.Library
prTab = "";
thisTab = "";
}
}
mypar = (mypar.IsSection && !mypar.IsSeparateSubsection) ? null : mypar.MyParent;
}
}
@ -1448,7 +1462,17 @@ namespace Volian.Print.Library
{
string myMsg = MyItemInfo.MyDocStyle.Continue.Top.Message;
if (myMsg == null || myMsg == "")
{
// There is no message, but still need to check if there is a Section Title Continued message:
// This was added for BGE OI34 (if break was within step, no section title continue message was printed)
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.ContinueSectionHeader)
{
SectionConfig sch = MyItemInfo.ActiveSection.MyConfig as SectionConfig;
doSectionTitleContinued = (sch == null || sch.Section_PrintHdr == "Y") && !MyItemInfo.MyDocStyle.CancelSectTitle;
}
else
doSectionTitleContinued = false;
}
else
{
SectionConfig sch = MyItemInfo.ActiveSection.MyConfig as SectionConfig;
@ -2582,8 +2606,28 @@ namespace Volian.Print.Library
{
SectionConfig sc = itemInfo.MyParent.MyConfig as SectionConfig;
if (MyParent != null)
{
// if the parent is not printed, then adjust the xoffset based on
// the level of the metasection. Note that the 'if (MetaLevel==20) MetaLevel = 1'
// line of code was added so that the xoffsets between 16 & 32 bit are closer.
// This code was added to fix problems in BGE OI34, Appendix sections/subsection xoffsets.
if (sc != null && sc.Section_PrintHdr == "N")
{
if (MetaLevel == 2) MetaLevel = 1;
xMetaAdj = (float)formatInfo.PlantFormat.FormatData.SectData.MetaSectionList[0].ColSByLevel;
for (int i = 0; i < MetaLevel; i++)
{
xMetaAdj += (float)formatInfo.PlantFormat.FormatData.SectData.SectionHeader.Pos - (float)formatInfo.PlantFormat.FormatData.SectData.SectionNumber.Pos;
xMetaAdj += (float)formatInfo.PlantFormat.FormatData.SectData.MetaSectionList[i].SecNumPositionAdj;
}
offset += xMetaAdj;
}
else
{
offset = (sc != null && sc.SubSection_AutoIndent == "Y") ? MyParent.XOffset
: (MyParent.MyTab != null)?MyParent.MyTab.XOffset:XOffset;
: (MyParent.MyTab != null) ? MyParent.MyTab.XOffset : XOffset;
}
}
}
}
else