From b57aecc0609550b16ba67e0795a8c2a47dcccff7 Mon Sep 17 00:00:00 2001 From: Kathy Date: Fri, 14 Oct 2011 10:36:05 +0000 Subject: [PATCH] --- PROMS/Volian.Print.Library/vlnParagraph.cs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index 7ba13030..ba9ae4af 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -387,15 +387,9 @@ namespace Volian.Print.Library } yPageStart = ChildrenAbove.ToPdf(cb, yPageStart, yTopMargin, yBottomMargin); yPageStart = ChildrenLeft.ToPdf(cb, yPageStart, yTopMargin, yBottomMargin); - DebugText.WriteLine("Left:{0},{1},{2},{3},{4}", MyItemInfo.ItemID, yLocalypagestart, yPageStart, yTopMargin, yBottomMargin); yPageStart = ParagraphToPdf(cb, yPageStart, yTopMargin, yBottomMargin); - DebugText.WriteLine("Self:{0},{1},{2},{3},{4}", MyItemInfo.ItemID, yLocalypagestart, yPageStart, yTopMargin, yBottomMargin); - yPageStart = ChildrenRight.ToPdf(cb, yPageStart, yTopMargin, yBottomMargin); - DebugText.WriteLine("Right:{0},{1},{2},{3},{4}", MyItemInfo.ItemID, yLocalypagestart, yPageStart, yTopMargin, yBottomMargin); - yPageStart = ChildrenBelow.ToPdf(cb, yPageStart, yTopMargin, yBottomMargin); - DebugText.WriteLine("Below:{0},{1},{2},{3},{4}", MyItemInfo.ItemID, yLocalypagestart, yPageStart, yTopMargin, yBottomMargin); if (MyItemInfo.IsHigh && MyItemInfo.NextItem == null) // last hls, add the 'end' message, if there is one { @@ -871,6 +865,11 @@ namespace Volian.Print.Library YTopMost = YOffset = yoff; vlnTab mytab = null; bool doSectTab = false; + // if this substep has a caution or note as its parent, then there may have been a special indent done on the + // substep... check the CautionOrNoteSubstepIndent value, this is the additional indent amount in number + // of characters. + if (itemInfo.MyParent.IsCaution || itemInfo.MyParent.IsNote) + XOffset += 72 * (itemInfo.FormatStepData.CautionOrNoteSubstepIndent == null ? 0 : (float)itemInfo.FormatStepData.CautionOrNoteSubstepIndent / (float)itemInfo.FormatStepData.Font.CPI); if (itemInfo.MyTab != null && itemInfo.MyTab.Text != null && itemInfo.MyTab.Text != "") { float localXOffset = XOffset; @@ -1492,6 +1491,11 @@ namespace Volian.Print.Library { Width = 72 * 7; // TODO: Need to determine the Width of the Table based upon the contents } + else if (itemInfo.MyParent.IsCaution || itemInfo.MyParent.IsNote) + { + Width = MyParent.Width - tabWidth + (myTab == null ? 0 : myTab.TabAlign); + Width -= 72 * (itemInfo.FormatStepData.CautionOrNoteSubstepIndent == null ? 0 : (float)itemInfo.FormatStepData.CautionOrNoteSubstepIndent / (float)itemInfo.FormatStepData.Font.CPI); + } else { Width = MyParent.Width - tabWidth + (myTab == null ? 0 : myTab.TabAlign);