Changed logic to properly output checkoff header "INITIALS"
This commit is contained in:
@@ -200,6 +200,7 @@ namespace Volian.Print.Library
|
||||
//}
|
||||
public override void OnEndPage(PdfWriter writer, iTextSharp.text.Document document)
|
||||
{
|
||||
InitialsPrinted = false;
|
||||
MyPromsPrinter.OnStatusChanged(string.Format("Page {0}", CurrentPageNumber+1));
|
||||
bool onBlankPage = OnBlankPage;
|
||||
if (OnBlankPage)
|
||||
@@ -886,6 +887,8 @@ namespace Volian.Print.Library
|
||||
mySvg.LeftMargin = (float)docStyle.Layout.LeftMargin;
|
||||
mySvg.TopMargin = 9.6F;
|
||||
VEPROMS.CSLA.Library.PageStyle pageStyle = docStyle.pagestyle;
|
||||
HasInitials = false;
|
||||
PIInitials = null;
|
||||
AddPageListItems(mySvg, pageStyle, mySection, forceLoad);
|
||||
mySvg.ProcessText += new SvgProcessTextEvent(mySvg_ProcessText);
|
||||
// if this section had a previous section and this is continuous, don't generate the svg for
|
||||
@@ -1693,11 +1696,24 @@ namespace Volian.Print.Library
|
||||
// For Calvert: if this section has checkoffs turned on, put out this pagelist item:
|
||||
// Get SectionInfos to access specific section config items...
|
||||
//SectionInfo si = SectionInfo.Get(MySection.ItemID);
|
||||
SectionInfo si = MySection.GetSectionInfo();
|
||||
SectionConfig sectCfg = si.MyConfig as SectionConfig;
|
||||
int sc = sectCfg.Section_CheckoffListSelection;
|
||||
if (sc < 2 && !si.HasStepCheckOffs) plstr = plstr.Replace(token, "");
|
||||
else plstr = plstr.Replace(token, "INITIALS");
|
||||
//SectionInfo si = MySection.GetSectionInfo();
|
||||
//SectionConfig sectCfg = si.MyConfig as SectionConfig;
|
||||
//int sc = sectCfg.Section_CheckoffListSelection;
|
||||
if (!MySection.HasInitials)
|
||||
{
|
||||
plstr = plstr.Replace(token, "");
|
||||
//PIInitials = pageItem;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pageItem.Row == -MySection.MyDocStyle.Layout.TopMargin)
|
||||
{
|
||||
plstr = plstr.Replace(token, "");
|
||||
PIInitials = pageItem;
|
||||
}
|
||||
else
|
||||
plstr = plstr.Replace(token, "INITIALS");
|
||||
}
|
||||
break;
|
||||
case "{REVUNIT}":
|
||||
// copied from 16bit's pagelist.cs for BGE:
|
||||
@@ -1860,7 +1876,42 @@ namespace Volian.Print.Library
|
||||
}
|
||||
return plstr;
|
||||
}
|
||||
|
||||
private PageItem _PIInitials = null;
|
||||
public PageItem PIInitials
|
||||
{
|
||||
get { return _PIInitials; }
|
||||
set
|
||||
{
|
||||
if (_PIInitials != null && value == null)
|
||||
_LastPIInitials = _PIInitials;
|
||||
_PIInitials = value;
|
||||
}
|
||||
}
|
||||
private PageItem _LastPIInitials = null;
|
||||
public PageItem LastPIInitials
|
||||
{
|
||||
get { return _LastPIInitials; }
|
||||
set { _LastPIInitials = value; }
|
||||
}
|
||||
private bool _HasInitials = false;
|
||||
public bool HasInitials
|
||||
{
|
||||
get { return _HasInitials; }
|
||||
set { _HasInitials = value; }
|
||||
}
|
||||
private bool _InitialsPrinted = false;
|
||||
public bool InitialsPrinted
|
||||
{
|
||||
get { return _InitialsPrinted; }
|
||||
set { _InitialsPrinted = value; }
|
||||
}
|
||||
public bool PrintInitials(PdfContentByte cb,float yLocation, float leftMargin)
|
||||
{
|
||||
if (InitialsPrinted) return false;
|
||||
InitialsPrinted = true;
|
||||
vlnParagraph.TextAt(cb,this, PIInitials ?? LastPIInitials, yLocation, leftMargin);
|
||||
return true;
|
||||
}
|
||||
private void DoSpecialSectNumTitle(SvgGroup svgGroup, VEPROMS.CSLA.Library.PageItem pageItem, string title, int? len, string match, string plstr)
|
||||
{
|
||||
// first add anything up to the "@@" to the svgGroup:
|
||||
|
Reference in New Issue
Block a user