Deviation Document 3 Column Format (Dev_Format) support.

B2012-265
This commit is contained in:
Rich 2012-10-25 00:43:40 +00:00
parent 6e65ec7cd0
commit f81483df52

View File

@ -951,11 +951,19 @@ namespace Volian.Print.Library
AdjustXOffsetForTab(itemInfo, maxRNO, formatInfo, mytab, xMetaAdj); AdjustXOffsetForTab(itemInfo, maxRNO, formatInfo, mytab, xMetaAdj);
if (itemInfo.MyHeader != null && itemInfo.MyHeader.Text != null && !doSectTab) if (itemInfo.MyHeader != null && itemInfo.MyHeader.Text != null && !doSectTab)
yoff += SetHeader(this, cb, itemInfo, formatInfo); yoff += SetHeader(this, cb, itemInfo, formatInfo);
float yoffLeft = yoff;
if (itemInfo.Cautions != null && !(itemInfo.IsCaution || itemInfo.IsNote)) 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)) 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 // 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 // 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. // space above will be done regardless of where page breaks fall.
@ -1164,6 +1172,7 @@ namespace Volian.Print.Library
else // AER or RNO Table else // AER or RNO Table
yoff = ChildrenBelow.Add(cb, itemInfo.Tables, XOffset, yoff + yoffadj, yOffRight + yoffadj, rnoLevel, maxRNO, formatInfo); 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 // Look for the meta section case where the 'Editable' flag is set to 'N', which means that
// these steps should not be printed: // these steps should not be printed:
@ -1896,7 +1905,7 @@ namespace Volian.Print.Library
else if (itemInfo.IsRNOPart && (colOvrd > 0 || !((ItemInfo)itemInfo.ActiveParent).IsHigh)) else if (itemInfo.IsRNOPart && (colOvrd > 0 || !((ItemInfo)itemInfo.ActiveParent).IsHigh))
{ {
if (colOvrd > 0) if (colOvrd > 0)
{ {
XOffset = (int)colOvrd; XOffset = (int)colOvrd;
if (!((ItemInfo)itemInfo.MyParent).IsHigh) 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 // the tab. The offset of text needs to be adjusted by the 'leftjustify' format variable
// if it existed for this level. // if it existed for this level.
myTab.XOffset += tabWidth; myTab.XOffset += tabWidth;
if (tableftadj != 0 && myTab.Width < tableftadj) if (tableftadj != 0 && myTab.Width<tableftadj)
tabWidth = myTab.Width = tableftadj; tabWidth = myTab.Width = tableftadj;
XOffset += tabWidth; XOffset += tabWidth;
myTab.Rtf = myTab.Rtf.Replace(myTab.Text, myTab.Text.TrimStart(" ".ToCharArray())); myTab.Rtf = myTab.Rtf.Replace(myTab.Text, myTab.Text.TrimStart(" ".ToCharArray()));
@ -2025,7 +2034,10 @@ namespace Volian.Print.Library
else if (itemInfo.IsCaution || itemInfo.IsNote) else if (itemInfo.IsCaution || itemInfo.IsNote)
{ {
float mycolT = (float)formatInfo.MyStepSectionLayoutData.ColT; float mycolT = (float)formatInfo.MyStepSectionLayoutData.ColT;
Width = (float)formatInfo.MyStepSectionLayoutData.WidT - 6 - mycolT; if(formatInfo.MyStepSectionLayoutData.Dev_Format)
Width = (float)formatInfo.MyStepSectionLayoutData.WidT;
else
Width = (float)formatInfo.MyStepSectionLayoutData.WidT - 6 - mycolT;
XOffset += mycolT; // adjust caution/note text position XOffset += mycolT; // adjust caution/note text position
if (PartsLeft != null)// adjust tab position if (PartsLeft != null)// adjust tab position
foreach(vlnPrintObject vpo in PartsLeft) foreach(vlnPrintObject vpo in PartsLeft)