Temporary Fix for Summary Of Changes Report generation

Temporary Fix for Change Bars on Cautions and Notes
This commit is contained in:
John Jenko 2012-02-14 15:50:20 +00:00
parent c2d645ab91
commit 50917e39f3
2 changed files with 20 additions and 2 deletions

View File

@ -1360,6 +1360,8 @@ namespace Volian.Print.Library
//see if any annotations for old stepnum here and add them
foreach (AnnotationAuditInfo aai in annotationList)
{
if (processedAAI.ContainsKey(aai)) // JSJ - Temporary fix???
continue; // - had idential annotation info on two different step items, skip second instance
if (oldCAI != null && aai.IContentID == oldCAI.ContentID)
{
//add annotation to minilist

View File

@ -1245,9 +1245,24 @@ namespace Volian.Print.Library
int fixedChgCol = formatInfo.PlantFormat.FormatData.ProcData.ChangeBarData.FixedChangeColumn ?? 0;
float cols = formatInfo.MyStepSectionLayoutData.ColS ?? 0;
int colr = ToInt(formatInfo.MyStepSectionLayoutData.ColRTable, maxRNO);
float tmpc = c;
if (MyItemInfo.IsCaution || MyItemInfo.IsNote)
{
// Temporary fix for change bars on Notes and Cautions where the FixedChgCol < -10
tmpc = (float)formatInfo.MyStepSectionLayoutData.ColT + (float)formatInfo.MyStepSectionLayoutData.WidT; // end position of Caution / Note
int typ = (int)(MyItemInfo.MyContent.Type % 10000);
int? bxIndx = formatInfo.PlantFormat.FormatData.StepDataList[typ].StepLayoutData.STBoxindex;
if (bxIndx != null)
{
Box bx = formatInfo.PlantFormat.FormatData.BoxList[(int)bxIndx];
if (bx != null)
tmpc = (float)bx.Start + (float)bx.End; // end position of a boxed Caution / Note
}
}
// if this is a caution or note, put the change bar to the right of the text:
//if ((paragraph.MyItemInfo.IsCaution || paragraph.MyItemInfo.IsNote) && fixedChgCol < -10) return -fixedChgCol;
if ((fixedChgCol==0))// && paragraph.MyItemInfo.IsCaution || paragraph.MyItemInfo.IsNote)
if ((fixedChgCol == 0))// && paragraph.MyItemInfo.IsCaution || paragraph.MyItemInfo.IsNote)
//if ((fixedChgCol==0) || paragraph.MyItemInfo.IsCaution || paragraph.MyItemInfo.IsNote)
{
float rightEdge = (paragraph.XOffset + paragraph.Width + 5);
rightEdge-=(float)paragraph.MyItemInfo.MyDocStyle.Layout.LeftMargin;
@ -1257,7 +1272,8 @@ namespace Volian.Print.Library
if (fixedChgCol < -10 || fixedChgCol >= 0)
return ((fixedChgCol > 0) ? fixedChgCol :
(fixedChgCol == 0) ? (int)c + 1 :
(c > cols + colr + COL_WID_ADJ) ? -fixedChgCol :
(tmpc > (cols + colr + COL_WID_ADJ)) ? -fixedChgCol :
//(c > (cols + colr + COL_WID_ADJ) || (MyItemInfo.IsCaution || MyItemInfo.IsNote)) ? -fixedChgCol :
AERLeftChangeBarLocation(formatInfo));
else
return (int)(fixedChgCol + (((c < cols + Width + colr) || TableTest()