If page break, don’t put out an extra line if it was in RNO; don’t put out extra line after table if there is no border; add a flag for locating of macro off tab

Don’t increment foldout page counts, depending on format document style’s numbering sequence
This commit is contained in:
Kathy Ruffing 2013-09-05 15:50:21 +00:00
parent 2870d68cf3
commit 15cfa2d671
2 changed files with 15 additions and 3 deletions

View File

@ -123,7 +123,12 @@ namespace Volian.Print.Library
}
else
{
MyPageCounts.CanIncrement = true;
E_NumberingSequence numseq = MySection.MyDocStyle.NumberingSequence??0;
// if a foldout is only printing within its section, don't do increments on pagecounts:
if (numseq==E_NumberingSequence.WithinEachSection)
MyPageCounts.CanIncrement = false;
else
MyPageCounts.CanIncrement = true;
base.OnEndPage(writer, document);
if (!CreatingFoldoutPage)
DrawRuler(writer.DirectContent);
@ -215,7 +220,7 @@ namespace Volian.Print.Library
cb.SetColorStroke(new Color(System.Drawing.Color.CornflowerBlue));
float yTop = (float)(cb.PdfWriter.PageSize.Height - layout.TopMargin);
float yBottom = (float)(cb.PdfWriter.PageSize.Height - (layout.TopMargin + layout.PageLength));
Console.WriteLine("'{0}',{1},{2}", MySection.MyDocStyle.Name, yTop, yBottom);
//Console.WriteLine("'{0}',{1},{2}", MySection.MyDocStyle.Name, yTop, yBottom);
cb.MoveTo(x, yTop);
cb.LineTo(x, yBottom);
int i = 0;

View File

@ -806,6 +806,7 @@ namespace Volian.Print.Library
float mytmpfloat = smartPara.ParagraphToPdf(cb, smartPara.Height, yTopMargin, yBottomMargin); // .ToPdf(cb, 0, yTopMargin, yBottomMargin);
yPageStart -= smartPara.Height;
}
if (MyItemInfo.IsRNOPart && MyItemInfo.FormatStepData.DoubleSpace && MyItemInfo.FormatStepData.SpaceDouble) yPageStart += SixLinesPerInch;
break;
case 3: // Break on High Level Step (SevenLinesPerInch)
if (!firstHighLevelStep)
@ -1334,10 +1335,15 @@ namespace Volian.Print.Library
MyGrid = new vlnTable(myFlexGrid, cb);
Height = MyGrid.Height;
Width = MyGrid.Width;
// if the table does not have a border, only move down one line:
float yoffForBorder = 2 * SixLinesPerInch;
if (myFlexGrid.BorderStyle == C1.Win.C1FlexGrid.Util.BaseControls.BorderStyleEnum.None && !myFlexGrid.TopRowHasBorder())
yoffForBorder -= SixLinesPerInch;
//yForCheckoff = yoff + Height - SixLinesPerInch;
if (dropCheckoff)
yForCheckoff += Height - SixLinesPerInch; // place checkoff on last row of text
yoff += (Height + (2 * SixLinesPerInch));
yoff += (Height + yoffForBorder); //(2 * SixLinesPerInch));
CalculateXOffsetGridOrFigure(itemInfo, maxRNO, formatInfo);
yoff = (float)Math.Ceiling(yoff); // RHM 20120925 - Make sure that yOff is an integer value after a grid
}
@ -1837,6 +1843,7 @@ namespace Volian.Print.Library
{
foreach (Macro myMacro in myMacros)
{
if (myMacro.LocWithXOff ?? false) x = mytab == null ? XOffset : mytab.XOffset;
PartsLeft.Add(new vlnMacro(x, y, myMacro.MacroDef));
}
}