B2016-003 Transitions to sections whose number has a leading space was causing errors in transition text
This commit is contained in:
parent
17b9ec24b2
commit
66bb457fb3
@ -1303,7 +1303,8 @@ namespace VEPROMS.CSLA.Library
|
||||
// if this is a step section & the default section, just return
|
||||
//if (TranGetSectionItem(itminfo).IsDefaultSection) return;
|
||||
StringBuilder retstr = new StringBuilder();
|
||||
retstr.Append(TranGetSectionNumber(tb,false));
|
||||
//B2016-003 Transitions to sections whose number has a leading space was causing errors in transition text
|
||||
retstr.Append(TrimIt(TranGetSectionNumber(tb,false)));
|
||||
string txt;
|
||||
if(retstr.Length > 0)
|
||||
txt = TranGetSectionTitle(tb,tb._ToItem);
|
||||
@ -1333,7 +1334,8 @@ namespace VEPROMS.CSLA.Library
|
||||
if (tb.SectNumWithStepNum) return false;
|
||||
if (tb._ToItem.IsSection) return false;
|
||||
tb.AppendPrefix();
|
||||
string retstr = TranGetSectionNumber(tb,false);
|
||||
//B2016-003 Transitions to sections whose number has a leading space was causing errors in transition text
|
||||
string retstr = TrimIt(TranGetSectionNumber(tb, false));
|
||||
tb.ReplaceToken(retstr);
|
||||
return (retstr != null && retstr != "");
|
||||
}
|
||||
@ -1371,7 +1373,8 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
if (tb.SectionsUsed.Contains(tb._ToItem.ItemID))
|
||||
return false;
|
||||
string retstr = TranGetSectionNumber(tb,allLevels);
|
||||
//B2016-003 Transitions to sections whose number has a leading space was causing errors in transition text
|
||||
string retstr = TrimIt(TranGetSectionNumber(tb, allLevels));
|
||||
tb.SectionsUsed.Add(tb._ToItem.ItemID);
|
||||
if (retstr != null && retstr != "")
|
||||
{
|
||||
@ -1389,6 +1392,12 @@ namespace VEPROMS.CSLA.Library
|
||||
tb.ReplaceToken(retstr);
|
||||
return (retstr != null && retstr != "");
|
||||
}
|
||||
//B2016-003 Transitions to sections whose number has a leading space was causing errors in transition text
|
||||
private static string TrimIt(string str)
|
||||
{
|
||||
if (str == null) return str;
|
||||
return str.TrimStart();
|
||||
}
|
||||
private static string FixTitleCase(Match m)
|
||||
{
|
||||
if (Regex.IsMatch(m.Value, @"^[A-Za-z]+\.?$"))
|
||||
|
Loading…
x
Reference in New Issue
Block a user