Allow for continuous change bars with message at top, when flag is changeid

This commit is contained in:
Kathy Ruffing 2014-08-19 12:40:18 +00:00
parent 3d2757f094
commit b52a05af12
3 changed files with 11 additions and 4 deletions

View File

@ -709,7 +709,8 @@ namespace Volian.Print.Library
// continuous case, if changes bars overlap, adjust size and don't add new one to
// the MyChangeBars list.
if (MySection.ActiveFormat.PlantFormat.FormatData.ProcData.ChangeBarData.ContinuousChangeBars)
if (MySection.ActiveFormat.PlantFormat.FormatData.ProcData.ChangeBarData.ContinuousChangeBars ||
MySection.ActiveFormat.PlantFormat.FormatData.ProcData.ChangeBarData.ChangeIds)
{
if (OverlapOrSpan(cb, vcb))
{

View File

@ -85,7 +85,8 @@ namespace Volian.Print.Library
get {return YChangeBarBottom - YExtendLine; }
}
private bool _IsRev;
public vlnChangeBar(PdfContentByte cb, vlnParagraph parent, float xoff, float yoff, int msgAlignment, bool isRev)
private bool _MsgAtTop; // flags that message should be drawn at top of change bar
public vlnChangeBar(PdfContentByte cb, vlnParagraph parent, float xoff, float yoff, int msgAlignment, bool isRev, bool msgAtTop)
{
// for grids, a y adjustment is made to match 16bit output, see the variable 'GridTopAdjust'. Take this
// adjustment into account for the change bar. 6.5 positioned the change bar to match 16bit output.
@ -95,6 +96,7 @@ namespace Volian.Print.Library
YOffset = yoff;
MyParent = parent;
_IsRev = isRev;
_MsgAtTop = msgAtTop;
Messages = new SortedDictionary<float, vlnChangeBarMessage>();
// if there is an RNO separator, add the separator's height in too.
Height = parent.Height * MyPageHelper.YMultiplier + (parent.MyItemInfo.IsFigure?SixLinesPerInch:0);
@ -185,7 +187,9 @@ namespace Volian.Print.Library
float w = GetTableWidth(cb, myparagraph, MyParent.MyItemInfo.MyDocStyle.Layout.PageWidth);
float h = GetParagraphHeight(cb, myparagraph, w);
cb.SetColorFill(changeBarColor);
Rtf2Pdf.TextAt(cb, myparagraph, XOffset + xAdj - Rtf2Pdf.Offset.X + 3, yBottom + h - Rtf2Pdf.Offset.Y + 2.7F, w, h, "", yBottomMargin);
float yloc = yBottom + h - Rtf2Pdf.Offset.Y + 2.7F;
if (_MsgAtTop) yloc = YOffset;
Rtf2Pdf.TextAt(cb, myparagraph, XOffset + xAdj - Rtf2Pdf.Offset.X + 3, yloc, w, h, "", yBottomMargin);
lastMsg = vcbm.Message;
}
}

View File

@ -2961,7 +2961,9 @@ namespace Volian.Print.Library
!itemInfo.IsInRNO)) msgAlign = Element.ALIGN_RIGHT;
float coltotwips = col * itemInfo.FormatStepData.Font.CharsToTwips;
if (itemInfo.IsFigure) coltotwips = col * itemInfo.ActiveFormat.PlantFormat.FormatData.Font.CharsToTwips;
return new vlnChangeBar(cb, this, (float)itemInfo.MyDocStyle.Layout.LeftMargin + coltotwips, yoff, msgAlign, myPageHelper.ChangeBarDefinition.MyChangeBarText == PrintChangeBarText.RevNum);
return new vlnChangeBar(cb, this, (float)itemInfo.MyDocStyle.Layout.LeftMargin + coltotwips, yoff, msgAlign,
myPageHelper.ChangeBarDefinition.MyChangeBarText == PrintChangeBarText.RevNum,
itemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.ChangeBarData.ChangeIds);
}
private int ChangeBarLocation(float c, vlnParagraph paragraph, FormatInfo formatInfo, int maxRNO)