From b52a05af128dc4cee461217b8a989584be2bef77 Mon Sep 17 00:00:00 2001 From: Kathy Date: Tue, 19 Aug 2014 12:40:18 +0000 Subject: [PATCH] Allow for continuous change bars with message at top, when flag is changeid --- PROMS/Volian.Print.Library/VlnSvgPageHelper.cs | 3 ++- PROMS/Volian.Print.Library/vlnChangeBar.cs | 8 ++++++-- PROMS/Volian.Print.Library/vlnParagraph.cs | 4 +++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs b/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs index 1a41cf31..0addb478 100644 --- a/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs +++ b/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs @@ -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)) { diff --git a/PROMS/Volian.Print.Library/vlnChangeBar.cs b/PROMS/Volian.Print.Library/vlnChangeBar.cs index 1cbb07e6..79a94f17 100644 --- a/PROMS/Volian.Print.Library/vlnChangeBar.cs +++ b/PROMS/Volian.Print.Library/vlnChangeBar.cs @@ -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(); // 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; } } diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index 0861bd0f..bae5fc4f 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -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)