This commit is contained in:
@@ -160,10 +160,12 @@ namespace Volian.Print.Library
|
||||
cb.RestoreState();
|
||||
}
|
||||
|
||||
private void ResetDocStyleAndValues()
|
||||
private bool ResetDocStyleAndValues()
|
||||
{
|
||||
// if this document style has another style that is for pages other than first, we need to
|
||||
// reset the document style off of this section AND reset docstyle values used.
|
||||
// reset the document style off of this section AND reset docstyle values used
|
||||
// AND reset the 'svg' data.
|
||||
bool forceLoadSvg = false;
|
||||
if ((MySection.MyDocStyle.StructureStyle.Where & E_DocStyleUse.UseOnFirstPage) > 0)
|
||||
{
|
||||
//Console.WriteLine("{0} ResetDocStyleAndValues", MySection.MyDocStyle.Name);
|
||||
@@ -174,10 +176,17 @@ namespace Volian.Print.Library
|
||||
if (ds.Index == indx)
|
||||
{
|
||||
MySection.MyDocStyle = ds;
|
||||
forceLoadSvg = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return forceLoadSvg;
|
||||
}
|
||||
public void ResetSvg()
|
||||
{
|
||||
Volian.Svg.Library.Svg sectSvg = BuildSvg(_MySection, true);
|
||||
if (sectSvg != null) MySvg = sectSvg;
|
||||
}
|
||||
private void DrawRuler(PdfContentByte cb)
|
||||
{
|
||||
@@ -345,8 +354,10 @@ namespace Volian.Print.Library
|
||||
{
|
||||
_MySection = value;
|
||||
MySectionTitle = ((_MySection.DisplayNumber ?? "")=="" ? "" : _MySection.DisplayNumber + " - ") + _MySection.DisplayText;
|
||||
if (DidFirstPageDocStyle) ResetDocStyleAndValues();
|
||||
Volian.Svg.Library.Svg sectSvg = BuildSvg(_MySection);
|
||||
bool forceLoadSvg = false;
|
||||
if (DidFirstPageDocStyle)
|
||||
forceLoadSvg = ResetDocStyleAndValues(); // this method also gets the SVG (the 'else' part of this)
|
||||
Volian.Svg.Library.Svg sectSvg = BuildSvg(_MySection, forceLoadSvg);
|
||||
if (sectSvg != null) MySvg = sectSvg;
|
||||
}
|
||||
}
|
||||
@@ -502,7 +513,7 @@ namespace Volian.Print.Library
|
||||
MySection = mySection;
|
||||
MyPromsPrinter = myPromsPrinter;
|
||||
}
|
||||
private Volian.Svg.Library.Svg BuildSvg(VEPROMS.CSLA.Library.SectionInfo mySection)
|
||||
private Volian.Svg.Library.Svg BuildSvg(VEPROMS.CSLA.Library.SectionInfo mySection, bool forceLoad)
|
||||
{
|
||||
// if mysection uses continuous pagination, and the previous section uses the same format,
|
||||
// and the docstyle is set to use on first page only,
|
||||
@@ -529,7 +540,7 @@ namespace Volian.Print.Library
|
||||
mySvg.LeftMargin = (float)docStyle.Layout.LeftMargin;
|
||||
mySvg.TopMargin = 9.6F;
|
||||
VEPROMS.CSLA.Library.PageStyle pageStyle = docStyle.pagestyle;
|
||||
AddPageListItems(mySvg, pageStyle, mySection);
|
||||
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
|
||||
// it, we'll use the previous section. The only thing we need to do is to process through the
|
||||
@@ -542,6 +553,7 @@ namespace Volian.Print.Library
|
||||
sPag = sc.Section_Pagination;
|
||||
}
|
||||
//if (sPag == SectionConfig.SectionPagination.Continuous && !mySection.DidFirstPageDocStyle) return null;
|
||||
if (forceLoad) return mySvg;
|
||||
if (sPag == SectionConfig.SectionPagination.Continuous) return null;
|
||||
return mySvg;
|
||||
}
|
||||
@@ -716,7 +728,7 @@ namespace Volian.Print.Library
|
||||
public SvgText PageListCheckOffHeader = null;
|
||||
|
||||
public Dictionary<string, bool> PgLogicals;
|
||||
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, bool forceLoad)
|
||||
{
|
||||
//Console.WriteLine("{0}", section.ActiveFormat.Name);
|
||||
//Console.WriteLine("{0} pgstyle {1} section", pageStyle.Name,section.DisplayText);
|
||||
@@ -745,7 +757,7 @@ namespace Volian.Print.Library
|
||||
// Console.WriteLine("{0} - PageList Token", pageItem.Token);
|
||||
|
||||
VE_Font useFontForCheckOffHeader = null;
|
||||
if (sPag == SectionConfig.SectionPagination.Separate || ((sPag == SectionConfig.SectionPagination.Continuous || sPag ==0 )&& (pageItem.Row < 0)))
|
||||
if (forceLoad || (sPag == SectionConfig.SectionPagination.Separate || ((sPag == SectionConfig.SectionPagination.Continuous || sPag ==0 )&& (pageItem.Row < 0))))
|
||||
{
|
||||
//if (PrevRow > 0)
|
||||
//{
|
||||
|
Reference in New Issue
Block a user