From 09c88e8948d8f8e1e849ee6670294160b24f2615 Mon Sep 17 00:00:00 2001 From: Kathy Date: Thu, 30 Oct 2014 14:24:48 +0000 Subject: [PATCH] =?UTF-8?q?fixed=20footnote=20tabbing=20in=20editor=20&=20?= =?UTF-8?q?made=20other=20note=20types=20inactive=20BGEVLV:=20for=20?= =?UTF-8?q?=E2=80=98TitleWithTextRight=E2=80=99=20types,=20position=20corr?= =?UTF-8?q?ectly=20on=20screen=20if=20no=20children=20for=20this=20type=20?= =?UTF-8?q?BGEVLV:=20don=E2=80=99t=20print=20duplicate=20footnote=20data?= =?UTF-8?q?=20even=20if=20it=20exists=20in=20data;=20fixed=20y-location=20?= =?UTF-8?q?of=20footnotes=20on=20last=20page=20of=20section.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PROMS/Formats/fmtall/BGEVLall.xml | Bin 49294 -> 48946 bytes PROMS/Volian.Controls.Library/EditItem.cs | 18 ++++--- PROMS/Volian.Print.Library/vlnParagraph.cs | 60 +++++++++++++++------ 3 files changed, 54 insertions(+), 24 deletions(-) diff --git a/PROMS/Formats/fmtall/BGEVLall.xml b/PROMS/Formats/fmtall/BGEVLall.xml index 67c47d96a33c7e18d7959976ccfe7c257a6e4376..25f25099aa726992dc91b648b44e4a7016bab3e8 100644 GIT binary patch delta 123 zcmeBcWZv|TX@iXI8T+FvV(Z JeipGJ9RRrTFJJ%w delta 154 zcmdn=kEySbd4r7YWH(=h$qAMflQ;OvO}>!$X!097vB}F^^nkR^WCtIS$qF{RCdZX= zY(8V3$3K}Pm~Zlht!$GY_=rtz@^?YzZ{`cIU_=q<3zTD;%;q34`JAuT myNotes = MyPageHelper.NotesToFootNotesHLS[MyItemInfo.ItemID]; - foreach (int myNote in myNotes) - { - ItemInfo inote = ItemInfo.Get(myNote); - vlnText ntTxt = new vlnText(cb, null, inote.MyContent.Text, inote.MyContent.Text, (float)MyItemInfo.MyDocStyle.Layout.LeftMargin, 0, inote.FormatStepData.Font); - ntTxt.Width = (float)MyItemInfo.MyDocStyle.Layout.PageWidth - (float)MyItemInfo.MyDocStyle.Layout.LeftMargin; - if (MyPageHelper.NotesToFootNotes == null) MyPageHelper.NotesToFootNotes = new List(); - MyPageHelper.NotesToFootNotes.Add(ntTxt); - } - MyPageHelper.NotesToFootNotesHLS.Remove(MyItemInfo.ItemID); - } - + // see if this hls has footnotes, add to the footnote datastructure for processing at end of pgae. + if (MyItemInfo.IsHigh && MyPageHelper.NotesToFootNotesHLS.ContainsKey(MyItemInfo.ItemID)) AddFootNote(cb); + yPageStart = ChildrenAbove.ToPdf(cb, yPageStart, ref yTopMargin, ref yBottomMargin); yPageStart = ChildrenLeft.ToPdf(cb, yPageStart, ref yTopMargin, ref yBottomMargin); @@ -1475,8 +1462,49 @@ namespace Volian.Print.Library } } if (yLocalypagestart != yPageStart) DebugText.WriteLine("ToPdf-yPagestartDiff:{0},{1},{2},{3}", MyPageHelper.MyPdfContentByte.PdfWriter.CurrentPageNumber, MyItemInfo.ItemID, yLocalypagestart, yPageStart); + + // if doing NotesToFootnotes (Calvert valve list format), get the bottom location so that + // footnotes will be printed after last text on page. This is used for the end of the section. + // Pages that broke within pagination logic above had footnote location set during pagination code. + if (MyPageHelper.NotesToFootNotes != null) + MyPageHelper.NotesToFootNotesYoffset = CalculateYLocation(yPageStart - YBottomMost, yTopMargin); + return yPageStart; } + + private void AddFootNote(PdfContentByte cb) + { + // for calvert valve lists footnotes, if there is footnote data, save it for vlnSvgPageHelper + // which puts the footnotes out when page is printed. + List myNotes = MyPageHelper.NotesToFootNotesHLS[MyItemInfo.ItemID]; + foreach (int myNote in myNotes) + { + ItemInfo inote = ItemInfo.Get(myNote); + + // first check if this exact text is already in the foot note list. If it is + // in there, don't add it. + bool inlist = false; + if (MyPageHelper.NotesToFootNotes != null) + { + foreach (vlnText vt in MyPageHelper.NotesToFootNotes) + { + if (vt.Text == inote.MyContent.Text) + { + inlist = true; + break; + } + } + } + if (!inlist) + { + vlnText ntTxt = new vlnText(cb, null, inote.MyContent.Text, inote.MyContent.Text, (float)MyItemInfo.MyDocStyle.Layout.LeftMargin, 0, inote.FormatStepData.Font); + ntTxt.Width = (float)MyItemInfo.MyDocStyle.Layout.PageWidth - (float)MyItemInfo.MyDocStyle.Layout.LeftMargin; + if (MyPageHelper.NotesToFootNotes == null) MyPageHelper.NotesToFootNotes = new List(); + MyPageHelper.NotesToFootNotes.Add(ntTxt); + } + } + MyPageHelper.NotesToFootNotesHLS.Remove(MyItemInfo.ItemID); + } private bool DoTopContinueMsg(PdfContentByte cb, ref float yPageStart, float yTopMargin, DocStyle docstyle, string subTab) { bool addExtraLine = false;