missing box

docstyle messages: {par} consistent with code
docstyle messages: {par} consistent with code & missing box
Handle par in endmessage
Allow for more end message text length
Handle asterisk hls draws when steps are compressed
For RNO separator, if aer column is further down on page than rno, print rno separator off of aer (was causing separator to print beyond margin)
This commit is contained in:
Kathy Ruffing 2015-03-16 13:54:18 +00:00
parent 06e71b1522
commit 086e73720c
15 changed files with 41 additions and 12 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -771,7 +771,7 @@ namespace VEPROMS.CSLA.Library
{
get
{
return Message == null ? null : Message.Replace("\n","\r\n");
return Message == null ? null : Message.Replace("\n","\r\n").Replace(@"{par}","\r\n");
}
}
private LazyLoad<float?> _Margin;

View File

@ -779,7 +779,7 @@ namespace Volian.Print.Library
System.Drawing.Drawing2D.Matrix myMatrix = new System.Drawing.Drawing2D.Matrix(0, 1, -1, 0, cb.PdfDocument.PageSize.Height, 0);
cb.Transform(myMatrix);
}
Rtf2Pdf.TextAt(cb, para, centerpos, ylocation + 6, 100, 12, "", yBottomMargin);
Rtf2Pdf.TextAt(cb, para, centerpos, ylocation + 6, 200, 12, "", yBottomMargin);
if (landscape) cb.RestoreState();
}
}

View File

