Added code to resolve issue with printing RNP document

Added code to resolve issue with printing BGE document
This commit is contained in:
Rich 2015-02-27 03:56:28 +00:00
parent 8168d2f708
commit 6d94bfb5f4
2 changed files with 20 additions and 13 deletions

View File

@ -798,6 +798,7 @@ namespace VEPROMS.CSLA.Library
// force Print of MS Word Attachment to Final without revisions and comments // force Print of MS Word Attachment to Final without revisions and comments
myDoc.ActiveWindow.View.ShowRevisionsAndComments = false; myDoc.ActiveWindow.View.ShowRevisionsAndComments = false;
myDoc.ActiveWindow.View.RevisionsView = LBWdRevisionsView.wdRevisionsViewFinal; myDoc.ActiveWindow.View.RevisionsView = LBWdRevisionsView.wdRevisionsViewFinal;
int lastStart = sel.Start;
while (sel != null) while (sel != null)
{ {
if (statusChange != null) statusChange(VolianStatusType.Update, sel.Start, string.Format("{0} ROs Refreshed", ++roCount)); if (statusChange != null) statusChange(VolianStatusType.Update, sel.Start, string.Format("{0} ROs Refreshed", ++roCount));
@ -935,6 +936,11 @@ namespace VEPROMS.CSLA.Library
InsertROValue(sel, val, sect.ActiveFormat.PlantFormat.FormatData.ROData.UpRoIfPrevUpper); InsertROValue(sel, val, sect.ActiveFormat.PlantFormat.FormatData.ROData.UpRoIfPrevUpper);
} }
sel = FindRO(); sel = FindRO();
if (sel != null && sel.Start == lastStart)
{
Console.WriteLine("Seems to be repeating find of ro that is not an ro: " + sel.Text);
sel = null;
}
} }
if (statusChange != null) statusChange(VolianStatusType.Update, 0, "Creating PDF"); if (statusChange != null) statusChange(VolianStatusType.Update, 0, "Creating PDF");
sel = MyApp.Selection; sel = MyApp.Selection;
@ -1281,8 +1287,8 @@ namespace VEPROMS.CSLA.Library
{ {
if (roValue == null) if (roValue == null)
{ {
//sel.Text = "RO Not Found"; sel.Text = "RO Not Found";
//sel.Font.Color = LBWdColor.wdColorRed; sel.Font.Color = LBWdColor.wdColorRed;
} }
else else
{ {

View File

@ -175,12 +175,14 @@ namespace Volian.Print.Library
if (ySizeIncludingFirstStep < yWithinMargins && ySizeIncludingFirst > yWithinMargins && yWithinMargins > (yPageSize / 2)) if (ySizeIncludingFirstStep < yWithinMargins && ySizeIncludingFirst > yWithinMargins && yWithinMargins > (yPageSize / 2))
ySizeIncludingFirst = ySizeIncludingFirstStep; ySizeIncludingFirst = ySizeIncludingFirstStep;
if (!KeepStepsOnPage && (ySizeIncludingFirst + ySectionEndMsg) > (yLocation - yBottomMargin) && !nearTheTop) if (!KeepStepsOnPage && (ySizeIncludingFirst + ySectionEndMsg) > (yLocation - yBottomMargin) && !nearTheTop)
{
if (!MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvert ||
(ySizeIncludingFirst < yPageSize || yWithinMargins < (yPageSize - (2 * 72))))
{ {
ShowPageBreak(4, "Page Break Before Continuous Step Section", "Yes", YSize, yPageSize, yWithinMargins, ManualPageBreak); ShowPageBreak(4, "Page Break Before Continuous Step Section", "Yes", YSize, yPageSize, yWithinMargins, ManualPageBreak);
return 1; return 1;
} }
else }
{
if (ChildrenBelow.Count > 0) if (ChildrenBelow.Count > 0)
{ {
vlnParagraph firstHLS = ChildrenBelow[0]; vlnParagraph firstHLS = ChildrenBelow[0];
@ -188,7 +190,6 @@ namespace Volian.Print.Library
firstHLS.BreakHighLevelStepWithSection = true; firstHLS.BreakHighLevelStepWithSection = true;
} }
} }
}
return 0; // Don't Paginate (page break) on a Step Section if it's first thing on page return 0; // Don't Paginate (page break) on a Step Section if it's first thing on page
} }
if (!MyItemInfo.IsHigh) return 0; // Don't Paginate on a Substep level if (!MyItemInfo.IsHigh) return 0; // Don't Paginate on a Substep level