From 53b4189c9d029937b2d73e8d839bbcbe007c97bc Mon Sep 17 00:00:00 2001 From: Kathy Date: Tue, 11 Feb 2014 15:41:27 +0000 Subject: [PATCH] Fixed F2013-012: Added support for ATTACHNUM1 page list item --- PROMS/Volian.Print.Library/VlnSvgPageHelper.cs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs b/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs index 59990a23..52713636 100644 --- a/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs +++ b/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs @@ -1184,7 +1184,11 @@ namespace Volian.Print.Library case "[ATTACHNUM]": plstr = plstr.Replace(token, "1"); // used by SHESDD - but 16bit returns '1' unless has format flag 'MoveParensToToken' that was only in SCE (San Onofre) break; - + case "{ATTACHNUM1}": + case "[ATTACHNUM1]": + string numAtt = GetAttachNum1(); + plstr = plstr.Replace(token, numAtt); // used by SHESDD - but 16bit returns '1' unless has format flag 'MoveParensToToken' that was only in SCE (San Onofre) + break; case "{CHKOFFHEADING}": case "[CHKOFFHEADING]": // unfortunately, the font is not stored on the page list item if there is an active @@ -1307,6 +1311,18 @@ namespace Volian.Print.Library break; } } + + private string GetAttachNum1() + { + int cnt = 0; + SectionInfo si = MySection; + while (si != null) + { + if (si.MyContent.Type == MySection.MyContent.Type) cnt++; + si = si.MyPrevious as SectionInfo; + } + return cnt.ToString(); + } private static void AddImage(SvgGroup svgGroup, float x, float y, float w, float h, string figure) { svgGroup.Add(new SvgImage(new System.Drawing.PointF(x, y), new System.Drawing.SizeF(w, h),