@ -415,9 +415,12 @@ namespace Volian.Print.Library
// this box is not drawn, it is a series of asterisks drawn above and below text.
top = CalculateYOffset(yPageStart, yTopMargin);
if (MyPageHelper.YMultiplier != 1) top += 2;
bottom = (yPageStart - (MyParent.YBottomForBox > 0 ? MyParent.YBottomForBox : MyParent.YBottomMost)) * MyPageHelper.YMultiplier;
//_MyLog.WarnFormat("\"ATB\"\t\"{0}\"\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}\t{7}", MyParent, yPageStart, top, bottom, MyPageHelper.YMultiplier, MyPageHelper.CurrentPageNumber, MyParent.YBottomMost, MyParent.YBottomForBox);
float ytmpbottom1 = yPageStart - (MyParent.YBottomForBox > 0 ? MyParent.YBottomForBox : MyParent.YBottomMost);
if (MyPageHelper.YMultiplier != 1)
{
ytmpbottom1 = (-1 + yTopMargin - (yTopMargin - ytmpbottom1) * MyPageHelper.YMultiplier) + 2;
}
bottom = ytmpbottom1;
// create a new font without any styles such as underline.
E_Style es = ((vef.Style & E_Style.Bold) == E_Style.Bold) ? E_Style.Bold : E_Style.None;
// if the box has a font, use it - otherwise use this item info's font
@ -485,30 +488,44 @@ namespace Volian.Print.Library
{
// set the top & bottom of sides. If there is a page break in the middle of box, adjust these.
// The vlnBox property, ContainsPageBreak, flags that a break occurred.
float yOffBreak = 0;
if (!ContainsPageBreak)
{
top = CalculateYOffset(yPageStart, yTopMargin);
if (MyPageHelper.YMultiplier != 1) top += 2;
// if this broke, the bottom is defined where the parabreak occurred.
float yOffBreak = MyPageHelper.ParaBreaks.Count > 0 ? MyPageHelper.ParaBreaks[0].YOffset : 0;
yOffBreak = MyPageHelper.ParaBreaks.Count > 0 ? MyPageHelper.ParaBreaks[0].YOffset : 0;
if (yOffBreak > 0)
bottom = (yPageStart - yOffBreak) * MyPageHelper.YMultiplier;
else
bottom = (yPageStart - (MyParent.YBottomForBox > 0 ? MyParent.YBottomForBox : MyParent.YBottomMost)) * MyPageHelper.YMultiplier;
{
float ytmpbottom = yPageStart - (MyParent.YBottomForBox > 0 ? MyParent.YBottomForBox : MyParent.YBottomMost);
if (MyPageHelper.YMultiplier != 1)
{
ytmpbottom = -1 + yTopMargin - (yTopMargin - ytmpbottom) * MyPageHelper.YMultiplier;
}
bottom = ytmpbottom;
}
}
else
{
top = CalculateYOffset(yPageStart, yTopMargin);
float yOffBreak = MyPageHelper.ParaBreaks.Count > 0 ? MyPageHelper.ParaBreaks[0].YOffset : 0;
yOffBreak = MyPageHelper.ParaBreaks.Count > 0 ? MyPageHelper.ParaBreaks[0].YOffset : 0;
if (yOffBreak > 0)
bottom = (yPageStart - yOffBreak) * MyPageHelper.YMultiplier;
else
bottom = (yPageStart - (MyParent.YBottomForBox > 0 ? MyParent.YBottomForBox : MyParent.YBottomMost)) * MyPageHelper.YMultiplier;
{
float ytmpbottom1 = yPageStart - (MyParent.YBottomForBox > 0 ? MyParent.YBottomForBox : MyParent.YBottomMost);
if (MyPageHelper.YMultiplier != 1)
{
ytmpbottom1 = -1 + yTopMargin - (yTopMargin - ytmpbottom1) * MyPageHelper.YMultiplier;
}
bottom = ytmpbottom1;
}
top = yTopMargin; // reset top to top margin since there was a page break.
}
// Check that the bottom is within the bottom margin, if this step spans more than one page,
// stop the side asterisks at the bottom margin. (pagination puts inserts a page break here)
//_MyLog.WarnFormat("\"AS\"\t\"{0}\"\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}\t{7}", MyParent, yPageStart, top, bottom, MyPageHelper.YMultiplier, MyPageHelper.CurrentPageNumber, MyParent.YBottomMost, MyParent.YBottomForBox);
if (bottom < yBottomMargin) bottom = yBottomMargin;
float height = (SixLinesPerInch * MyPageHelper.YMultiplier) + 4; // just add a little on so that height is a little bigger than character

View File

@ -328,6 +328,7 @@ namespace Volian.Print.Library
// increment the y offset if not doing the ComponentTableFormat
else if (!para.UseTemplateKeepOnCurLine(childItemInfo))
yoff = para.YBottomMost;
// para.YBottomMost += para.YBottomMostAdjust; // KBR for IP3 pagination: don't adjust YBottomost until after yoff is set.
if (box != null && childItemInfo.FormatStepData != null && childItemInfo.FormatStepData.BoxIt)
{
box.Height = yoff - box.YOffset - (1.1F * vlnPrintObject.SixLinesPerInch);
@ -3305,12 +3306,17 @@ namespace Volian.Print.Library
MyItemInfo.MyHLS.RNOs != null && MyItemInfo.MyHLS.RNOs.Count > 0) ? 2 * SixLinesPerInch : 0;
vlnRNOSeparator myRnoSep = new vlnRNOSeparator(this, cb, tmpRnoSepStr, xsep, yoff+yadjSep, formatInfo, bottomChild == null ? true : bottomChild.MyItemInfo.HasChangeBar);
// TODO: May need to handle more than one RNO column for RNO Separator
if (rno.LastRNO.MyItemInfo.HasChangeBar == false && bottomChild != null && bottomChild.MyItemInfo.HasChangeBar)
if ((rno.LastRNO.MyItemInfo.HasChangeBar == false && bottomChild != null && bottomChild.MyItemInfo.HasChangeBar)
|| (bottomChild != null && bottomChild.YBottom > rno.LastRNO.YBottomMost))
bottomChild.PartsBelow.Add(myRnoSep);
else
rno.LastRNO.PartsBelow.Add(myRnoSep);
MyHighLevelParagraph.YBottomForBox = 0;
if (yadjSep>0) MyHighLevelParagraph.YBottomForBox = yoff; // if hlrno, box before sep
if (yadjSep > 0)
{
MyHighLevelParagraph.YBottomForBox = yoff; // if hlrno, box before sep
//YBottomMostAdjust = SixLinesPerInch; // KBR for IP3 pagination
}
yoff += (myRnoSep.Height + SixLinesPerInch);
}
YBottomMost = yoff;
@ -4025,6 +4031,12 @@ namespace Volian.Print.Library
get { return _YBottomMost; }
set { _YBottomMost = value; }
}
//protected float _YBottomMostAdjust = 0; // KBR for IP3 pagination
//public float YBottomMostAdjust
//{
// get { return _YBottomMostAdjust; }
// set { _YBottomMostAdjust = value; }
//}
protected float _YTopMost; // Top of the paragraph including the children
public float YTopMost
{