diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ROFSTExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ROFSTExt.cs index 9a875d73..7d0ad3c8 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ROFSTExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ROFSTExt.cs @@ -229,7 +229,7 @@ namespace VEPROMS.CSLA.Library byte[] ab = r.ReadBytes((int)fsIn.Length); fsIn.Close(); - using (RODb rodb = RODb.Get(rdi.RODbID)) + using (RODb rodb = RODb.GetJustRoDb(rdi.RODbID)) { using (ROImageInfoList myROImages = ROImageInfoList.GetByRODbID(rdi.RODbID)) { diff --git a/PROMS/VEPROMS.CSLA.Library/Format/DocStyles.cs b/PROMS/VEPROMS.CSLA.Library/Format/DocStyles.cs index e61afd05..6153f4e8 100644 --- a/PROMS/VEPROMS.CSLA.Library/Format/DocStyles.cs +++ b/PROMS/VEPROMS.CSLA.Library/Format/DocStyles.cs @@ -154,6 +154,18 @@ namespace VEPROMS.CSLA.Library } } #endregion + #region OptionalSectionContent + [Category("Miscellaneous")] + [Description("Section Optional Content")] + private LazyLoad _OptionalSectionContent; + public bool OptionalSectionContent + { + get + { + return LazyLoad(ref _OptionalSectionContent, "@OptionalSectionContent"); + } + } + #endregion #region SpecialStepsFoldout [Category("Miscellaneous")] [Description("Section Special Steps Foldout")] diff --git a/PROMS/Volian.Print.Library/PromsPrinter.cs b/PROMS/Volian.Print.Library/PromsPrinter.cs index 769c2b63..3bf35d68 100644 --- a/PROMS/Volian.Print.Library/PromsPrinter.cs +++ b/PROMS/Volian.Print.Library/PromsPrinter.cs @@ -733,7 +733,7 @@ namespace Volian.Print.Library float yPageStart = yTopMargin; if (myItemInfo.HasChildren) localYPageStart = myParagraph.ToPdf(cb, yPageStart, ref yTopMargin, ref yBottomMargin); - else + else if(!myItemInfo.MyDocStyle.OptionalSectionContent) PrintTextMessage(cb, "No Section Content", _TextLayer); SectionConfig.SectionPagination sp = SectionConfig.SectionPagination.Separate; // always the default if ( section.NextItemCount > 0) diff --git a/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs b/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs index 455a4323..d944241f 100644 --- a/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs +++ b/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs @@ -746,7 +746,12 @@ namespace Volian.Print.Library else ProcessPaglistToken(section, svgGroup, pageItem, ref useFontForCheckOffHeader, ref plstr, token); } // end foreach matches - + if (plstr.StartsWith("RO_Lookup(")) + { + string parms = plstr.Substring(10,plstr.Length-11); + string[] parts = parms.Split(",".ToCharArray()); + plstr = ROLookup(parts[0], parts[1], parts[2]); + } if (plstr != "") { if (useFontForCheckOffHeader != null) @@ -768,7 +773,18 @@ namespace Volian.Print.Library } if (svgGroup.Count>0) mySvg.Add(svgGroup); } - + private string ROLookup(string accpageid, string multiid, string deflt) + { + ROFSTLookup myLookup = MySection.MyDocVersion.DocVersionAssociations[0].MyROFst.ROFSTLookup; + string val = myLookup.GetROValueByAccPagID("<" + accpageid + "." + multiid + ">", MySection.MyDocVersion.DocVersionConfig.RODefaults_setpointprefix, MySection.MyDocVersion.DocVersionConfig.RODefaults_graphicsprefix); + if (val != null) + { + if (deflt.StartsWith("[") && !val.StartsWith("[")) val = "[" + val + "]"; + if (deflt.EndsWith("*")) val = val + "*"; + return val; + } + return deflt; + } private void ProcessPaglistToken(VEPROMS.CSLA.Library.SectionInfo section, SvgGroup svgGroup, VEPROMS.CSLA.Library.PageItem pageItem, ref VE_Font useFontForCheckOffHeader, ref string plstr, string token) { // Paglist token inside a PS= conditional are surrounded by square brackets instead of curley