Support for Inactive document styles

Change ‘Count’ to ‘MaxIndex’ for ‘vlnIndexedFormatList’
Add Inactive flag
This commit is contained in:
2015-07-20 14:28:22 +00:00
parent bd75e47b8b
commit a98f4998da
5 changed files with 68 additions and 42 deletions

View File

@@ -784,7 +784,7 @@ namespace VEPROMS.CSLA.Library
{
// The tranType parameter is really the index. For page number transitions, get the transition
// type (holdover from 16bit, used to define whether transitions are range) for range transitions, the page number goes after the 1st step.
int strantype = tranType < tb._FromItem.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList.Count ? (int)tb._FromItem.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList[tranType].Type : 0;
int strantype = tranType < tb._FromItem.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList.MaxIndex ? (int)tb._FromItem.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList[tranType].Type : 0;
if ((strantype == 1 || strantype == 2 || strantype == 4) && !tb._TransFormat.Contains("{Page Num}"))
{
// if range transition, the page number token needs to go after the first step, else it's at the end:
@@ -835,7 +835,7 @@ namespace VEPROMS.CSLA.Library
tb._FormatData = formatInfo.PlantFormat.FormatData;
// get the format of the transition string based on this transition's index into the TransData part of
// format....
if (tranType > tb._FormatData.TransData.TransTypeList.Count)
if (tranType > tb._FormatData.TransData.TransTypeList.MaxIndex)
tranType = 0;
// Replace 3 tokens ", {.}, {.}, {.}" with a single token "{.}"
tb._TransFormat = tb._FormatData.TransData.TransTypeList[tranType].TransFormat.Replace(", {.}, {.}, {.}", "{.}");