From f81483df528191e2ab0c0fae7b7d10b724e62181 Mon Sep 17 00:00:00 2001 From: Rich Date: Thu, 25 Oct 2012 00:43:40 +0000 Subject: [PATCH] Deviation Document 3 Column Format (Dev_Format) support. B2012-265 --- PROMS/Volian.Print.Library/vlnParagraph.cs | 24 ++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index 999c2070..a47b6ff2 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -951,11 +951,19 @@ namespace Volian.Print.Library AdjustXOffsetForTab(itemInfo, maxRNO, formatInfo, mytab, xMetaAdj); if (itemInfo.MyHeader != null && itemInfo.MyHeader.Text != null && !doSectTab) yoff += SetHeader(this, cb, itemInfo, formatInfo); + float yoffLeft = yoff; if (itemInfo.Cautions != null && !(itemInfo.IsCaution || itemInfo.IsNote)) - yoff = ChildrenAbove.Add(cb, itemInfo.Cautions, xoff, yoff, yoff, rnoLevel, maxRNO, formatInfo); + { + if(itemInfo.ActiveFormat.MyStepSectionLayoutData.Dev_Format) + yoffLeft = ChildrenLeft.Add(cb, itemInfo.Cautions, xoff, yoff, yoff, rnoLevel, maxRNO, formatInfo); + else + yoff = ChildrenAbove.Add(cb, itemInfo.Cautions, xoff, yoff, yoff, rnoLevel, maxRNO, formatInfo); + } if (itemInfo.Notes != null && !(itemInfo.IsCaution || itemInfo.IsNote)) - yoff = ChildrenAbove.Add(cb, itemInfo.Notes, xoff, yoff, yoff, rnoLevel, maxRNO, formatInfo); - + if(itemInfo.ActiveFormat.MyStepSectionLayoutData.Dev_Format) + yoffLeft = ChildrenLeft.Add(cb, itemInfo.Notes, xoff + 6 + (float)(itemInfo.ActiveFormat.MyStepSectionLayoutData.WidT), yoff, yoff, rnoLevel, maxRNO, formatInfo); + else + yoff = ChildrenAbove.Add(cb, itemInfo.Notes, xoff, yoff, yoff, rnoLevel, maxRNO, formatInfo); // If the format has that extra space should be put out before the step, then // handle this by using the 'PartsAbove' structure. By using the parts above, the extra // space above will be done regardless of where page breaks fall. @@ -1164,6 +1172,7 @@ namespace Volian.Print.Library else // AER or RNO Table yoff = ChildrenBelow.Add(cb, itemInfo.Tables, XOffset, yoff + yoffadj, yOffRight + yoffadj, rnoLevel, maxRNO, formatInfo); } + yOffRight = Math.Max(yOffRight, yoffLeft); // Look for the meta section case where the 'Editable' flag is set to 'N', which means that // these steps should not be printed: @@ -1896,7 +1905,7 @@ namespace Volian.Print.Library else if (itemInfo.IsRNOPart && (colOvrd > 0 || !((ItemInfo)itemInfo.ActiveParent).IsHigh)) { if (colOvrd > 0) - { + { XOffset = (int)colOvrd; if (!((ItemInfo)itemInfo.MyParent).IsHigh) { @@ -1915,7 +1924,7 @@ namespace Volian.Print.Library // the tab. The offset of text needs to be adjusted by the 'leftjustify' format variable // if it existed for this level. myTab.XOffset += tabWidth; - if (tableftadj != 0 && myTab.Width < tableftadj) + if (tableftadj != 0 && myTab.Width