This commit is contained in:
Kathy Ruffing 2011-10-14 10:32:47 +00:00
parent ff26eeeab9
commit dc1e2e858c

View File

@ -2004,7 +2004,7 @@ namespace VEPROMS.CSLA.Library
_MyTab.Text = "";
_MyTab.CleanText = "";
return;
}
}
int stepType = (int)(MyContent.Type % 10000);
string tbformat = IsInRNO ? FormatStepData.TabData.RNOIdentPrint : FormatStepData.TabData.IdentPrint;
// rno gets parent tab
@ -3129,13 +3129,51 @@ namespace VEPROMS.CSLA.Library
public override void SetupTags()
{
MyTab = new Tab(ActiveFormat.PlantFormat.FormatData.SectData.SectionNumber.Font);
_MyTab.Text = DisplayNumber;
_MyTab.CleanText = DisplayNumber.PadRight(20);
string sectTab = GetSectionTab(false);
_MyTab.Text = sectTab;
_MyTab.CleanText = sectTab.PadRight(20);
MyHeader = new MetaTag(ActiveFormat.PlantFormat.FormatData.SectData.SectionHeader.Font);
_MyHeader.Text = null;
MyFooter = null;
_TagsSetup = true;
}
private string GetSectionTab(bool underline)
{
if (DisplayNumber == null || DisplayNumber == "" || !IsStepSection) return DisplayNumber;
if (MyDocStyle.SpecialStepsFoldout) return DisplayNumber;
if (ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.TieTabToLevel)
{
if (underline)
return @"\ul " + DisplayNumber + @"\ul0 ";
else
return DisplayNumber;
}
string retStr = null;
string ch = DisplayNumber != null && DisplayNumber != "" ? DisplayNumber.Substring(0,1) : null;
int Snum = GetSectionNum();
if (Snum == -1)
retStr = ch + ".";
else {
string tmp = DisplayNumber.IndexOf(".")>-1?DisplayNumber.Substring(0,DisplayNumber.IndexOf(".")):DisplayNumber;
if (underline)
retStr = @"\ul " + tmp + "." + Snum.ToString() + @"\ul0 ";
else
retStr = tmp + "." + Snum.ToString();
}
return retStr;
}
private int GetSectionNum()
{
int indx = -1;
if (DisplayNumber != null && DisplayNumber != "" && (indx = DisplayNumber.IndexOf("."))>-1)
{
// if there is a number after the '.', return it as a number. For example if it is 001, return a 1:
string tmpstr = indx+1<DisplayNumber.Length?DisplayNumber.Substring(indx+1):null;
return tmpstr==null?0:System.Convert.ToInt32(tmpstr);
}
return (-1);
}
protected override void RefreshFields(Item tmp)
{
base.RefreshFields(tmp);