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 this is a step section & the default section, just return
|
||||||
//if (TranGetSectionItem(itminfo).IsDefaultSection) return;
|
//if (TranGetSectionItem(itminfo).IsDefaultSection) return;
|
||||||
StringBuilder retstr = new StringBuilder();
|
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;
|
string txt;
|
||||||
if(retstr.Length > 0)
|
if(retstr.Length > 0)
|
||||||
txt = TranGetSectionTitle(tb,tb._ToItem);
|
txt = TranGetSectionTitle(tb,tb._ToItem);
|
||||||
@ -1333,7 +1334,8 @@ namespace VEPROMS.CSLA.Library
|
|||||||
if (tb.SectNumWithStepNum) return false;
|
if (tb.SectNumWithStepNum) return false;
|
||||||
if (tb._ToItem.IsSection) return false;
|
if (tb._ToItem.IsSection) return false;
|
||||||
tb.AppendPrefix();
|
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);
|
tb.ReplaceToken(retstr);
|
||||||
return (retstr != null && retstr != "");
|
return (retstr != null && retstr != "");
|
||||||
}
|
}
|
||||||
@ -1371,7 +1373,8 @@ namespace VEPROMS.CSLA.Library
|
|||||||
}
|
}
|
||||||
if (tb.SectionsUsed.Contains(tb._ToItem.ItemID))
|
if (tb.SectionsUsed.Contains(tb._ToItem.ItemID))
|
||||||
return false;
|
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);
|
tb.SectionsUsed.Add(tb._ToItem.ItemID);
|
||||||
if (retstr != null && retstr != "")
|
if (retstr != null && retstr != "")
|
||||||
{
|
{
|
||||||
@ -1389,6 +1392,12 @@ namespace VEPROMS.CSLA.Library
|
|||||||
tb.ReplaceToken(retstr);
|
tb.ReplaceToken(retstr);
|
||||||
return (retstr != null && 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)
|
private static string FixTitleCase(Match m)
|
||||||
{
|
{
|
||||||
if (Regex.IsMatch(m.Value, @"^[A-Za-z]+\.?$"))
|
if (Regex.IsMatch(m.Value, @"^[A-Za-z]+\.?$"))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user