Added properties for IsSubsection, IsSubsectionNumber and IsSeparateSubsection

Improved debug
Calvert: Improved tab on Section Continue Message and print missing Section Continue Message
This commit is contained in:
2014-11-13 15:50:46 +00:00
parent edf38ca662
commit 7d3b8872c8
3 changed files with 50 additions and 10 deletions

View File

@@ -116,8 +116,14 @@ namespace Volian.Print.Library
yDescent = -iParagraph.Font.BaseFont.GetDescentPoint("Almg", iParagraph.Font.Size);
if (PdfDebug)
{
// be very careful around the following line, if the cursor 'touches'
// NextTextAtCounter, it is incremented and the 'next' value may not be what
// was seen as the UniqueNumber in the pdf.
int next = NextTextAtCounter;
//if (InList(next,1884,1985,1986,1987,1988,1989)) Console.WriteLine("here");
// buffer (unnecessary comments) so
// that cursor does NOT touch 'NextTextAtCounter'
// as easily
//if (InList(next,2958, 2961)) Console.WriteLine("Stop at UniqueNumber");
string dbt = string.Format("[{0}]{1}", next, debugText ?? "");
DrawPdfDebug(cb, left, top, left + width, myColumnText.YLine, dbt, yDescent);
}

View File

@@ -1010,16 +1010,16 @@ namespace Volian.Print.Library
if (!itemInfo.IsHigh && !itemInfo.IsSequential && !itemInfo.IsSection) itemInfo = itemInfo.ActiveParent as ItemInfo;
string prTab = "";
string thisTab = itemInfo.MyTab.CleanText.Trim();
if (!itemInfo.IsSection)
if (!itemInfo.IsSection || itemInfo.IsSeparateSubsection)
{
ItemInfo mypar = itemInfo.MyParent;
ItemInfo mypar = itemInfo.MyParent;
while (mypar != null && !mypar.IsProcedure)
{
string pTab = mypar.MyTab.CleanText.Trim();
{
string pTab = mypar.MyTab.CleanText.Trim();
if (pTab.Length > 0 && char.IsLetterOrDigit(pTab[0]))
{
pTab = pTab.TrimEnd(" .".ToCharArray()) + ".";
prTab = pTab + prTab;
pTab = pTab.TrimEnd(" .".ToCharArray()) + ".";
prTab = pTab + prTab;
}
else
{
@@ -1029,7 +1029,7 @@ namespace Volian.Print.Library
prTab = "";
thisTab = "";
}
mypar = (mypar.IsSection)? null: mypar.MyParent;
mypar = (mypar.IsSection && !mypar.IsSeparateSubsection) ? null : mypar.MyParent;
}
}
return (prTab + thisTab.Trim()).TrimEnd(".".ToCharArray());
@@ -1149,7 +1149,7 @@ namespace Volian.Print.Library
if (doSectionContinue) DoTopContinueMsg(cb, ref yPageStart, yTopMargin, docstyle , null);
// If "ContinueSectionHeader" (format flag) is true then print the section title with "(Continued)" appended to it
if (!MyItemInfo.IsSection && MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.ContinueSectionHeader)
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.ContinueSectionHeader && (!MyItemInfo.IsSection || MyItemInfo.IsSeparateSubsection))
{
SectionConfig sch = MyItemInfo.ActiveSection.MyConfig as SectionConfig;
doSectionTitleContinued = (sch == null || sch.Section_PrintHdr == "Y") && !MyItemInfo.MyDocStyle.CancelSectTitle;
@@ -2291,7 +2291,7 @@ namespace Volian.Print.Library
{
SectionConfig sc = itemInfo.MyParent.MyConfig as SectionConfig;
offset = (sc != null && sc.SubSection_AutoIndent == "Y") ? MyParent.XOffset
: (MyParent.MyTab != null)?MyParent.MyTab.XOffset:XOffset;
: (MyParent != null && MyParent.MyTab != null)?MyParent.MyTab.XOffset:XOffset;
}
}
else