diff --git a/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs b/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs index e31d1d5e..8b7b99ed 100644 --- a/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs +++ b/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs @@ -109,6 +109,11 @@ namespace Volian.Print.Library if ((MySection.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DontCountInTabOfCont) == 0) CurrentTOCPageNumber++; } + if (NegPageItems != null) + { + NegPageItems.Clear(); + NegPageItems = null; + } YMultiplier = 1; } private void DrawRuler(PdfContentByte cb) @@ -260,7 +265,8 @@ namespace Volian.Print.Library { _MySection = value; MySectionTitle = ((_MySection.DisplayNumber ?? "")=="" ? "" : _MySection.DisplayNumber + " - ") + _MySection.DisplayText; - MySvg = BuildSvg(_MySection); + Volian.Svg.Library.Svg sectSvg = BuildSvg(_MySection); + if (sectSvg != null) MySvg = sectSvg; } } private string _MySectionTitle; @@ -404,11 +410,8 @@ namespace Volian.Print.Library { VEPROMS.CSLA.Library.FormatInfo activeFormat = mySection.ActiveFormat; VEPROMS.CSLA.Library.DocStyle docStyle = mySection.MyDocStyle; + Volian.Svg.Library.Svg mySvg = null; - //string jsj = BuildMyText(activeFormat); - //if (jsj == "") - // Console.WriteLine("here"); - //mySvg = SvgSerializer.StringDeserialize(jsj); mySvg = SvgSerializer.StringDeserialize(BuildMyText(activeFormat)); mySvg.ViewBox.Height = 1100; mySvg.ViewBox.Width = 850; @@ -419,6 +422,17 @@ namespace Volian.Print.Library VEPROMS.CSLA.Library.PageStyle pageStyle = docStyle.pagestyle; AddPageListItems(mySvg, pageStyle, mySection); mySvg.ProcessText += new SvgProcessTextEvent(mySvg_ProcessText); + // if this section had a previous section and this is continuous, don't generate the svg for + // it, we'll use the previous section. The only thing we need to do is to process through the + // pagelist items in case there are some section items, for example the checkoff header needs + // to be processed for each section whether or not it is continuous. + SectionConfig.SectionPagination sPag = SectionConfig.SectionPagination.Separate; + if (mySection.IsStepSection && mySection.MyPrevious != null && mySection.MyPrevious.IsStepSection) + { + SectionConfig sc = mySection.MyConfig as SectionConfig; + sPag = sc.Section_Pagination; + } + if (sPag == SectionConfig.SectionPagination.Continuous) return null; return mySvg; } public PageCounts MyPageCounts = null; @@ -542,8 +556,17 @@ namespace Volian.Print.Library return token.Substring(1, 1) + token.Substring(token.Length - 2, 1); } private static Regex regexJustTokens = new Regex(@"^{([^{}]*}{)*[^{}]*}$"); + public Dictionary NegPageItems; private void AddPageListItems(Volian.Svg.Library.Svg mySvg, VEPROMS.CSLA.Library.PageStyle pageStyle, VEPROMS.CSLA.Library.SectionInfo section) { + // If this is a continuous section, then the only pagelist items we want are section type since + // we are still on the same page. - CHECK IF ON SAME PAGE!!!! + SectionConfig.SectionPagination sPag = SectionConfig.SectionPagination.Separate; + if (section.IsStepSection && section.MyPrevious != null && section.MyPrevious.IsStepSection) + { + SectionConfig sc = section.MyConfig as SectionConfig; + sPag = sc.Section_Pagination; + } SvgGroup svgGroup = new SvgGroup(); //int defPtPerRow = 72 / 6; @@ -553,202 +576,229 @@ namespace Volian.Print.Library //float rowAdj = 0; // = 18; foreach (VEPROMS.CSLA.Library.PageItem pageItem in pageStyle.PageItems) { - //if (PrevRow > 0) - //{ - // //float pgRow = (float)(pageItem.Row + rowAdj); - // if (curLPI != prevLPI) - // { - // int prow = (int)(PrevRow / defPtPerRow); - // int nrows = ((int)(pageItem.Row / defPtPerRow)) - prow; - // rowAdj += (float)Math.Abs(((nrows * (72 / curLPI)) - ((nrows * defPtPerRow) + rowAdj))); - // //rowAdj += (float)(((pgRow - PrevRow) / (72 * prevLPI)) * (72 / curLPI)); - // prevLPI = curLPI; - // } - //} - MatchCollection matches = regexFindToken.Matches(pageItem.Token); - if (matches.Count>0) + if (sPag == SectionConfig.SectionPagination.Separate || ((sPag == SectionConfig.SectionPagination.Continuous || sPag ==0 )&& pageItem.Row < 0)) { - string plstr = ""; - // When a pagelist line (row) has more than one token that is resolved to text, each resolved token text was place on top - // of each other. Use a temporary string (plstr) to process the pagelist tokens for each pagelist line (row) before adding - // it to the svgGroup. - plstr = pageItem.Token; - foreach (Match match in matches) + //if (PrevRow > 0) + //{ + // //float pgRow = (float)(pageItem.Row + rowAdj); + // if (curLPI != prevLPI) + // { + // int prow = (int)(PrevRow / defPtPerRow); + // int nrows = ((int)(pageItem.Row / defPtPerRow)) - prow; + // rowAdj += (float)Math.Abs(((nrows * (72 / curLPI)) - ((nrows * defPtPerRow) + rowAdj))); + // //rowAdj += (float)(((pgRow - PrevRow) / (72 * prevLPI)) * (72 / curLPI)); + // prevLPI = curLPI; + // } + //} + MatchCollection matches = regexFindToken.Matches(pageItem.Token); + if (matches.Count > 0) { - string token = match.Value; - //token = Regex.Replace(token, @"[\xB3-\xDF]", " "); - switch (match.Value) + string plstr = ""; + // When a pagelist line (row) has more than one token that is resolved to text, each resolved token text was place on top + // of each other. Use a temporary string (plstr) to process the pagelist tokens for each pagelist line (row) before adding + // it to the svgGroup. + plstr = pageItem.Token; + foreach (Match match in matches) { - case "{!atom}": - // Add an Atom Figure to the SVG - plstr = plstr.Replace(token, ""); - AddImage(svgGroup,160.5f, 170.5f,288f, 323f,"atom.bmp"); - break; - case "{!cpllogo}": - plstr = plstr.Replace(token, ""); - AddImage(svgGroup, 10f, 10f, 78.7f, 29.8f, "cpllogo.bmp"); - break; - //case "{!domlogo}": - // AddImage(svgGroup, 10f, 70f, 123f, 40.1f, "domlogo.bmp"); - // break; - //case "{!gpclogo}": - // AddImage(svgGroup, 10f, 150f, 35.2f, 35.8f, "gpclogo.bmp"); - // break; - case "{HEADER1}": - case "{HEADER2}": - case "{HEADER3}": - case "{HEADER4}": - case "{HEADER5}": - case "{BOX1}": - case "{BOX2}": - case "{BOX3}": - case "{BOX4}": - case "{BOX5}": - case "{BOX6}": - case "{BOX7}": - case "{BOX8}": - case "{BOX9}": - plstr = plstr.Replace(token, ""); - svgGroup.Add(PageItemToSvgUse(pageItem, FirstAndLast(token))); - break; - case "{PMODEBOX}": // need to set either 1 or 2 depending on number of columns - string box = "1"; - if (_MySection.SectionConfig.Section_ColumnMode == SectionConfig.SectionColumnMode.Four) - box = "4"; - else if (_MySection.SectionConfig.Section_ColumnMode == SectionConfig.SectionColumnMode.Three) - box = "3"; - else if (_MySection.SectionConfig.Section_ColumnMode == SectionConfig.SectionColumnMode.Two) - box = "2"; - box = "{BOX" + box + "}"; - plstr = plstr.Replace(token, ""); - svgGroup.Add(PageItemToSvgUse(pageItem, FirstAndLast(box))); - break; - case "{DRAFTPAGE}": - if (!AllowedWatermarks.Contains("Draft")) AllowedWatermarks.Add("Draft"); - break; - case "{REFERENCEPAGE}": - if (!AllowedWatermarks.Contains("Reference")) AllowedWatermarks.Add("Reference"); - break; - case "{MASTERPAGE}": - if (!AllowedWatermarks.Contains("Master")) AllowedWatermarks.Add("Master"); - break; - case "{SAMPLEPAGE}": - if (!AllowedWatermarks.Contains("Sample")) AllowedWatermarks.Add("Sample"); - break; - case "{INFORMATIONPAGE}": - if (!AllowedWatermarks.Contains("Information Only")) AllowedWatermarks.Add("Information Only"); - break; - case "{PROCTITLE}": - case "{PROCTITLE1}": - case "{PROCTITLE2}": - case "{COVERPROCTITLE}": - float linelen = (int)section.ActiveFormat.PlantFormat.FormatData.ProcData.TitleLength * (float)pageItem.Font.CPI / 12; - plstr = SplitTitle(svgGroup, pageItem, section.MyProcedure.MyContent.Text.ToUpper(), (int)linelen, token, plstr); //,rowAdj); - //SplitTitle(svgGroup, pageItem, section.MyProcedure.MyContent.Text, (int)section.ActiveFormat.PlantFormat.FormatData.ProcData.TitleLength, token); - break; - case "{COVERTITLE1}": - case "{COVERTITLE2}": - int ctlen = section.ActiveFormat.PlantFormat.FormatData.ProcData.CoverTitleLength??0; - float coverlinelen = ((ctlen == 0) ? (int)section.ActiveFormat.PlantFormat.FormatData.ProcData.TitleLength : ctlen) * (float)pageItem.Font.CPI / 12; - plstr = SplitCoverTitle(svgGroup, pageItem, section.MyProcedure.MyContent.Text, (int)coverlinelen, token, plstr);//, rowAdj); - //SplitTitle(svgGroup, pageItem, section.MyProcedure.MyContent.Text, (int)section.ActiveFormat.PlantFormat.FormatData.ProcData.TitleLength, token); - break; - case "{EOPNUM}": - string eopnum = section.MyProcedure.MyContent.Number; - string unitnum = MySection.MyDocVersion.DocVersionConfig.Unit_ProcedureNumber; - if (unitnum.Length > 0) - eopnum = unitnum.Replace("#", eopnum); - plstr = plstr.Replace(token, eopnum); - //svgGroup.Add(PageItemToSvgText(pageItem, pageItem.Token.Replace(token, eopnum))); - //svgGroup.Add(PageItemToSvgText(pageItem, pageItem.Token.Replace(token, section.MyProcedure.MyContent.Number))); - break; - case "{SECTIONLEVELTITLE}": - plstr = SplitTitle(svgGroup, pageItem, section.DisplayText, section.ActiveFormat.PlantFormat.FormatData.SectData.SectionTitleLength, token, plstr); - //svgGroup.Add(PageItemToSvgText(pageItem, section.DisplayText)); - break; - case "{SECTIONLEVELNUMBER}": - plstr = plstr.Replace(token, section.DisplayNumber); - //svgGroup.Add(PageItemToSvgText(pageItem, pageItem.Token.Replace(token, section.DisplayNumber))); - break; - case "{UNITTEXT}": - plstr = plstr.Replace(token, MySection.MyDocVersion.DocVersionConfig.Unit_Text); - //svgGroup.Add(PageItemToSvgText(pageItem, pageItem.Token.Replace(token, MySection.MyDocVersion.DocVersionConfig.Unit_Text))); - break; - case "{CHKOFFHEADING}": - int sindx = section.CheckOffHeadingIndex(); - // -1 flags no entires in the format's CheckOffHeaderList & 0 flags the first entry - // which is always '{NO HEADING}". - if (sindx > 0) - { + string token = match.Value; + //token = Regex.Replace(token, @"[\xB3-\xDF]", " "); + switch (match.Value) + { + case "{!atom}": + // Add an Atom Figure to the SVG plstr = plstr.Replace(token, ""); - svgGroup.Add(PageItemToSvgText(pageItem, section.ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffHeaderList[sindx].CheckOffHeading, section.ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffHeaderList[sindx].Font)); - } - break; - default: - // see if it's a PSI token: - if (token.Contains(@"PS-")) - { - ProcedureConfig procConfig = section.MyProcedure.MyConfig as ProcedureConfig; - if (procConfig != null) + AddImage(svgGroup, 160.5f, 170.5f, 288f, 323f, "atom.bmp"); + break; + case "{!cpllogo}": + plstr = plstr.Replace(token, ""); + AddImage(svgGroup, 10f, 10f, 78.7f, 29.8f, "cpllogo.bmp"); + break; + //case "{!domlogo}": + // AddImage(svgGroup, 10f, 70f, 123f, 40.1f, "domlogo.bmp"); + // break; + //case "{!gpclogo}": + // AddImage(svgGroup, 10f, 150f, 35.2f, 35.8f, "gpclogo.bmp"); + // break; + case "{HEADER1}": + case "{HEADER2}": + case "{HEADER3}": + case "{HEADER4}": + case "{HEADER5}": + case "{BOX1}": + case "{BOX2}": + case "{BOX3}": + case "{BOX4}": + case "{BOX5}": + case "{BOX6}": + case "{BOX7}": + case "{BOX8}": + case "{BOX9}": + plstr = plstr.Replace(token, ""); + svgGroup.Add(PageItemToSvgUse(pageItem, FirstAndLast(token))); + break; + case "{PMODEBOX}": // need to set either 1 or 2 depending on number of columns + string box = "1"; + if (_MySection.SectionConfig.Section_ColumnMode == SectionConfig.SectionColumnMode.Four) + box = "4"; + else if (_MySection.SectionConfig.Section_ColumnMode == SectionConfig.SectionColumnMode.Three) + box = "3"; + else if (_MySection.SectionConfig.Section_ColumnMode == SectionConfig.SectionColumnMode.Two) + box = "2"; + box = "{BOX" + box + "}"; + plstr = plstr.Replace(token, ""); + svgGroup.Add(PageItemToSvgUse(pageItem, FirstAndLast(box))); + break; + case "{DRAFTPAGE}": + if (!AllowedWatermarks.Contains("Draft")) AllowedWatermarks.Add("Draft"); + break; + case "{REFERENCEPAGE}": + if (!AllowedWatermarks.Contains("Reference")) AllowedWatermarks.Add("Reference"); + break; + case "{MASTERPAGE}": + if (!AllowedWatermarks.Contains("Master")) AllowedWatermarks.Add("Master"); + break; + case "{SAMPLEPAGE}": + if (!AllowedWatermarks.Contains("Sample")) AllowedWatermarks.Add("Sample"); + break; + case "{INFORMATIONPAGE}": + if (!AllowedWatermarks.Contains("Information Only")) AllowedWatermarks.Add("Information Only"); + break; + case "{PROCTITLE}": + case "{PROCTITLE1}": + case "{PROCTITLE2}": + case "{COVERPROCTITLE}": + float linelen = (int)section.ActiveFormat.PlantFormat.FormatData.ProcData.TitleLength * (float)pageItem.Font.CPI / 12; + plstr = SplitTitle(svgGroup, pageItem, section.MyProcedure.MyContent.Text.ToUpper(), (int)linelen, token, plstr); //,rowAdj); + //SplitTitle(svgGroup, pageItem, section.MyProcedure.MyContent.Text, (int)section.ActiveFormat.PlantFormat.FormatData.ProcData.TitleLength, token); + break; + case "{COVERTITLE1}": + case "{COVERTITLE2}": + int ctlen = section.ActiveFormat.PlantFormat.FormatData.ProcData.CoverTitleLength ?? 0; + float coverlinelen = ((ctlen == 0) ? (int)section.ActiveFormat.PlantFormat.FormatData.ProcData.TitleLength : ctlen) * (float)pageItem.Font.CPI / 12; + plstr = SplitCoverTitle(svgGroup, pageItem, section.MyProcedure.MyContent.Text, (int)coverlinelen, token, plstr);//, rowAdj); + //SplitTitle(svgGroup, pageItem, section.MyProcedure.MyContent.Text, (int)section.ActiveFormat.PlantFormat.FormatData.ProcData.TitleLength, token); + break; + case "{EOPNUM}": + string eopnum = section.MyProcedure.MyContent.Number; + string unitnum = MySection.MyDocVersion.DocVersionConfig.Unit_ProcedureNumber; + if (unitnum.Length > 0) + eopnum = unitnum.Replace("#", eopnum); + plstr = plstr.Replace(token, eopnum); + //svgGroup.Add(PageItemToSvgText(pageItem, pageItem.Token.Replace(token, eopnum))); + //svgGroup.Add(PageItemToSvgText(pageItem, pageItem.Token.Replace(token, section.MyProcedure.MyContent.Number))); + break; + case "{SECTIONLEVELTITLE}": + plstr = SplitTitle(svgGroup, pageItem, section.DisplayText, section.ActiveFormat.PlantFormat.FormatData.SectData.SectionTitleLength, token, plstr); + //svgGroup.Add(PageItemToSvgText(pageItem, section.DisplayText)); + break; + case "{SECTIONLEVELNUMBER}": + plstr = plstr.Replace(token, section.DisplayNumber); + //svgGroup.Add(PageItemToSvgText(pageItem, pageItem.Token.Replace(token, section.DisplayNumber))); + break; + case "{UNITTEXT}": + plstr = plstr.Replace(token, MySection.MyDocVersion.DocVersionConfig.Unit_Text); + //svgGroup.Add(PageItemToSvgText(pageItem, pageItem.Token.Replace(token, MySection.MyDocVersion.DocVersionConfig.Unit_Text))); + break; + case "{CHKOFFHEADING}": + int sindx = section.CheckOffHeadingIndex(); + // -1 flags no entires in the format's CheckOffHeaderList & 0 flags the first entry + // which is always '{NO HEADING}". + if (sindx > 0) { - int indx = token.IndexOf("-"); - string val = procConfig.GetValue("PSI", token.Substring(4,token.Length-5)); - plstr = plstr.Replace(token, val); - //svgGroup.Add(PageItemToSvgText(pageItem, pageItem.Token.Replace(token, val))); - } - } - else if (token.Contains(@"PS=")) - { - ProcedureConfig procConfig = section.MyProcedure.MyConfig as ProcedureConfig; - if (procConfig != null) - { - int indx = token.IndexOf("="); - int qindx = token.IndexOf("?", indx); - string pstok = token.Substring(indx + 1, qindx - indx - 1); - string val = procConfig.GetValue("PSI", pstok); - int bindx = token.IndexOf("|", indx); - if (val == "Y") - val = token.Substring(qindx + 1, bindx - qindx - 1); - else + plstr = plstr.Replace(token, ""); + if (pageItem.Row < 0) { - int eindx = token.IndexOf("}", bindx); - val = token.Substring(bindx + 1, eindx - bindx - 1); + // for the checkoff header, use the font from the CheckOffData Checkoffheader, font to get the + // font style, i.e. bold - underline. + if (NegPageItems == null) NegPageItems = new Dictionary(); + + // now see if this same checkoff header is on the page, if so, don't + // add it to the list. We only want those that are different. + bool add = true; + foreach (CheckOffHeaderHelper h in NegPageItems.Values) + { + if (section.ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffHeaderList[sindx].CheckOffHeading == h.SvgText.Text) add=false; + } + if (add) + { + SvgText svgt = PageItemToSvgText(pageItem, section.ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffHeaderList[sindx].CheckOffHeading, section.ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffHeaderList[sindx].Font); + CheckOffHeaderHelper hlp = new CheckOffHeaderHelper(svgt, section.ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffHeaderList[sindx].Font); + NegPageItems.Add(section, hlp); + } } - if (val != null && val != "") - plstr = plstr.Replace(token, val); - //if (val != null && val != "") svgGroup.Add(PageItemToSvgText(pageItem, val)); + else + svgGroup.Add(PageItemToSvgText(pageItem, section.ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffHeaderList[sindx].CheckOffHeading, section.ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffHeaderList[sindx].Font)); } - } - //else if (token.Contains(@"{DRV:Lpi ")) - //{ - // int indx = token.IndexOf("{DRV:Lpi ") + 9; - // int endindx = token.IndexOf("}", indx); - // string str = token.Substring(indx, endindx - indx); - // curLPI = Convert.ToInt32(str) / 2; - // //PrevRow = (float)(pageItem.Row + rowAdj); - // PrevRow = (float)pageItem.Row; - //} - else - { - if (plstr != "") - svgGroup.Add(PageItemToSvgText(pageItem, plstr)); - //svgGroup.Add(PageItemToSvgText(pageItem, pageItem.Token)); - } - //_MyLog.InfoFormat("Token not processed {0}", token); - break; - } - } // end foreach matches - if (plstr != "") - svgGroup.Add(PageItemToSvgText(pageItem, plstr)); + break; + default: + // see if it's a PSI token: + if (token.Contains(@"PS-")) + { + ProcedureConfig procConfig = section.MyProcedure.MyConfig as ProcedureConfig; + if (procConfig != null) + { + int indx = token.IndexOf("-"); + string val = procConfig.GetValue("PSI", token.Substring(4, token.Length - 5)); + plstr = plstr.Replace(token, val); + //svgGroup.Add(PageItemToSvgText(pageItem, pageItem.Token.Replace(token, val))); + } + } + else if (token.Contains(@"PS=")) + { + ProcedureConfig procConfig = section.MyProcedure.MyConfig as ProcedureConfig; + if (procConfig != null) + { + int indx = token.IndexOf("="); + int qindx = token.IndexOf("?", indx); + string pstok = token.Substring(indx + 1, qindx - indx - 1); + string val = procConfig.GetValue("PSI", pstok); + int bindx = token.IndexOf("|", indx); + if (val == "Y") + val = token.Substring(qindx + 1, bindx - qindx - 1); + else + { + int eindx = token.IndexOf("}", bindx); + val = token.Substring(bindx + 1, eindx - bindx - 1); + } + if (val != null && val != "") + plstr = plstr.Replace(token, val); + //if (val != null && val != "") svgGroup.Add(PageItemToSvgText(pageItem, val)); + } + } + //else if (token.Contains(@"{DRV:Lpi ")) + //{ + // int indx = token.IndexOf("{DRV:Lpi ") + 9; + // int endindx = token.IndexOf("}", indx); + // string str = token.Substring(indx, endindx - indx); + // curLPI = Convert.ToInt32(str) / 2; + // //PrevRow = (float)(pageItem.Row + rowAdj); + // PrevRow = (float)pageItem.Row; + //} + else + { + if (plstr != "") + svgGroup.Add(PageItemToSvgText(pageItem, plstr)); + //svgGroup.Add(PageItemToSvgText(pageItem, pageItem.Token)); + } + //_MyLog.InfoFormat("Token not processed {0}", token); + break; + } + } // end foreach matches + if (plstr != "") + svgGroup.Add(PageItemToSvgText(pageItem, plstr)); + } + else + svgGroup.Add(PageItemToSvgText(pageItem, pageItem.Token)); } - else - svgGroup.Add(PageItemToSvgText(pageItem, pageItem.Token)); } // Proms page numbering designed requires a "{PAGE}" token to increment the page counter. So the easiest way // to do that was to add a "{PAGE}" token to every page that is flagged as not to be printed. - SvgText st = new SvgText(new System.Drawing.PointF(300, 300), "Non-printing {PAGE}", new System.Drawing.Font("Arial", 10), System.Drawing.Color.Black); - svgGroup.Add(st); - mySvg.Add(svgGroup); + if (sPag == SectionConfig.SectionPagination.Separate) + { + SvgText st = new SvgText(new System.Drawing.PointF(300, 300), "Non-printing {PAGE}", new System.Drawing.Font("Arial", 10), System.Drawing.Color.Black); + svgGroup.Add(st); + } + if (svgGroup.Count>0) mySvg.Add(svgGroup); } private static void AddImage(SvgGroup svgGroup, float x, float y, float w, float h, string figure) @@ -840,7 +890,7 @@ namespace Volian.Print.Library } else { - m = Regex.Match(text.Substring(indx), @"^\\[uU][a-fA-F0-9][a-fA-F0-9][a-fA-F0-9][a-fA-F0-9]?"); + m = Regex.Match(text.Substring(indx), @"^\\[uU][a-fA-F0-9][a-fA-F0-9][a-fA-F0-9][a-fA-F0-9][?]"); if (m.Success) { indx += m.Length - 1; @@ -868,7 +918,7 @@ namespace Volian.Print.Library if (width > len) { // what should be done if lastspace == 0 - results.Add(nextprefix+text.Substring(start, lastspace)); + results.Add(nextprefix+text.Substring(start, lastspace-start)); nextprefix = rtfprefix; if (nextprefix != "") nextprefix += " "; start = lastspace + 1; @@ -1109,4 +1159,24 @@ namespace Volian.Print.Library } } } + public class CheckOffHeaderHelper + { + private SvgText _SvgText; + public SvgText SvgText + { + get { return _SvgText; } + set { _SvgText = value; } + } + private VEPROMS.CSLA.Library.VE_Font _CheckOffHeaderFont; + public VEPROMS.CSLA.Library.VE_Font CheckOffHeaderFont + { + get { return _CheckOffHeaderFont; } + set { _CheckOffHeaderFont = value; } + } + public CheckOffHeaderHelper(SvgText stext, VEPROMS.CSLA.Library.VE_Font vf) + { + _SvgText = stext; + _CheckOffHeaderFont = vf; + } + } }