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:
parent
edf38ca662
commit
7d3b8872c8
@ -1625,6 +1625,40 @@ namespace VEPROMS.CSLA.Library
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public bool IsSubsection
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (!IsSection) return false;
|
||||||
|
ItemInfo par = ActiveParent as ItemInfo;
|
||||||
|
if (par == null || !par.IsSection) return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public bool IsSubsectionNumber
|
||||||
|
{
|
||||||
|
// returns whether the subsection number is derived from section number,
|
||||||
|
// for example 6.9 is subsectionnumber of 6.0. B is not a subsectionnumber of 6.9
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (!IsSection) return false;
|
||||||
|
ItemInfo par = ActiveParent as ItemInfo;
|
||||||
|
if (par == null || !par.IsSection) return false;
|
||||||
|
string parNumber = par.DisplayNumber;
|
||||||
|
string myNumber = DisplayNumber;
|
||||||
|
if (parNumber == null || myNumber == null) return false;
|
||||||
|
if (!parNumber.EndsWith(".0")) return false;
|
||||||
|
return (myNumber.StartsWith(parNumber.Substring(0, parNumber.Length - 1)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public bool IsSeparateSubsection
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return (IsSubsection && !IsSubsectionNumber);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public bool IsFolder
|
public bool IsFolder
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
@ -116,8 +116,14 @@ namespace Volian.Print.Library
|
|||||||
yDescent = -iParagraph.Font.BaseFont.GetDescentPoint("Almg", iParagraph.Font.Size);
|
yDescent = -iParagraph.Font.BaseFont.GetDescentPoint("Almg", iParagraph.Font.Size);
|
||||||
if (PdfDebug)
|
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;
|
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 ?? "");
|
string dbt = string.Format("[{0}]{1}", next, debugText ?? "");
|
||||||
DrawPdfDebug(cb, left, top, left + width, myColumnText.YLine, dbt, yDescent);
|
DrawPdfDebug(cb, left, top, left + width, myColumnText.YLine, dbt, yDescent);
|
||||||
}
|
}
|
||||||
|
@ -1010,7 +1010,7 @@ namespace Volian.Print.Library
|
|||||||
if (!itemInfo.IsHigh && !itemInfo.IsSequential && !itemInfo.IsSection) itemInfo = itemInfo.ActiveParent as ItemInfo;
|
if (!itemInfo.IsHigh && !itemInfo.IsSequential && !itemInfo.IsSection) itemInfo = itemInfo.ActiveParent as ItemInfo;
|
||||||
string prTab = "";
|
string prTab = "";
|
||||||
string thisTab = itemInfo.MyTab.CleanText.Trim();
|
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)
|
while (mypar != null && !mypar.IsProcedure)
|
||||||
@ -1029,7 +1029,7 @@ namespace Volian.Print.Library
|
|||||||
prTab = "";
|
prTab = "";
|
||||||
thisTab = "";
|
thisTab = "";
|
||||||
}
|
}
|
||||||
mypar = (mypar.IsSection)? null: mypar.MyParent;
|
mypar = (mypar.IsSection && !mypar.IsSeparateSubsection) ? null : mypar.MyParent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return (prTab + thisTab.Trim()).TrimEnd(".".ToCharArray());
|
return (prTab + thisTab.Trim()).TrimEnd(".".ToCharArray());
|
||||||
@ -1149,7 +1149,7 @@ namespace Volian.Print.Library
|
|||||||
|
|
||||||
if (doSectionContinue) DoTopContinueMsg(cb, ref yPageStart, yTopMargin, docstyle , null);
|
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 "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;
|
SectionConfig sch = MyItemInfo.ActiveSection.MyConfig as SectionConfig;
|
||||||
doSectionTitleContinued = (sch == null || sch.Section_PrintHdr == "Y") && !MyItemInfo.MyDocStyle.CancelSectTitle;
|
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;
|
SectionConfig sc = itemInfo.MyParent.MyConfig as SectionConfig;
|
||||||
offset = (sc != null && sc.SubSection_AutoIndent == "Y") ? MyParent.XOffset
|
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
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user