This commit is contained in:
Kathy Ruffing 2010-06-24 10:38:14 +00:00
parent c0ffca0bb7
commit af197dbd05
2 changed files with 15 additions and 10 deletions

View File

@ -58,7 +58,8 @@ namespace DataLoader
da.Dispose(); da.Dispose();
return textm; return textm;
} }
int tok = textm.IndexOf('\x15'); char[] chrrotrn = { '\x15', '\x3a6' };
int tok = textm.IndexOfAny(chrrotrn);
while (tok > -1) while (tok > -1)
{ {
// found a token, add the roid & value into the string and // found a token, add the roid & value into the string and
@ -79,6 +80,10 @@ namespace DataLoader
// TODO: NEED TO PASS IN ConvertCaret FORMAT FLAG // TODO: NEED TO PASS IN ConvertCaret FORMAT FLAG
string roval = TextConvert.ConvertDOSSuperAndSubScripts(rofstinfo.ROFSTLookup.GetRoValue(ROID.Substring(0, 12).ToUpper())); string roval = TextConvert.ConvertDOSSuperAndSubScripts(rofstinfo.ROFSTLookup.GetRoValue(ROID.Substring(0, 12).ToUpper()));
roval = TextConvert.ReplaceUnicode(roval, conv_caret); roval = TextConvert.ReplaceUnicode(roval, conv_caret);
if (textm[tok] == '\x3a6' && roval.IndexOf('\n')>-1) // figure - just get image name
{
roval = roval.Substring(0, roval.IndexOf('\n'));
}
//if (roval.Contains("\r") || roval.Contains("\n")) //if (roval.Contains("\r") || roval.Contains("\n"))
// Console.WriteLine("RO has new Lines"); // Console.WriteLine("RO has new Lines");
@ -111,7 +116,7 @@ namespace DataLoader
da.Dispose(); da.Dispose();
} }
else else
tok = textm.IndexOf('\x15', beg); tok = textm.IndexOf('\x15', beg); // there would only be one figure - only check for ro after 1st time
} }
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));

View File

@ -48,13 +48,6 @@ namespace DataLoader
string seqcvt = TextConvert.ConvertSeq(stpseq); string seqcvt = TextConvert.ConvertSeq(stpseq);
// Figure marker - it should NEVER get here!!!
int tokfig = Textm.IndexOf('\xE8');
if (tokfig > -1)
{
log.Error("Found a old style figure!");
log.ErrorFormat("oldstepsequence = {0}", stpseq);
}
string newstptyp = null; string newstptyp = null;
bool ManualPagebreak = false; bool ManualPagebreak = false;
char cbittst = StepType.PadRight(2)[0]; char cbittst = StepType.PadRight(2)[0];
@ -86,6 +79,13 @@ namespace DataLoader
stptext = MigrateRos(cn, stptext, seqcvt, content, docver, conv_caret); stptext = MigrateRos(cn, stptext, seqcvt, content, docver, conv_caret);
stptext = stptext.TrimEnd(" ".ToCharArray()); stptext = stptext.TrimEnd(" ".ToCharArray());
} }
tokrt = Textm.IndexOf('\x3a6');
if (tokrt > -1)
{
txtdirty = true;
stptext = MigrateRos(cn, stptext, seqcvt, content, docver, conv_caret);
stptext = stptext.TrimEnd(" ".ToCharArray());
}
// 16-bit code has the following two defines. // 16-bit code has the following two defines.
// #define TransitionMarker 0xC2 // #define TransitionMarker 0xC2