This commit is contained in:
2013-07-11 16:31:42 +00:00
parent 8eb68b9de3
commit 12f492516f
3 changed files with 37 additions and 17 deletions

View File

@@ -37,7 +37,7 @@ namespace Volian.Print.Library
string lastHeader = null;
foreach (ItemInfo childItemInfo in itemInfoList)
{
if (childItemInfo.FormatStepData.TabData != null && childItemInfo.FormatStepData.TabData.IsTransition)
if (childItemInfo.FormatStepData != null && childItemInfo.FormatStepData.TabData != null && childItemInfo.FormatStepData.TabData.IsTransition)
{
lastHeader = childItemInfo.DisplayText;
}
@@ -620,8 +620,8 @@ namespace Volian.Print.Library
// if this document style has another style that is for pages other than first, we need to
// reset the document style off of this section AND reset docstyle values used.
if ((MyItemInfo.MyActiveSection.MyDocStyle.StructureStyle.Where & E_DocStyleUse.UseOnFirstPage) > 0)
{
float _PointsPerPage = 792;
{
float _PointsPerPage = 792;
ItemInfo ii = (ItemInfo)MyItemInfo.MyActiveSection;
int indx = (int)MyItemInfo.MyActiveSection.MyDocStyle.IndexOtherThanFirstPage;
foreach (DocStyle ds in ii.ActiveFormat.PlantFormat.DocStyles.DocStyleList)
@@ -629,6 +629,9 @@ namespace Volian.Print.Library
if (ds.Index == indx)
{
MyItemInfo.MyActiveSection.MyDocStyle = ds;
MyPageHelper.MySection = MyItemInfo.MyActiveSection as SectionInfo;
MyPageHelper.MySection.MyDocStyle = ds;
MyPageHelper.ResetSvg();
break;
}
}
@@ -701,6 +704,8 @@ namespace Volian.Print.Library
{
if (myMsg.IndexOf(@"%d") > -1)
myMsg = myMsg.Replace(@"%d", MyItemInfo.MyHLS.MyTab.CleanTextNoSymbols.Trim());
if (myMsg.IndexOf(@"%0d") > -1)
myMsg = myMsg.Replace(@"%0d", MyItemInfo.MyHLS.MyTab.CleanTextNoSymbols.Trim(" .".ToCharArray()));
if (myMsg.IndexOf(@"%2d") > -1)
myMsg = myMsg.Replace(@"%2d", MyItemInfo.MyHLS.MyTab.CleanTextNoSymbols.Trim(" .".ToCharArray()).PadLeft(2));
float msg_yLocation = 0;
@@ -715,7 +720,7 @@ namespace Volian.Print.Library
msg_yLocation = msg_yLocation + yLocation - SixLinesPerInch;
break;
case E_ContBottomLoc.BtwnTextAndBottom: // place continue string between end of text & bottom of page
msg_yLocation = msg_yLocation + yLocation - ((yLocation - yBottomMargin) / 2);
msg_yLocation = msg_yLocation + yLocation - ((yLocation - yBottomMargin) / 2); // +SixLinesPerInch; (need this for IP3)
break;
case E_ContBottomLoc.BottomOfPage: // place continue message at bottom of page
//msg_yLocation = yBottomMargin + 2 * SixLinesPerInch + (float)docstyle.Layout.FooterLength; // 2 lines above bottom margin
@@ -1780,6 +1785,8 @@ namespace Volian.Print.Library
if (MyItemInfo.FormatStepData != null && MyItemInfo.FormatStepData.Prefix != null && MyItemInfo.FormatStepData.Suffix != null && MyItemInfo.FormatStepData.UseSmartTemplate) return 0;
int everyNLines = MyItemInfo.FormatStepData == null ? 1 : MyItemInfo.FormatStepData.StepLayoutData.EveryNLines ?? 1;
if (MyItemInfo.Ordinal % everyNLines == 0 || MyItemInfo.NextItem == null) return SixLinesPerInch;
// Pagination issue to be used with yEndsWithBlankLine in Pagination code, but not checked in yet.
//if (MyItemInfo.Ordinal % everyNLines == 0 || MyItemInfo.NextItem == null) return SixLinesPerInch;
return 0;
}
private void AddMacros(ItemInfo itemInfo, vlnTab mytab)
@@ -2324,6 +2331,7 @@ namespace Volian.Print.Library
}
}
}
// FNP tabbing '#2#' and '#1#', not fully tested: XOffset -= itemInfo.MyTab.Offset;
}
private static float GetLeftJustify(FormatInfo formatInfo, int indxLevels)