Added logic to handle RO table (in word section) that uses underbars to draw the horizontal lines.

This commit is contained in:
John Jenko 2014-02-25 15:22:18 +00:00
parent 7ceacd813c
commit 238724db6c

View File

@ -1054,8 +1054,20 @@ namespace VEPROMS.CSLA.Library
string[] parts = val.Split("_".ToCharArray());
foreach (string part in parts)
{
// if we have a row of underbar "_" chars then we will parts of empty strings.
// in this case, we want to output the underbar char and turn off underlining.
// Ex Commanche Peak RO table in ECA-1.1A Attachment 5
if (part.Equals(""))
{
if (sel.Font.Underline != LBWdUnderline.wdUnderlineNone)
{
sel.Font.Underline = LBWdUnderline.wdUnderlineNone;
sel.TypeText("_");
}
sel.TypeText("_");
}
// If there is a carrage return, and underline is turned on, then turn off the underline
if (sel.Font.Underline != LBWdUnderline.wdUnderlineNone && part.Contains("\r"))
else if (sel.Font.Underline != LBWdUnderline.wdUnderlineNone && part.Contains("\r"))
{
int idx = part.IndexOf("\r");
string part1 = part.Substring(0, idx);
@ -1084,6 +1096,7 @@ namespace VEPROMS.CSLA.Library
else
sel.Font.Underline = LBWdUnderline.wdUnderlineNone;
}
//}
}
// We are done processing the text in val, if underline is on, turn it off
if (sel.Font.Underline != LBWdUnderline.wdUnderlineNone)