This commit is contained in:
Kathy Ruffing 2013-08-13 12:06:28 +00:00
parent 323a3cf734
commit 37269da828
2 changed files with 38 additions and 6 deletions

View File

@ -1062,6 +1062,27 @@ namespace Volian.Print.Library
DidHLSText = true;
plstr = plstr.Replace(token, HLSText);
break;
case "{PROCDES}":
ProcDescrList pdl = section.ActiveFormat.PlantFormat.FormatData.PrintData.ProcDescrList;
if (pdl != null && pdl.Count > 0)
{
string procnum = section.MyProcedure.MyContent.Number;
foreach (ProcDescr pd in pdl)
{
string matchStr = (pd.MatchProcNumber.StartsWith("*}"))?pd.MatchProcNumber.Substring(2):pd.MatchProcNumber;
if (procnum.Contains(matchStr))
{
plstr = pd.ProcDescr1;
break;
}
if (pd.MatchProcNumber == "@")
{
plstr = pd.ProcDescr1;
break;
}
}
}
break;
default:
if (token.Contains(@"RO-"))
{

View File

@ -1187,7 +1187,7 @@ namespace Volian.Print.Library
// if this is the High Level RNO step (MyTopRNO) and we are numbering the RNO, adjust the xoffset to start the tab
// at the x location rather than starting the text at the x location:
AdjustWidth(itemInfo, maxRNO, formatInfo, mytab);
bool adjustAgain = true;
bool adjustAgain = itemInfo.MyTab.Position == 0 ? true : false;
if (!itemInfo.IsSection && itemInfo.FormatStepData.NumberHighLevel && itemInfo.IsRNOPart && (MyTopRNO == null || itemInfo.ItemID == MyTopRNO.MyItemInfo.ItemID))
{
// adjust the x-offset of the RNO to include the tab.
@ -1207,7 +1207,7 @@ namespace Volian.Print.Library
XOffset += inc;
adjustAgain = false;
}
else
else if (mytab != null)
{
mytab.XOffset += mytab.Width;
XOffset = mytab.XOffset + mytab.Width;
@ -1787,6 +1787,7 @@ namespace Volian.Print.Library
if (MyItemInfo.MyDocStyle.SpecialStepsFoldout) return 0;
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 (everyNLines == -99) return 0;
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;
@ -2255,6 +2256,11 @@ namespace Volian.Print.Library
if (myTab.MyMacro != null) myTab.MyMacro.XOffset += xoff;
}
}
else
{
if (itemInfo.MyDocStyle.AlignHLSTabWithSect)
XOffset = (float)itemInfo.MyDocStyle.Layout.LeftMargin + (float)formatInfo.PlantFormat.FormatData.SectData.SectionHeader.Pos;
}
}
}
else if (((colOvrd ?? 0) != 0) && formatInfo.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.NullBox)
@ -2342,7 +2348,12 @@ namespace Volian.Print.Library
}
}
}
// FNP tabbing '#2#' and '#1#', not fully tested: XOffset -= itemInfo.MyTab.Offset;
if (itemInfo.MyTab != null && itemInfo.MyTab.Offset != 0)
{
myTab.XOffset -= itemInfo.MyTab.Offset;
XOffset -= itemInfo.MyTab.Offset;
Width += itemInfo.MyTab.Offset;
}
}
private static float GetLeftJustify(FormatInfo formatInfo, int indxLevels)