B2022-061: handle newlines in Procedure Titles, in printed page headers (pagelist items) and transition text

This commit is contained in:
Kathy Ruffing 2022-06-03 15:09:45 +00:00
parent fa5d78f844
commit bb3b76b0c2
2 changed files with 5 additions and 0 deletions

View File

@ -1040,6 +1040,9 @@ namespace VEPROMS.CSLA.Library
}
string parenstr = tb._ToItem.MyProcedure.MyContent.Text;
parenstr = parenstr.Replace("\\LINE ", " ").Replace("\r\n", " ");
// B2022-061: \line (new line) in procedure title was putting a line in transition text in editor & actually
// printing '\line'
parenstr = parenstr.Replace("\\line ", "");
StringBuilder lretstr = new StringBuilder();
// LATER: For an else - Do I need to strip underlining here? See promsnt\lib\edit\gettran.c
if (parenstr != "<NO TITLE>" || tb._FormatData.ProcData.PrintNoTitle)

View File

@ -2503,6 +2503,8 @@ i = 0;
// check to see if the title needs to wrap
if ((len == null || len == 0 || ItemInfo.StripRtfFormatting(title).Length < len) && (!includePrecedingText || ItemInfo.StripRtfFormatting(title).Length < numAndTitleLen))
{
// B2022-061: don't print '\line' as part of procedure title in pagelist items.
if (match == "{PROCTITLE}") title = title.Replace("\\line ", "");
if (match == "{PROCTITLE2}" || match == "[PROCTITLE2]") return plstr.Replace(match, ""); // this would have been done in proctitle1
plstr = plstr.Replace(match, title).Replace("@@","");
//svgGroup.Add(PageItemToSvgText(pageItem, title));