This commit is contained in:
Kathy Ruffing 2012-03-30 10:59:25 +00:00
parent 4e668096d3
commit c8f33476ea

View File

@ -137,6 +137,8 @@ namespace Volian.Print.Library
float yLocation = CalculateYOffset(yPageStart, yTopMargin);
if (MyItemInfo.HasChangeBar && MyPageHelper.ChangeBarDefinition.MyChangeBarType != PrintChangeBar.Without) MyPageHelper.AddChangeBar(DoChangeBar(cb, MyItemInfo, MyPageHelper, XOffset, yLocation, MyPageHelper.MaxRNO, MyItemInfo.ActiveFormat), cbMess);
float retval = yLocation;
if (MyItemInfo.FormatStepData != null && MyItemInfo.FormatStepData.StepPrintData != null) XOffset += (float)(MyItemInfo.FormatStepData.StepPrintData.PosAdjust??0);
if (MyItemInfo.IsFigure)
{
yLocation -= (SixLinesPerInch * MyPageHelper.YMultiplier);
@ -325,6 +327,7 @@ namespace Volian.Print.Library
DebugText.WriteLine("ToPdf1:{0},'{1}',{2},{3},{4}", MyItemInfo.ItemID, MyItemInfo.ShortSearchPath, yLocation, yPageStart, YTopMost);
int paginate = Paginate(yLocation, yTopMargin, yBottomMargin);
bool firstHighLevelStep = MyItemInfo.IsHigh && (MyItemInfo.MyPrevious == null);
switch (paginate)
{
case 0:
@ -346,6 +349,7 @@ namespace Volian.Print.Library
if ((MyItemInfo.ActiveSection.MyDocStyle.StructureStyle.Style ?? 0 & E_DocStructStyle.UseSectionFoldout) != 0)
PromsPrinter.DoFoldoutPage(cb, "HLS", MyPageHelper.TextLayer, MyPageHelper);
yPageStart = yTopMargin + YTopMost;
MyPageHelper.YMultiplier = 1;
break;
@ -423,6 +427,13 @@ namespace Volian.Print.Library
}
yPageStart = ChildrenAbove.ToPdf(cb, yPageStart, yTopMargin, yBottomMargin);
yPageStart = ChildrenLeft.ToPdf(cb, yPageStart, yTopMargin, yBottomMargin);
// If this is a high level step, the format may have specified that the step should be printed with
// extra space between it and the previous step. The 16bit code uses the value of the extra space
// from the high level step format regardless of what type of high level step it is. Also, if there
// is caution or note above it, this space is not added:
yPageStart -= ((!MyItemInfo.IsHigh || ChildrenAbove == null) ? 0 : MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList[2].StepLayoutData.STExtraSpace ?? 0);
yPageStart = ParagraphToPdf(cb, yPageStart, yTopMargin, yBottomMargin);
yPageStart = ChildrenRight.ToPdf(cb, yPageStart, yTopMargin, yBottomMargin);
yPageStart = ChildrenBelow.ToPdf(cb, yPageStart, yTopMargin, yBottomMargin);
@ -884,7 +895,6 @@ namespace Volian.Print.Library
//List<int> lProblemIDs = new List<int>(problemIDs);
//if (lProblemIDs.Contains(itemInfo.ItemID))
// Console.WriteLine("Found Item {0}", itemInfo.ItemID);formatInfochecko
MyParent = parent;
// The following code determines the last paragraph for an RNO
// MyTopRNO finds the Top paragraph for an RNO
@ -900,8 +910,8 @@ namespace Volian.Print.Library
MyPageHelper.MyParagraphs.Add(itemInfo.ItemID, this);
MyItemInfo = itemInfo;
XOffset = xoff;
int extra = (MyItemInfo.FormatStepData == null) ? 0 : MyItemInfo.FormatStepData.StepLayoutData.STExtraSpace ?? 0;
yoff += extra;
// Set any position adjustment (defined in the format on a per type basis)
yoff += (MyItemInfo.FormatStepData == null) ? 0 : MyItemInfo.FormatStepData.StepLayoutData.STExtraSpace ?? 0;
YTopMost = YOffset = yoff;
vlnTab mytab = null;
bool doSectTab = false;
@ -952,8 +962,7 @@ namespace Volian.Print.Library
}
if (!itemInfo.IsSection || doSectTab)
{
mytab = new vlnTab(cb, this, itemInfo.MyTab.Text, itemInfo.MyTab.CleanText, localXOffset, yoff, itemInfo.MyTab.MyFont, doSectTab, StepRTB.MySymbolFontName);
mytab = new vlnTab(cb, this, itemInfo.MyTab.Text, itemInfo.MyTab.CleanText, localXOffset, yoff, itemInfo.MyTab.MyFont, doSectTab, StepRTB.MySymbolFontName, itemInfo.MyTab.RemovedStyleUnderline);
PartsLeft.Add(mytab);
if (mytab.MyMacro != null) PartsLeft.Add(mytab.MyMacro);
}
@ -1172,9 +1181,6 @@ namespace Volian.Print.Library
else // AER or RNO
XOffset = MyParent.XOffset + MyParent.Width / 2 - Width / 2;
// Set any position adjustment (defined in the format on a per type basis)
XOffset += (float)(MyItemInfo.FormatStepData.StepPrintData.PosAdjust ?? 0);
// if the XOffset < High Level Step Text's XOffset, then align with the High Level Step Text
if (XOffset < xLowerLimit)
XOffset = xLowerLimit;
@ -1629,7 +1635,11 @@ namespace Volian.Print.Library
else
{
XOffset += xoff;
if (myTab != null) myTab.XOffset += xoff;
if (myTab != null)
{
myTab.XOffset += xoff;
if (myTab.MyMacro != null) myTab.MyMacro.XOffset += xoff;
}
}
}
else if (itemInfo.IsRNOPart && !((ItemInfo)itemInfo.ActiveParent).IsHigh)