Step transitions to another Section were being output as Section 7.1.3 Step 7.1.3.g. This change causes the code to output Step 7.1.3.g.

This commit is contained in:
Rich 2016-09-23 14:43:10 +00:00
parent 352be2695a
commit 89f2a58397

View File

@ -754,6 +754,7 @@ namespace VEPROMS.CSLA.Library
{ {
return GetResolvedText(fromInfo.ActiveFormat, fromInfo, tranType, toItem, rangeItem, hasPageNum); return GetResolvedText(fromInfo.ActiveFormat, fromInfo, tranType, toItem, rangeItem, hasPageNum);
} }
private static Regex RegFixVCS = new Regex(@"Section ([0-9.]+) Step \1"); // Find Section xxx followed by Step xxx
public static string GetResolvedText(FormatInfo formatInfo, ItemInfo fromInfo, int tranType, ItemInfo toItem, ItemInfo rangeItem, bool pagenum) public static string GetResolvedText(FormatInfo formatInfo, ItemInfo fromInfo, int tranType, ItemInfo toItem, ItemInfo rangeItem, bool pagenum)
{ {
if (!pagenum) if (!pagenum)
@ -801,6 +802,7 @@ namespace VEPROMS.CSLA.Library
if (toItem.MyDocVersion == null) if (toItem.MyDocVersion == null)
return "?"; return "?";
string retval = BuildString(tb); string retval = BuildString(tb);
if(tb._FromItem.ActiveFormat.Name.ToUpper().StartsWith("VCB")) retval = RegFixVCS.Replace(retval,"Step $1");//Remove the Section portion if the step portion repeats the section portion only for VCB
// Added for transitions to un-numbered steps // Added for transitions to un-numbered steps
if (retval == string.Empty) if (retval == string.Empty)
{ {