From 15cfa2d6716397e689d8422bc40084f208df48e8 Mon Sep 17 00:00:00 2001 From: Kathy Date: Thu, 5 Sep 2013 15:50:21 +0000 Subject: [PATCH] =?UTF-8?q?If=20page=20break,=20don=E2=80=99t=20put=20out?= =?UTF-8?q?=20an=20extra=20line=20if=20it=20was=20in=20RNO;=20don=E2=80=99?= =?UTF-8?q?t=20put=20out=20extra=20line=20after=20table=20if=20there=20is?= =?UTF-8?q?=20no=20border;=20add=20a=20flag=20for=20locating=20of=20macro?= =?UTF-8?q?=20off=20tab=20Don=E2=80=99t=20increment=20foldout=20page=20cou?= =?UTF-8?q?nts,=20depending=20on=20format=20document=20style=E2=80=99s=20n?= =?UTF-8?q?umbering=20sequence?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PROMS/Volian.Print.Library/VlnSvgPageHelper.cs | 9 +++++++-- PROMS/Volian.Print.Library/vlnParagraph.cs | 9 ++++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs b/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs index 233c66e1..18d5ee90 100644 --- a/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs +++ b/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs @@ -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; diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index 2ce2e0d0..735349c4 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -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)); } }