Point Beach backgrounds: Added support for continue message; don’t add posadjust to children of same type; add support for LimitWidToPageWid

Added support for ProcDescr2 pagelist item & support for ProcDescr1 = {null} (inheritance was causing it to print when it shouldn’t have)
This commit is contained in:
2014-03-18 12:13:54 +00:00
parent 97c4d4d941
commit fdeb055bde
2 changed files with 53 additions and 2 deletions

View File

@@ -290,6 +290,7 @@ namespace Volian.Print.Library
get { return _PageBreakOnStep; }
set { _PageBreakOnStep = value; }
}
private float WidthNoLimit = 0;
private vlnTable _MyGrid;
public vlnTable MyGrid
{
@@ -1007,6 +1008,8 @@ namespace Volian.Print.Library
if (myMsg != null && myMsg != "")
{
yPageStart -= 2 * SixLinesPerInch;// Allow two lines for top continue message
if (myMsg.IndexOf(@"%3d") > -1)
myMsg = myMsg.Replace(@"%3d", MyItemInfo.MyHLS.Ordinal.ToString());
if (myMsg.IndexOf(@"%d") > -1)
myMsg = myMsg.Replace(@"%d", MyItemInfo.MyHLS.MyTab.CleanTextNoSymbols.Trim(" .".ToCharArray()));
if (myMsg.IndexOf(@"%c") > -1)
@@ -1184,6 +1187,8 @@ namespace Volian.Print.Library
myMsg = myMsg.Replace(@"%0d", tb.Trim(" .".ToCharArray()));
if (myMsg.IndexOf(@"%2d") > -1)
myMsg = myMsg.Replace(@"%2d", tb.Trim(" .".ToCharArray()).PadLeft(2));
if (myMsg.IndexOf(@"%3d") > -1)
myMsg = myMsg.Replace(@"%3d", MyItemInfo.MyHLS.Ordinal.ToString());
return myMsg;
}
private vlnParagraph TopMostChild
@@ -1855,8 +1860,20 @@ namespace Volian.Print.Library
CalculateXOffsetGridOrFigure(itemInfo, maxRNO, formatInfo);
}
else
if (itemInfo.FormatStepData != null && itemInfo.FormatStepData.StepPrintData != null) XOffset += (float)(itemInfo.FormatStepData.StepPrintData.PosAdjust ?? 0);
if (itemInfo.FormatStepData != null && itemInfo.FormatStepData.StepPrintData != null && (itemInfo.IsHigh || (!itemInfo.IsHigh && itemInfo.MyContent.Type != itemInfo.MyParent.MyContent.Type))) XOffset += (float)(itemInfo.FormatStepData.StepPrintData.PosAdjust ?? 0);
// point beach wpb subformats 20 & 22 were printing some text past right margin. Limit the width to the right margin, i.e. pagewid
if (itemInfo.ActiveFormat.MyStepSectionPrintData.LimitWidToPageWid)
{
float lim = (MyTab == null ? (XOffset - (float)itemInfo.MyDocStyle.Layout.LeftMargin) : MyTab.XOffset + MyTab.Width) + Width;
float docStyleLim = (float)itemInfo.MyDocStyle.Layout.PageWidth - (float)itemInfo.MyDocStyle.Layout.LeftMargin;
if (lim > docStyleLim)
{
WidthNoLimit = Width; // Use this width to calculate childrens' width, without this, code was making children to narrow!
Width = docStyleLim - (MyTab == null ? (XOffset - (float)itemInfo.MyDocStyle.Layout.LeftMargin) : MyTab.XOffset + MyTab.Width);
}
}
if (itemInfo.IsSection && ShowSectionTitles
&& !MyItemInfo.MyDocStyle.CancelSectTitle)
{
@@ -3210,6 +3227,8 @@ namespace Volian.Print.Library
Width = adjwidth + MyParent.Width;
else if (itemInfo.MyTab.Position != 0)
Width = adjwidth + MyParent.Width;
else if (MyParent.WidthNoLimit != 0)
Width = adjwidth + MyParent.WidthNoLimit - tabWidth + (myTab == null ? 0 : myTab.TabAlign);
else
Width = adjwidth + MyParent.Width - tabWidth + (myTab == null ? 0 : myTab.TabAlign);
}