From 53308814838353f4f829ff6dbbe863d10adf93c4 Mon Sep 17 00:00:00 2001 From: Kathy Date: Thu, 24 Mar 2016 14:50:36 +0000 Subject: [PATCH] =?UTF-8?q?B2015=5F014:=20pagination=20incorrect=20for=20C?= =?UTF-8?q?AT=20EP=20Backgrounds/=E2=80=9DTitle=20with=20Text=20Below?= =?UTF-8?q?=E2=80=9D=20&=20=E2=80=9CParagraph=E2=80=9D=20split?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PROMS/Volian.Print.Library/vlnParagraph.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index 557514fb..61f3c3d7 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -5595,6 +5595,16 @@ namespace Volian.Print.Library else level = 1; } + // For B2015-014, some migrated data for background documents had the TitleWithTextBelow with associated paragraphs + // as siblings rather than children. Pagination was sometimes putting the TitleWithTextBelow on one page and the + // paragraphs on next. The following code checks thse types, if in enhanced documents but not the Short Form Deviations. + if (paraLoc.MyParagraph.MyItemInfo.ActiveFormat != null + && ((paraLoc.MyParagraph.MyItemInfo.ActiveFormat.PlantFormat.FormatData.PurchaseOptions.Value & E_PurchaseOptions.EnhancedBackgrounds) == E_PurchaseOptions.EnhancedBackgrounds) + || (((paraLoc.MyParagraph.MyItemInfo.ActiveFormat.PlantFormat.FormatData.PurchaseOptions.Value & E_PurchaseOptions.EnhancedDeviations) == E_PurchaseOptions.EnhancedDeviations) + && paraLoc.MyParagraph.MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.EnhancedShortFormDev)) + { + if (!paraLoc.MyParagraph.MyItemInfo.IsTitle && paraLoc.MyParagraph.MyItemInfo.MyPrevious != null && paraLoc.MyParagraph.MyItemInfo.MyPrevious.FormatStepData.Type == "TitleWithTextBelow") level = 0; + } myList.Add(level, paraLoc.YTop, paraLoc.MyParagraph); } return myList;