Get data into memory for approval generation so that page number transitions resolve

Fixed B2014-025:If not master/slave, load all data into memory for page number transitions. Present dialog if there are errors in page number transitions so that user can resolve.
Added a property to determine if page number transition has incorrect page number caused by length of step’s text/wrapping & pagination
Set property to determine if page number transition has incorrect page number caused by length of step’s text/wrapping & pagination
Add tracking of inconsistent page number transitions; if pdf already open, don’t run 2nd pass for page number transitions (resulting pdf had unresolved page numbers);
This commit is contained in:
2014-03-04 17:36:02 +00:00
parent 63acad915d
commit 622717ba1a
7 changed files with 61 additions and 8 deletions

View File

@@ -570,18 +570,29 @@ namespace VEPROMS.CSLA.Library
}
set { _PrintLevel = value; }
}
// The following property tracks the page number that this item is on if the resolved
// The following properties track the page number that this item is on if the resolved
// transition text has a Page Number associated with it. Formats that have this either
// have the UseTransitionModfier flag or have '{Page Num}' in respective transition formats.
// If the format requires page numbers in transitions text, two passes are run through the
// data for printing. The first determines page numbers, the seconds resolves the transition
// text.
// text. The PageNumberUsed value is used to determine if the page number in 1st & 2nd passes
// are different. This can be caused by the page number text causing different heights of
// the step that causes change in pagination. If this occurs, the user is presented with a
// dialog box that shows the step that causes the problem & a manual change will be necessary.
// This is a rare occurence so it was decided that the amount of coding effort to fix this
// would be so much in comparison to having the user fix manually (RHM/KBR Feb 2014).
private int _PageNumber = 0;
public int PageNumber
{
get { return _PageNumber; }
set { _PageNumber = value; }
}
private int _PageNumberUsed = 0;
public int PageNumberUsed
{
get { return _PageNumberUsed; }
set { _PageNumberUsed = value; }
}
private float _MSWordPageCount = 0;
public float MSWordPageCount
{

View File

@@ -808,6 +808,7 @@ namespace VEPROMS.CSLA.Library
if (tb._ToItem.PageNumber != 0 && tb._FromItem.PageNumber != 0)
{
int pgoffset = tb._ToItem.PageNumber - tb._FromItem.PageNumber;
tb._ToItem.PageNumberUsed = tb._ToItem.PageNumber;
switch (pgoffset)
{
case 1:
@@ -831,7 +832,7 @@ namespace VEPROMS.CSLA.Library
tb.Append(" (Page ~)");
}
return true;
}
}
private static bool AddStepNumber(TransitionBuilder tb)
{
// If we're on a step put out the step number.