fixed footnote tabbing in editor & made other note types inactive
BGEVLV: for ‘TitleWithTextRight’ types, position correctly on screen if no children for this type BGEVLV: don’t print duplicate footnote data even if it exists in data; fixed y-location of footnotes on last page of section.
This commit is contained in:
parent
dad37c50a8
commit
09c88e8948
Binary file not shown.
@ -1752,9 +1752,10 @@ namespace Volian.Controls.Library
|
|||||||
//if (MyItemInfo.SameRowAsParent && MyItemInfo.IsCaution2)
|
//if (MyItemInfo.SameRowAsParent && MyItemInfo.IsCaution2)
|
||||||
// bottom = Top;
|
// bottom = Top;
|
||||||
|
|
||||||
// If this is a "TitleWithTextRight", don't move down on the screen:
|
// If this is a "TitleWithTextRight", don't move down on the screen but only if it has a
|
||||||
|
// child, i.e. want the child to be positioned on line, but if no child, move down on screen:
|
||||||
int newTop = bottom;
|
int newTop = bottom;
|
||||||
if (MyItemInfo.FormatStepData != null && MyItemInfo.FormatStepData.Type == "TitleWithTextRight") newTop = Top;
|
if (MyItemInfo.FormatStepData != null && MyItemInfo.FormatStepData.Type == "TitleWithTextRight" && MyItemInfo.HasChildren) newTop = Top;
|
||||||
if (nextEditItem.Top != newTop)
|
if (nextEditItem.Top != newTop)
|
||||||
{
|
{
|
||||||
MyStepPanel.ItemMoving++;
|
MyStepPanel.ItemMoving++;
|
||||||
@ -2152,6 +2153,8 @@ namespace Volian.Controls.Library
|
|||||||
// Paul Linn made the request on 6/4/12 to align the Component Description &
|
// Paul Linn made the request on 6/4/12 to align the Component Description &
|
||||||
// Required Position under the Component Number.
|
// Required Position under the Component Number.
|
||||||
ItemLocation = new Point(_MyParentEditItem.ItemLocation.X, _MyParentEditItem.Bottom);
|
ItemLocation = new Point(_MyParentEditItem.ItemLocation.X, _MyParentEditItem.Bottom);
|
||||||
|
else if (MyItemInfo.FormatStepData.Type == "TitleWithTextRight" && MyItemInfo.Steps.Count==0) // this code is run for siblings within a HLS (but not last sibling).
|
||||||
|
ItemLocation = new Point(_MyParentEditItem.ItemLocation.X, _MyParentEditItem.Bottom);
|
||||||
else if (MyItemInfo.MyParent.FormatStepData.Type == "TitleWithTextRight")
|
else if (MyItemInfo.MyParent.FormatStepData.Type == "TitleWithTextRight")
|
||||||
ItemLocation = new Point(_MyParentEditItem.ItemLocation.X + _MyParentEditItem.ItemWidth, _MyParentEditItem.ItemLocation.Y);
|
ItemLocation = new Point(_MyParentEditItem.ItemLocation.X + _MyParentEditItem.ItemWidth, _MyParentEditItem.ItemLocation.Y);
|
||||||
else if (MyItemInfo.MyTab.Offset != 0)
|
else if (MyItemInfo.MyTab.Offset != 0)
|
||||||
@ -2160,26 +2163,25 @@ namespace Volian.Controls.Library
|
|||||||
else
|
else
|
||||||
ItemLocation = new Point(_MyParentEditItem.ContentLeft, _MyParentEditItem.Bottom);
|
ItemLocation = new Point(_MyParentEditItem.ContentLeft, _MyParentEditItem.Bottom);
|
||||||
|
|
||||||
|
bool specialTplSupport =((MyItemInfo.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_PageListSpBckgrnd) == E_DocStructStyle.DSS_PageListSpBckgrnd) ||
|
||||||
|
(MyItemInfo.MyDocStyle.LandscapePageList && MyItemInfo.MyDocStyle.ComponentList);
|
||||||
if (MyItemInfo.FormatStepData.ReadOnly)
|
if (MyItemInfo.FormatStepData.ReadOnly)
|
||||||
{
|
{
|
||||||
Graphics g = CreateGraphics();
|
Graphics g = CreateGraphics();
|
||||||
SizeF sz = g.MeasureString(MyItemInfo.MyContent.Text, MyItemInfo.FormatStepData.Font.WindowsFont);
|
SizeF sz = g.MeasureString(MyItemInfo.MyContent.Text, MyItemInfo.FormatStepData.Font.WindowsFont);
|
||||||
ItemWidth = (int)sz.Width;
|
ItemWidth = (int)sz.Width;
|
||||||
}
|
}
|
||||||
else if (MyItemInfo.FormatStepData.Type == "TitleWithTextRight" &&
|
else if (MyItemInfo.FormatStepData.Type == "TitleWithTextRight" && specialTplSupport)
|
||||||
((MyItemInfo.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_PageListSpBckgrnd) == E_DocStructStyle.DSS_PageListSpBckgrnd))
|
|
||||||
{
|
{
|
||||||
Graphics g = CreateGraphics();
|
Graphics g = CreateGraphics();
|
||||||
SizeF sz = g.MeasureString(MyItemInfo.MyContent.Text, MyItemInfo.FormatStepData.Font.WindowsFont);
|
SizeF sz = g.MeasureString(MyItemInfo.MyContent.Text, MyItemInfo.FormatStepData.Font.WindowsFont);
|
||||||
ItemWidth = (int)sz.Width + 5;
|
ItemWidth = (int)sz.Width + 5;
|
||||||
}
|
}
|
||||||
else if (MyItemInfo.FormatStepData.Type == "TitleWithTextBelow" &&
|
else if (MyItemInfo.FormatStepData.Type == "TitleWithTextBelow" && specialTplSupport)
|
||||||
((MyItemInfo.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_PageListSpBckgrnd) == E_DocStructStyle.DSS_PageListSpBckgrnd))
|
|
||||||
{
|
{
|
||||||
ItemWidth = MyStepPanel.ToDisplay(MyStepSectionLayoutData.WidSTableEdit, 0);
|
ItemWidth = MyStepPanel.ToDisplay(MyStepSectionLayoutData.WidSTableEdit, 0);
|
||||||
}
|
}
|
||||||
else if (MyItemInfo.MyParent.FormatStepData.Type == "TitleWithTextBelow" &&
|
else if (MyItemInfo.MyParent.FormatStepData.Type == "TitleWithTextBelow" && specialTplSupport)
|
||||||
((MyItemInfo.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_PageListSpBckgrnd) == E_DocStructStyle.DSS_PageListSpBckgrnd))
|
|
||||||
{
|
{
|
||||||
ItemWidth = MyParentEditItem.ItemWidth - RTBItem.RTBMargin;
|
ItemWidth = MyParentEditItem.ItemWidth - RTBItem.RTBMargin;
|
||||||
}
|
}
|
||||||
|
@ -1353,22 +1353,9 @@ namespace Volian.Print.Library
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// see if this hls has footnotes, if so save them for vlnSvgPageHelper to put out
|
// see if this hls has footnotes, add to the footnote datastructure for processing at end of pgae.
|
||||||
// and figure out yspace it takes for pagination.
|
if (MyItemInfo.IsHigh && MyPageHelper.NotesToFootNotesHLS.ContainsKey(MyItemInfo.ItemID)) AddFootNote(cb);
|
||||||
if (MyItemInfo.IsHigh && MyPageHelper.NotesToFootNotesHLS.ContainsKey(MyItemInfo.ItemID))
|
|
||||||
{
|
|
||||||
List<int> 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<vlnText>();
|
|
||||||
MyPageHelper.NotesToFootNotes.Add(ntTxt);
|
|
||||||
}
|
|
||||||
MyPageHelper.NotesToFootNotesHLS.Remove(MyItemInfo.ItemID);
|
|
||||||
}
|
|
||||||
|
|
||||||
yPageStart = ChildrenAbove.ToPdf(cb, yPageStart, ref yTopMargin, ref yBottomMargin);
|
yPageStart = ChildrenAbove.ToPdf(cb, yPageStart, ref yTopMargin, ref yBottomMargin);
|
||||||
yPageStart = ChildrenLeft.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 (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;
|
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<int> 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<vlnText>();
|
||||||
|
MyPageHelper.NotesToFootNotes.Add(ntTxt);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
MyPageHelper.NotesToFootNotesHLS.Remove(MyItemInfo.ItemID);
|
||||||
|
}
|
||||||
private bool DoTopContinueMsg(PdfContentByte cb, ref float yPageStart, float yTopMargin, DocStyle docstyle, string subTab)
|
private bool DoTopContinueMsg(PdfContentByte cb, ref float yPageStart, float yTopMargin, DocStyle docstyle, string subTab)
|
||||||
{
|
{
|
||||||
bool addExtraLine = false;
|
bool addExtraLine = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user