From eacd97f0faeda740b4be59ea5785286994f8183e Mon Sep 17 00:00:00 2001 From: Kathy Date: Fri, 24 Jan 2020 15:47:08 +0000 Subject: [PATCH] =?UTF-8?q?B2020-006:=20search=20print-procedure=20title?= =?UTF-8?q?=20doesn=E2=80=99t=20print=20when=20section=20is=20only=20insta?= =?UTF-8?q?nce=20found=20and=20=E2=80=98\u160=3F=E2=80=99=20prints=20in=20?= =?UTF-8?q?procedure=20titles?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PROMS/Volian.Print.Library/PDFReport.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/PROMS/Volian.Print.Library/PDFReport.cs b/PROMS/Volian.Print.Library/PDFReport.cs index 56228ab2..fc614106 100644 --- a/PROMS/Volian.Print.Library/PDFReport.cs +++ b/PROMS/Volian.Print.Library/PDFReport.cs @@ -154,7 +154,8 @@ namespace Volian.Print.Library } if (n == 0) { - sb.Append(dvPath); + // B2020-006: 'clean-up' the output string by making string replaces as in 'else' below. + sb.Append(dvPath.Replace("\x11", " ").Replace(@"\u8209?", "-").Replace(@"\u160?", " ").Replace(@"\u9586?", @"\")); } else { @@ -162,7 +163,8 @@ namespace Volian.Print.Library { if (NewPath[j] != "" && (foundMisMatch || OldPath.Length < j + 1 || NewPath[j] != OldPath[j])) { - sb.Append(sep + "".PadLeft(2 * level) + NewPath[j].Replace("\x11", " ")).Replace(@"\u8209?", "-").Replace(@"\u9586?",@"\"); + // B2020-006: Add hard space '\u160?' + sb.Append(sep + "".PadLeft(2 * level) + NewPath[j].Replace("\x11", " ")).Replace(@"\u8209?", "-").Replace(@"\u160?", " ").Replace(@"\u9586?",@"\"); sep = "\r\n"; foundMisMatch = true; } @@ -546,7 +548,8 @@ namespace Volian.Print.Library subTable = new PdfPTable(headerwidths); //} lastProcNum = curProcNum; - string stepPath = AddGroup(subTable, item.SearchPath ?? item.ShortPath, lastPath, f2, true, new Color(0xC0, 0xFF, 0xC0), true); + // B2020-006: When doing a section, don't remove the last item or the procedure title won't print (if section is only item found w/ search string) + string stepPath = AddGroup(subTable, item.SearchPath ?? item.ShortPath, lastPath, f2, item.IsSection ? false : true, new Color(0xC0, 0xFF, 0xC0), true); lastPath = item.SearchPath ?? item.ShortPath; stepPath = BuildStepTab(item); AddCell(subTable, stepPath, f2, (item.IsSection ? SectColor : TextColor));