This commit is contained in:
Kathy Ruffing 2009-02-26 15:35:36 +00:00
parent 490db100a6
commit ff815ba28c
3 changed files with 8 additions and 2 deletions

View File

@ -91,7 +91,7 @@ namespace DataLoader
else else
tok = textm.IndexOf('\x15', beg); tok = textm.IndexOf('\x15', beg);
} }
if (beg < textm.Length - 1) if (beg <= textm.Length - 1)
rotxt.Append(textm.Substring(beg, textm.Length - beg)); rotxt.Append(textm.Substring(beg, textm.Length - beg));
return rotxt.ToString(); return rotxt.ToString();

View File

@ -60,7 +60,8 @@ namespace DataLoader
// Need the content record for the RO & transitions. // Need the content record for the RO & transitions.
//content = Content.MakeContent(null, stptext, 20000 + int.Parse(newstptyp!=null?newstptyp:StepType),null, ManualPagebreak?ci.ToString():null, dts, userid); //content = Content.MakeContent(null, stptext, 20000 + int.Parse(newstptyp!=null?newstptyp:StepType),null, ManualPagebreak?ci.ToString():null, dts, userid);
// 20000 flags step type item & 1 adjusts for 'base' in format files. // 20000 flags step type item & 1 adjusts for 'base' in format files.
content = Content.New(null, stptext, 20001 + int.Parse(newstptyp != null ? newstptyp : StepType), null, ManualPagebreak ? ci.ToString() : null, dts, userid); int contenttype = (structtype == "R") ? 20040 : 20001 + int.Parse(newstptyp != null ? newstptyp : StepType);
content = Content.New(null, stptext, contenttype, null, ManualPagebreak ? ci.ToString() : null, dts, userid);
content.MyZContent.OldStepSequence = ProcNumber + "|" + stpseq; content.MyZContent.OldStepSequence = ProcNumber + "|" + stpseq;
// Before we save it, handle RO & Transitions tokens. // Before we save it, handle RO & Transitions tokens.

View File

@ -193,6 +193,11 @@ namespace DataLoader
s2 = Regex.Replace(s2, @"\x13([^\x13 ]*?)(?:[\x13]|(?= )|\Z)(.*?)", @"\b $1\b0 $2"); s2 = Regex.Replace(s2, @"\x13([^\x13 ]*?)(?:[\x13]|(?= )|\Z)(.*?)", @"\b $1\b0 $2");
s2 = Reg2.Replace(s2, new MatchEvaluator(ReplaceChars)); s2 = Reg2.Replace(s2, new MatchEvaluator(ReplaceChars));
// Now prepend an escape character, '\', to any curly brace. The curly brace
// is used in rtf land.
s2 = s2.Replace(@"{", @"\{");
s2 = s2.Replace(@"}", @"\}");
return s2; return s2;
} }
} }