From f3675b7ed16a0812364f18c20eaa99aaf3dd67eb Mon Sep 17 00:00:00 2001 From: Kathy Date: Mon, 4 Jun 2012 12:41:32 +0000 Subject: [PATCH] --- .../VEPROMS.CSLA.Library/Config/ROFSTLookup.cs | 18 +++++++++--------- PROMS/Volian.Print.Library/VlnSvgPageHelper.cs | 10 ++++++---- PROMS/Volian.Print.Library/vlnParagraph.cs | 14 +++++++++++++- 3 files changed, 28 insertions(+), 14 deletions(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Config/ROFSTLookup.cs b/PROMS/VEPROMS.CSLA.Library/Config/ROFSTLookup.cs index 0b0e5987..2e0ce5a6 100644 --- a/PROMS/VEPROMS.CSLA.Library/Config/ROFSTLookup.cs +++ b/PROMS/VEPROMS.CSLA.Library/Config/ROFSTLookup.cs @@ -238,9 +238,9 @@ namespace VEPROMS.CSLA.Library string ROID = ROID16.Substring(0,12); if (dicRos == null) ParseIntoDictionary(_ROFst!=null?_ROFst.ROLookup:_ROFstInfo.ROLookup); // Use the ROID to get the value from the dictionary - if (dicRos.ContainsKey(ROID)) + if (dicRos.ContainsKey(ROID.ToUpper())) { - rochild rochld = (rochild)dicRos[ROID]; + rochild rochld = (rochild)dicRos[ROID.ToUpper()]; if (rochld.value != null && rochld.value != string.Empty) return rochld.value; if (rochld.children != null) @@ -268,9 +268,9 @@ namespace VEPROMS.CSLA.Library string ROID = ROID16.Substring(0, 12); if (dicRos == null) ParseIntoDictionary(_ROFst != null ? _ROFst.ROLookup : _ROFstInfo.ROLookup); // Use the ROID to get the value from the dictionary - if (dicRos.ContainsKey(ROID)) + if (dicRos.ContainsKey(ROID.ToUpper())) { - rochild rochld = (rochild)dicRos[ROID]; + rochild rochld = (rochild)dicRos[ROID.ToUpper()]; return rochld; } rochild tmp = new rochild(); @@ -281,9 +281,9 @@ namespace VEPROMS.CSLA.Library { if (dicRos == null) ParseIntoDictionary(_ROFst != null ? _ROFst.ROLookup : _ROFstInfo.ROLookup); // Use the ROID to get the value from the dictionary - if (dicRos.ContainsKey(ROID)) + if (dicRos.ContainsKey(ROID.ToUpper())) { - rochild rochld = (rochild)dicRos[ROID]; + rochild rochld = (rochild)dicRos[ROID.ToUpper()]; return rochld; } rochild tmp = new rochild(); @@ -520,10 +520,10 @@ namespace VEPROMS.CSLA.Library if (tmp.children != null) { foreach (rochild child in tmp.children) - if(!dicRos.ContainsKey(child.roid)) - dicRos.Add(child.roid, child); + if (!dicRos.ContainsKey(child.roid.ToUpper())) + dicRos.Add(child.roid.ToUpper(), child); } - dicRos.Add(tmp.roid, tmp); + dicRos.Add(tmp.roid.ToUpper(), tmp); if (!dicRosIntIDs.ContainsKey(tmp.ID)) dicRosIntIDs.Add(tmp.ID, tmp); int j; for (j = i - 1; j >= 0 && tmp.ID < myGrp.children[j].ID; j--) diff --git a/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs b/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs index d0621cda..3d23958b 100644 --- a/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs +++ b/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs @@ -878,9 +878,10 @@ namespace Volian.Print.Library private List SplitText(string text, int len) { List results = new List(); - int width = 0; - int start = 0; - int lastspace = 0; + int width = 0; // width of text, non-rtf + int start = 0; // start of line (index into string 'text'), includes rtf + int lastspace = 0; // location of lastspace (index into string 'text'), includes rtf + int startNonRtf = 0; // start of line, non-rtf (used for determining starting position to determine width if there was a break) string rtfprefix = ""; string nextprefix = ""; for (int indx = 0; indx < text.Length; indx++) @@ -919,6 +920,7 @@ namespace Volian.Print.Library if (text[indx] == ' ') { lastspace = indx; + startNonRtf = width; } width++; if (width > len) @@ -928,7 +930,7 @@ namespace Volian.Print.Library nextprefix = rtfprefix; if (nextprefix != "") nextprefix += " "; start = lastspace + 1; - width = 0; + width = (width - startNonRtf - 1) > 0 ? width - startNonRtf - 1 : 0; lastspace = 0; } } diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index 4f264963..11ae4431 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -364,6 +364,11 @@ namespace Volian.Print.Library if (myMsg.IndexOf(@"%2d") > -1) myMsg = myMsg.Replace(@"%2d", MyItemInfo.MyHLS.MyTab.CleanText.Trim(" .".ToCharArray()).PadLeft(2)); float msg_yLocation = 0; + if (myMsg.Contains("{par}")) + { + myMsg = myMsg.Replace("{par}", ""); + msg_yLocation = -SixLinesPerInch; + } switch (docstyle.Continue.Bottom.Location) { case E_ContBottomLoc.EndOfText: // place continue string at end of text @@ -372,7 +377,7 @@ namespace Volian.Print.Library break; case E_ContBottomLoc.BottomOfPage: // place continue message at bottom of page //msg_yLocation = yBottomMargin + 2 * SixLinesPerInch + (float)docstyle.Layout.FooterLength; // 2 lines above bottom margin - msg_yLocation = yBottomMargin + (float)docstyle.Layout.FooterLength; + msg_yLocation = msg_yLocation + yBottomMargin + (float)docstyle.Layout.FooterLength; break; default: Console.WriteLine("**** BOTTOM CONTINUE MESSAGE NOT CODED*****"); @@ -1048,6 +1053,13 @@ namespace Volian.Print.Library else { Rtf = GetRtf(itemInfo); + // Need the following with some modifications for WCNCKL format: + //if (Rtf.Contains("{Backspace}")) + //{ + // XOffset -= 18; + // Width += 24; + // Rtf = Rtf.Replace("{Backspace}", ""); + //} if (itemInfo.IsTablePart) // Not for grid, this is for old-style tables. { Width = GetTableWidth(cb, IParagraph, MyItemInfo.MyDocStyle.Layout.PageWidth);