From 6f1f63e14fc9535c66c235f45e94b7894466371b Mon Sep 17 00:00:00 2001 From: Kathy Date: Mon, 20 Apr 2015 15:59:39 +0000 Subject: [PATCH] Fix page number transitions that were counting foldout pages (should not count those) for AEP Implement [UNIT] page list token (AEP) Added property to track page numbers without foldouts for page num transitions (AEP) --- PROMS/Volian.Print.Library/VlnSvgPageHelper.cs | 4 ++++ PROMS/Volian.Print.Library/vlnParagraph.cs | 9 +++++++-- PROMS/Volian.Svg.Library/iTextSharp.cs | 7 +++++++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs b/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs index 564d2b5d..2c9d6d63 100644 --- a/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs +++ b/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs @@ -1792,6 +1792,10 @@ namespace Volian.Print.Library revUnit += "/Unit 1"; plstr = plstr.Replace(token, revUnit); break; + case "[UNIT]": + string un = MySection.MyDocVersion.DocVersionConfig.Print_UnitNumberForPageList; + plstr = plstr.Replace(token, un); + break; default: if (token.Contains(@"RO-")) { diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index babf50ee..7591ccc8 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -461,8 +461,13 @@ namespace Volian.Print.Library // MyItemInfo.ShortPath, MyItemInfo.FormatStepData.TabData.IdentPrint, MyItemInfo.FormatStepData.TabData.IdentEdit); // if (MyItemInfo.IsFootnote && Processed) return yPageStart; - if (MyItemInfo.PageNumber == 0) MyItemInfo.PageNumber = MyPageHelper.CurrentPageNumber; - else if (MyItemInfo.PageNumberUsed != 0 && MyItemInfo.PageNumberUsed != MyPageHelper.CurrentPageNumber) + int pagenumTran = 0; + if ((MyItemInfo.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DontCountFoldoutPgs) == E_DocStructStyle.DontCountFoldoutPgs) + pagenumTran = MyPageHelper.CurrentPageNumberNoFoldouts; + else + pagenumTran = MyPageHelper.CurrentPageNumber; + if (MyItemInfo.PageNumber == 0) MyItemInfo.PageNumber = pagenumTran; + else if (MyItemInfo.PageNumberUsed != 0 && MyItemInfo.PageNumberUsed != pagenumTran) { if (PromsPrinter.TransPageNumProblems == null) PromsPrinter.TransPageNumProblems = new List(); PromsPrinter.TransPageNumProblems.Add(MyItemInfo.ShortPath); diff --git a/PROMS/Volian.Svg.Library/iTextSharp.cs b/PROMS/Volian.Svg.Library/iTextSharp.cs index 9603fce8..1bfa5f02 100644 --- a/PROMS/Volian.Svg.Library/iTextSharp.cs +++ b/PROMS/Volian.Svg.Library/iTextSharp.cs @@ -967,6 +967,12 @@ namespace Volian.Svg.Library get { return _CurrentPageNumber; } set { _CurrentPageNumber = value; } } + private int _CurrentPageNumberNoFoldouts = 0; + public int CurrentPageNumberNoFoldouts + { + get { return _CurrentPageNumberNoFoldouts; } + set { _CurrentPageNumberNoFoldouts = value; } + } private int _CurrentTOCPageNumber = 0; public int CurrentTOCPageNumber { @@ -1023,6 +1029,7 @@ namespace Volian.Svg.Library if (DoZoomOMatic) DrawZoomOMatic(writer.DirectContent); } CurrentPageNumber++; + CurrentPageNumberNoFoldouts++; } else {