Logic for more control over indenting and underlining on Auto Table of Contents

Added logic to prevent multiple numbers (on top of each other) from printing on the AutoTableOfContents, added logic to support format defined section continue text, logic to support EndMessageOnEachSubSection, logic to repeat high level step text as part of a continue message
Logic to support DidFirstPageDocStyle flag, logic to support {SECTIONLEVELNUMBER} {SECTIONLEVELTITLE} on the same line of a pagelist item when the section title goes to more than one line.
This commit is contained in:
2014-10-07 19:37:11 +00:00
parent 3162883a66
commit ea01b9bf71
3 changed files with 77 additions and 19 deletions

View File

@@ -210,7 +210,7 @@ namespace Volian.Print.Library
if (!CreatingFoldoutPage)
DrawRuler(writer.DirectContent);
}
if (MySection.MyDocStyle.StructureStyle.Style==null || (MySection.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DontCountInTabOfCont) == 0)
if (MySection.MyDocStyle.StructureStyle.Style == null || (MySection.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DontCountInTabOfCont) == 0)
CurrentTOCPageNumber++;
if (MySection.ActiveFormat.PlantFormat.FormatData.SectData.PrintPhoneList)
{
@@ -647,8 +647,8 @@ namespace Volian.Print.Library
_MySection = value;
MySectionTitle = ((_MySection.DisplayNumber ?? "")=="" ? "" : _MySection.DisplayNumber + " - ") + _MySection.DisplayText;
bool forceLoadSvg = false;
//if (value.SectionConfig.Section_Pagination == SectionConfig.SectionPagination.Separate && value.MyDocStyle.ResetFirstPageOnSection)
// DidFirstPageDocStyle = false;
if (value.SectionConfig.Section_Pagination == SectionConfig.SectionPagination.Separate && value.MyDocStyle.ResetFirstPageOnSection)
DidFirstPageDocStyle = false;
if (DidFirstPageDocStyle)
forceLoadSvg = SetDocStyleAndValues(); // this method also gets the SVG (the 'else' part of this)
Volian.Svg.Library.Svg sectSvg = BuildSvg(_MySection, forceLoadSvg);
@@ -895,7 +895,7 @@ namespace Volian.Print.Library
MyPdfContentByte.AddTemplate(MyPageCounts.AddToTemplateList(key, MyPdfWriter, txt, args.MySvgText.Font, args.MySvgText.Align, args.MySvgText.FillColor), args.MySvgScale.X(args.MySvgText.X), args.MySvgScale.Y(MyPdfContentByte, args.MySvgText.Y));
return string.Empty;
}
string tocKey = "TOC" + MySection.ItemID.ToString();
//string tocKey = "TOC" + MySection.ItemID.ToString();
if (args.MyText.Contains("{PAGE}") || args.MyText.Contains("{OF}"))
{
@@ -1747,13 +1747,13 @@ namespace Volian.Print.Library
plstr = plstr.Replace(match, line);
else
{
//if (cnt == 1)
//{
// plstr = plstr.Replace(match, line);
// svgGroup.Add(PageItemToSvgText(pageItem, plstr, yOffset));
// plstr = "";
//}
//else
if (cnt == 1)
{
plstr = plstr.Replace(match, line); // include preceeding text with the first line v.c. summer
svgGroup.Add(PageItemToSvgText(pageItem, plstr, yOffset));
plstr = "";
}
else
svgGroup.Add(PageItemToSvgText(pageItem, line, yOffset));
plstr = plstr.Replace(match, "");
}