This commit is contained in:
parent
0244952ba0
commit
3f113dc9c5
@ -109,11 +109,8 @@ namespace Volian.Print.Library
|
|||||||
if ((MySection.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DontCountInTabOfCont) == 0)
|
if ((MySection.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DontCountInTabOfCont) == 0)
|
||||||
CurrentTOCPageNumber++;
|
CurrentTOCPageNumber++;
|
||||||
}
|
}
|
||||||
if (NegPageItems != null)
|
PageListTopCheckOffHeader = null;
|
||||||
{
|
PageListLastCheckOffHeader = null;
|
||||||
NegPageItems.Clear();
|
|
||||||
NegPageItems = null;
|
|
||||||
}
|
|
||||||
YMultiplier = 1;
|
YMultiplier = 1;
|
||||||
}
|
}
|
||||||
private void DrawRuler(PdfContentByte cb)
|
private void DrawRuler(PdfContentByte cb)
|
||||||
@ -423,7 +420,6 @@ namespace Volian.Print.Library
|
|||||||
{
|
{
|
||||||
VEPROMS.CSLA.Library.FormatInfo activeFormat = mySection.ActiveFormat;
|
VEPROMS.CSLA.Library.FormatInfo activeFormat = mySection.ActiveFormat;
|
||||||
VEPROMS.CSLA.Library.DocStyle docStyle = mySection.MyDocStyle;
|
VEPROMS.CSLA.Library.DocStyle docStyle = mySection.MyDocStyle;
|
||||||
|
|
||||||
Volian.Svg.Library.Svg mySvg = null;
|
Volian.Svg.Library.Svg mySvg = null;
|
||||||
mySvg = SvgSerializer<Volian.Svg.Library.Svg>.StringDeserialize(BuildMyText(activeFormat));
|
mySvg = SvgSerializer<Volian.Svg.Library.Svg>.StringDeserialize(BuildMyText(activeFormat));
|
||||||
mySvg.ViewBox.Height = 1100;
|
mySvg.ViewBox.Height = 1100;
|
||||||
@ -569,9 +565,20 @@ namespace Volian.Print.Library
|
|||||||
return token.Substring(1, 1) + token.Substring(token.Length - 2, 1);
|
return token.Substring(1, 1) + token.Substring(token.Length - 2, 1);
|
||||||
}
|
}
|
||||||
private static Regex regexJustTokens = new Regex(@"^{([^{}]*}{)*[^{}]*}$");
|
private static Regex regexJustTokens = new Regex(@"^{([^{}]*}{)*[^{}]*}$");
|
||||||
public Dictionary<SectionInfo, CheckOffHeaderHelper> NegPageItems;
|
|
||||||
|
// The following variables are used to keep track of whether a check off header should be printed
|
||||||
|
// if the {CHKOFFHEADING} pagelist item is found. PageListTopCheckOffHeader is the text that
|
||||||
|
// should be printed at the top of the page. PageListLastCheckOffHeader is the last header that was
|
||||||
|
// printed (if a header is on the page, and another is to be printed, it doesn't get printed if it
|
||||||
|
// is the same as the previous) and PageListCheckOffHeader is the page list item converted to a
|
||||||
|
// SvgText - this stores X/Y location, etc.
|
||||||
|
public string PageListTopCheckOffHeader = null;
|
||||||
|
public string PageListLastCheckOffHeader = null;
|
||||||
|
public SvgText PageListCheckOffHeader = null;
|
||||||
|
|
||||||
private void AddPageListItems(Volian.Svg.Library.Svg mySvg, VEPROMS.CSLA.Library.PageStyle pageStyle, VEPROMS.CSLA.Library.SectionInfo section)
|
private void AddPageListItems(Volian.Svg.Library.Svg mySvg, VEPROMS.CSLA.Library.PageStyle pageStyle, VEPROMS.CSLA.Library.SectionInfo section)
|
||||||
{
|
{
|
||||||
|
PageListCheckOffHeader = null;
|
||||||
// If this is a continuous section, then the only pagelist items we want are section type since
|
// If this is a continuous section, then the only pagelist items we want are section type since
|
||||||
// we are still on the same page. - CHECK IF ON SAME PAGE!!!!
|
// we are still on the same page. - CHECK IF ON SAME PAGE!!!!
|
||||||
SectionConfig.SectionPagination sPag = SectionConfig.SectionPagination.Separate;
|
SectionConfig.SectionPagination sPag = SectionConfig.SectionPagination.Separate;
|
||||||
@ -589,6 +596,7 @@ namespace Volian.Print.Library
|
|||||||
//float rowAdj = 0; // = 18;
|
//float rowAdj = 0; // = 18;
|
||||||
foreach (VEPROMS.CSLA.Library.PageItem pageItem in pageStyle.PageItems)
|
foreach (VEPROMS.CSLA.Library.PageItem pageItem in pageStyle.PageItems)
|
||||||
{
|
{
|
||||||
|
VE_Font useFontForCheckOffHeader = null;
|
||||||
if (sPag == SectionConfig.SectionPagination.Separate || ((sPag == SectionConfig.SectionPagination.Continuous || sPag ==0 )&& pageItem.Row < 0))
|
if (sPag == SectionConfig.SectionPagination.Separate || ((sPag == SectionConfig.SectionPagination.Continuous || sPag ==0 )&& pageItem.Row < 0))
|
||||||
{
|
{
|
||||||
//if (PrevRow > 0)
|
//if (PrevRow > 0)
|
||||||
@ -713,35 +721,14 @@ namespace Volian.Print.Library
|
|||||||
//svgGroup.Add(PageItemToSvgText(pageItem, pageItem.Token.Replace(token, MySection.MyDocVersion.DocVersionConfig.Unit_Text)));
|
//svgGroup.Add(PageItemToSvgText(pageItem, pageItem.Token.Replace(token, MySection.MyDocVersion.DocVersionConfig.Unit_Text)));
|
||||||
break;
|
break;
|
||||||
case "{CHKOFFHEADING}":
|
case "{CHKOFFHEADING}":
|
||||||
|
// unfortunately, the font is not stored on the page list item if there is an active
|
||||||
|
// check off header. It is stored with the checkoff data as defined by user selection
|
||||||
|
// of the selected header (selection stored in section config).
|
||||||
int sindx = section.CheckOffHeadingIndex();
|
int sindx = section.CheckOffHeadingIndex();
|
||||||
// -1 flags no entires in the format's CheckOffHeaderList & 0 flags the first entry
|
VE_Font vf = sindx <= 0 ?pageItem.Font:
|
||||||
// which is always '{NO HEADING}".
|
section.ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffHeaderList[sindx].Font;
|
||||||
if (sindx > 0)
|
useFontForCheckOffHeader = vf;
|
||||||
{
|
PageListCheckOffHeader = PageItemToSvgText(pageItem, pageItem.Token, vf, section);
|
||||||
plstr = plstr.Replace(token, "");
|
|
||||||
if (pageItem.Row < 0)
|
|
||||||
{
|
|
||||||
// for the checkoff header, use the font from the CheckOffData Checkoffheader, font to get the
|
|
||||||
// font style, i.e. bold - underline.
|
|
||||||
if (NegPageItems == null) NegPageItems = new Dictionary<SectionInfo, CheckOffHeaderHelper>();
|
|
||||||
|
|
||||||
// now see if this same checkoff header is on the page, if so, don't
|
|
||||||
// add it to the list. We only want those that are different.
|
|
||||||
bool add = true;
|
|
||||||
foreach (CheckOffHeaderHelper h in NegPageItems.Values)
|
|
||||||
{
|
|
||||||
if (section.ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffHeaderList[sindx].CheckOffHeading == h.SvgText.Text) add=false;
|
|
||||||
}
|
|
||||||
if (add)
|
|
||||||
{
|
|
||||||
SvgText svgt = PageItemToSvgText(pageItem, section.ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffHeaderList[sindx].CheckOffHeading, section.ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffHeaderList[sindx].Font, section);
|
|
||||||
CheckOffHeaderHelper hlp = new CheckOffHeaderHelper(svgt, section.ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffHeaderList[sindx].Font);
|
|
||||||
NegPageItems.Add(section, hlp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
svgGroup.Add(PageItemToSvgText(pageItem, section.ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffHeaderList[sindx].CheckOffHeading, section.ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffHeaderList[sindx].Font, section));
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
// see if it's a PSI token:
|
// see if it's a PSI token:
|
||||||
@ -797,8 +784,14 @@ namespace Volian.Print.Library
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} // end foreach matches
|
} // end foreach matches
|
||||||
|
|
||||||
if (plstr != "")
|
if (plstr != "")
|
||||||
svgGroup.Add(PageItemToSvgText(pageItem, plstr, MySection));
|
{
|
||||||
|
if (useFontForCheckOffHeader != null)
|
||||||
|
svgGroup.Add(PageItemToSvgText(pageItem, plstr, useFontForCheckOffHeader, MySection));
|
||||||
|
else
|
||||||
|
svgGroup.Add(PageItemToSvgText(pageItem, plstr, MySection));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
svgGroup.Add(PageItemToSvgText(pageItem, pageItem.Token, MySection));
|
svgGroup.Add(PageItemToSvgText(pageItem, pageItem.Token, MySection));
|
||||||
@ -1084,6 +1077,8 @@ namespace Volian.Print.Library
|
|||||||
// == to a ' ' (space) and if so, start Rev from second character.
|
// == to a ' ' (space) and if so, start Rev from second character.
|
||||||
if (Rev !=null && Rev != "" && Rev[0] == ' ') return Rev.Substring(1, Rev.Length - 1);
|
if (Rev !=null && Rev != "" && Rev[0] == ' ') return Rev.Substring(1, Rev.Length - 1);
|
||||||
return Rev;
|
return Rev;
|
||||||
|
case "{CHKOFFHEADING}":
|
||||||
|
return PageListTopCheckOffHeader;
|
||||||
}
|
}
|
||||||
if (!_MissingTokens.Contains(match.Value))
|
if (!_MissingTokens.Contains(match.Value))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user